Visio Guy

Solution-specific Visio Discussions => Org Charting => Topic started by: nashwaan on September 06, 2010, 01:03:33 PM

Title: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: nashwaan on September 06, 2010, 01:03:33 PM
I think this is one of the most requested feature in Visio organisation chart.

The problem: The order of subordinates is unpredictable/undefined when laying out organization chart by Visio. Everytime you import same source file, it is layed out differently which is really frustrating.

Trying to solve this *small* problem manually is very very time consuming process.

My request for the Visio MVPs/Professionals is to help sorting organization chart automatically based on their order of appearance in the source file (Ex: Excel) or based on a special field/column that contains a sequence number. So a subordinate with smaller sequence number should appear before another collegue/subordinate who has a larger sequence number.

Note: Some common problems with MS Visio (including 2010 version) regarding organisation strucute were addressed previously and solved (fortunately). I will list here a few:
John Goldsmith showed how can you insert staff pictures automatically http://visualsignals.typepad.co.uk/vislog/2008/06/linking-org-chart-images.html (http://visualsignals.typepad.co.uk/vislog/2008/06/linking-org-chart-images.html)
David Parker showed how can you insert country flag automatically http://bvisual.spaces.live.com/Blog/cns!3350D61BC93733A9!521.entry (http://bvisual.spaces.live.com/Blog/cns!3350D61BC93733A9!521.entry)

I think this problem can be solved by iterating through subordinates and reposition them according to their sequence number and then execute "ReLayout" command.

Thanks,
Yousuf
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: aledlund on September 06, 2010, 01:11:00 PM
As an observation from the side, several of the Visio Mvps became Mvps because they saw a problem that really annoyed them. In my case I followed my wife's advice when she said "If it really annoys you, go fix it". I've been hooked on learning to write software for Visio ever since.

:D

al
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: wapperdude on September 06, 2010, 03:22:46 PM
To add to Al's comment, I believe, Al included, that everyone who has used Visio extensively, especially the Org Chart feature, is quite frustrated with that feature.  There is very little that can be done from the outside because so much of the Org Chart is coded into Visio itself.  Most enhancements just get clobbered.  On the other hand, Visio is primarily a drawing program with a huge assortment of options and features, but, it is not a full featured Org Chart, or Gantt chart, or Timeline, or schematic entry, etc.  To be so it would become so overly bloated that it would be useless.  Sort of a Catch 22.

Just my observation -- but it would be nice to have improvements to the Org Chart layout importing function.

Wapperdude
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: Visio Guy on September 06, 2010, 03:57:17 PM
I have done several projects for customers that centered around customized org-charts. I usually don't even use Visio's org-chart solution at all, because I end up fighting it more than benefiting from it. While it is good at splitting charts across pages and doing the cool drop-on-superior thing, many customers just need and updated dump from the Excel or other data source, and they need customized layout.

That's why I personally haven't come up with anything FOR the built-in org-chart solution, I'm too busy rolling my own.

Also interesting, I've never done a solution that involved updating an existing chart--ala CRUD (create, read, update, delete) synchronization with the data source. Most folks seem to be working in Excel or the database, and are happy to push a button that generates a new orgchart for "today's meeting".
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: nashwaan on September 08, 2010, 01:41:12 AM
Quote from: aledlund on September 06, 2010, 01:11:00 PM
In my case I followed my wife's advice when she said "If it really annoys you, go fix it"
I guess i will have to follow this advice as well  :)

Quote from: wapperdude on September 06, 2010, 03:22:46 PM
everyone who has used Visio extensively, especially the Org Chart feature, is quite frustrated with that feature.
Yes, the missing of this feature is frustrating for every visio Org Chart user as you can read about it in other sites/forums.  :'(
Why Microsoft ignored to fix this issue all these years!  >:(
Quote from: wapperdude on September 06, 2010, 03:22:46 PM
it is not a full featured Org Chart...  To be so it would become so overly bloated that it would be useless.
I am not sure if Visio tried to be a full featured Org Chart will make it "overly bloated" as I think Visio already covered 70% or more. It is not very far from being the *super* tool for Org Charting. Because visio has a powerful API and other powerful drawing capabilities making customization and automation of Org Chart a great advantage and a dream.  8)

Quote from: Visio Guy on September 06, 2010, 03:57:17 PM
I usually don't even use Visio's org-chart solution at all, because I end up fighting it more than benefiting from it.
I am very surprised to read this from Viso Guy!  May i ask what do you use to generate Org Chart?  ???

Thanks,
Yousuf.
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: nashwaan on September 08, 2010, 03:40:59 AM
Now i am thinking to take this initiative using VBA macro to *sort* Org Chart subordinates. Here is the approach in pseudocode:

'// note: this approach will sort the direct subordinates first horizontally (left to right) and then vertically (top to bottom)
'// assumption1: subordiantes shapes are already layed out properly (using one of layout styles), as this algorithm will only *swap* shapes.
'// assumption2: the desired precedance of subordinates is already stored in the imported file (Ex: Excel) as a special field containing a numerical *sequence* number. (this fild will be imported in Prop.Sequence).

declare an array of Points (X, Y)

Starting from *top* superior shape, do the following *recursively* for all direct subordinates untill no more sub-subordinates:
    find all direct subordinates to this superior (by invistigating *to* connectors)
         copy the shape coordinates (PosX, PosY) --> in the array of Points
    sort the array of Points based on X
    sort the array of Points based on Y
    iterate [ i ] through same subordinates (now orderly based on the shape's "Prop.Sequence" value, starting from smallest value)
         copy the Point[ i ](X, Y) to the shape (PosX, PosY)

is this approach right?  :-\

Yousuf.
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: aledlund on September 09, 2010, 01:05:05 AM
This might help

Creating an Org Chart without the Org Chart Wizard (http://bvisual.spaces.live.com/blog/cns!3350D61BC93733A9!1311.entry)

al
;)
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: jastronomy on October 28, 2010, 10:01:46 PM
Considering active directory holds user information (name/job title/manager etc), and it's capable of holding graphics (see here on how to import them: http://www.arricc.net/active-directory-photos-sharepoint.php).
Then is it possible to use the orgwiz (via VBA/VBS) to build an org chart including images from AD ?

If so, anyone know how?
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: nashwaan on November 28, 2010, 06:37:05 AM
Following the advice from Aledlund "If it really annoys you, go fix it"  8), i created some tools to help automating some common tasks in Visio org chart.

The tools are in beta stage v0.8, i will update once more functionalities are implemented.  ;)

Meanwhile, have a look at the attachement file and provide your comments/feedback.  :)

Regards,
Yousuf.

Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: aledlund on November 28, 2010, 12:45:41 PM
Very nice. Here's some other materials that might be of interest. (first the overview doc)
al
moved file to http://visguy.com/vgforum/index.php?topic=2298.0
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: aledlund on November 28, 2010, 12:46:12 PM
now the data and code.
hth,
al
moved file to http://visguy.com/vgforum/index.php?topic=2298.0
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: aledlund on November 28, 2010, 12:49:36 PM
here's the database,
al
moved file to http://visguy.com/vgforum/index.php?topic=2298.0
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: Nikolay on November 28, 2010, 04:13:30 PM
Quote from: nashwaan on November 28, 2010, 06:37:05 AM

Meanwhile, have a look at the attachement file and provide your comments/feedback.  :)


Have you seen this picture already? ;)
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: aledlund on November 28, 2010, 08:29:09 PM
A fair enough observation, but it misses a key discussion point. The point being that without understanding the target audience for the application (and what is attempting to be accomplished) critiquing the UI is moot. The desire to keep screens simple with a minimum of interaction has to be balanced against the business process being supported. Demo code for presentation to peers for discussion normally wouldn't fall into either of those review processes.
;)
Al
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: Nikolay on November 28, 2010, 09:50:59 PM
Quote from: aledlund on November 28, 2010, 08:29:09 PM
A fair enough observation, but it misses a key discussion point. The point being that without understanding the target audience for the application (and what is attempting to be accomplished) critiquing the UI is moot. The desire to keep screens simple with a minimum of interaction has to be balanced against the business process being supported. Demo code for presentation to peers for discussion normally wouldn't fall into either of those review processes.
;)
Al

Hello Al, Yousuf

Yes, I do understand that the complexity of a user interface should depend on the target audience of the application and reflect the needs of the audience. Not to mention I really appreciate the efforts you guys put into this (I fully agree that this Org Chart Wizard really deserved to be at least "refreshable", for gods sake). But still, didn't the author ask for a fair feedback? I mean, I'm personally quite tired of unnecessarily complex computer stuff I had to burst through from time to time. Wouldn't this world be a better place if we just went with "click" and "push" approach? :)

Maybe it was just that the user interface of the .VSS reminded me that (kinda famous) picture. I am really sorry if it appeared to be kind of rude. I never meant to offend anybody, I just wanted to make a hint that simplifying the user interface a bit, well, might be a good point to consider. Means, I think, this tool in its current condition might be a bit too complicated to be useful for a mere mortal (developer) like myself, and that's it. But it is still just my personal opinion anyways. Maybe it's just that "I'm bad at using devices with more than three buttons" (c) :)

Kind regards, Nick
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: aledlund on November 29, 2010, 03:18:42 AM
Nick,
Please don't misunderstand, I wasn't offended. I was hoping for discussion. In my career I was sometimes part of teams that had to review why applications failed to meet there expected results. I think everyone who participates here realizes there is phenomenal power in using it to visualize 'something', the challange is in merging the previous toolsets into solutions that don't overwhelm us with the minutia necessary to describe what we are working with.
al
:)
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: nashwaan on November 29, 2010, 03:48:43 AM
Thanks aledlund for your feedback and your files. I am in the process of understanding the examples. I just realized there are much more things to learn in Visio than i initially anticipated.  :o

Looking at the picture from Nikolay made me feel immediately embarassed even before opening the attachment to its full size :D .  I see your point and it is a valid one. In fact, i used to give the example how Google kept their user interface extremely minimal all these years since the day it started is worth to follow. I just completely forgot about "keeping things simple" while develping the GUI   ;D. but again, both of you are right specially when it comes to "It is challenging to find the right balance between simple GUI and provide more controls/powers". ;)

I have few ideas in my head to make to tool more usable/understandable but i need to test them first.

Thanks again for the comments as i learned alot from them. 8)
More comments are welcomed.

Yousuf.
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: visiogal on August 25, 2012, 12:12:25 PM
Quote from: nashwaan on November 28, 2010, 06:37:05 AM
Following the advice from Aledlund "If it really annoys you, go fix it"  8), i created some tools to help automating some common tasks in Visio org chart.

The tools are in beta stage v0.8, i will update once more functionalities are implemented.  ;)

Meanwhile, have a look at the attachement file and provide your comments/feedback.  :)

Regards,
Yousuf.

i'm new to this discussion forum and i couldnt find the attachment mentioned in the above post. i'm trying to build a macro to sort an org chart and if someone has a already built such a macro 8) , i'd really like to see it.

Thanks in advance
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: pavane on October 08, 2012, 10:21:37 AM
I have recently implemented a VBA process to import test scripts into a hierarchy chart and have implemented workarounds which partially solve the problems people have reported. When building an org chart in code, I can ensure that the layout is done "left to right", and that the final layout can be done horizontally (the arrange parameters cannot be provided to the add-in, as far as I can find). I have also implemented a "sort subtree" which can reorganise the selected subtree in correct sequence, and another procedure to select all owners of a selected shape (i.e. the owners to the top of the tree). Maybe some of this will be of use. 
Title: Re: Its time for Visio MVPs/Developers to help us *sorting* organization chart
Post by: pavane on October 11, 2012, 10:23:26 PM
When building a chart in code, when I want to drop a shape onto a superior shape, I first move the superior shape way above and to the right of the superior.

I then drop the shape, and rearrange the page. This sems to force the dropped shape to be at the right of the subordinates (Who knows why?).

I have also implemented a "Sort Subtree" function on a selected shape (Mouse menu) which scans its subordinates recursively and moves shapes if necessary so that the displayed order corresponds to the internal sequence.