Automatic Organization Charting

D

Dunedin

Hello Everyone,

I work with an application that can create an
organization chart of a company's reporting structure.
With Visio 2002 the shapes are drawn then connected
together (using the GlueTo method), but this would only
work when Visio asked if the "Automatic Organization
Charting" should be switched on. This happens when just
before the chart is drawn. However Visio 2003 does not
ask this question and the objects are not connected
together.

I can draw connecting lines (using the DrawLine method)
and connect these to the parent and child shapes but they
are not formatted neatly. The lines are drawn directly
from the bottom of the parent shape to the top of the
child shape.

Has the Automatic Organization Charting feature been
removed in Visio 2003 or is it possible to activate it?

Cheers,

Dunedin
 
C

Chris Roth [ Visio MVP ]

Dunedin,

I don't fully understand your question, but here's a tip:

When you connect the boxes with your code, don't use DrawLine, drop a "real"
connector on the page, then connect it to the shapes. The OrgChart add-on
will respect the official connector object, and you should get better
results.

The way to get the connector is this:
visio.Application.ConnectorToolDataObject.

So something like:

dim shp as visio.shape
set shp = ActivePage.Drop( visio.Application.ConnectorToolDataObject, 0, 0 )
'...GlueTo parent and child...

--

Hope this helps,

Chris Roth
Visio MVP
 
D

Dunedin

Hello Chris,

Many thanks for your reply. What I'm saying is that
Vision 2003 isn't asking the user to activate the
Automatic Organization Charing when creating a chart, but
Visio 2002 does.

The code that connects the parent and child shapes
doesn't require a connector shape, the GlueTo method
appears to take care of that in Visio 2002.

I've tried various ways of connecting the shapes together
in Visio 2003 but I'm not able to replicate the
formatting that Visio 2002 performs.

Cheers,

Dunedin

-----Original Message-----
Dunedin,

I don't fully understand your question, but here's a tip:

When you connect the boxes with your code, don't use DrawLine, drop a "real"
connector on the page, then connect it to the shapes. The OrgChart add-on
will respect the official connector object, and you should get better
results.

The way to get the connector is this:
visio.Application.ConnectorToolDataObject.

So something like:

dim shp as visio.shape
set shp = ActivePage.Drop(
visio.Application.ConnectorToolDataObject, 0, 0 )
 
G

Guest

Hi again,

The feature I'm referring to in Visio 2002 is
the "Organization Chart". When placing an Organization
Chart shape on the page Visio 2002 asks "Do you want to
enable the automatic Organization Chart behaviour?"

Cheers,

Dunedin

-----Original Message-----
Dunedin,

I don't fully understand your question, but here's a tip:

When you connect the boxes with your code, don't use DrawLine, drop a "real"
connector on the page, then connect it to the shapes. The OrgChart add-on
will respect the official connector object, and you should get better
results.

The way to get the connector is this:
visio.Application.ConnectorToolDataObject.

So something like:

dim shp as visio.shape
set shp = ActivePage.Drop(
visio.Application.ConnectorToolDataObject, 0, 0 )
 
M

Mark Nelson [MS]

I'm not aware of a change betwen 2002 and 2003 here, but the easiest way to
resolve this problem is to start your drawing from an Org Chart template.
The document is responsible for enabling "Org Chart behavior".
 
M

Mike Mueller [MSFT]

We actually did disable the automatic loading of the Organization Chart
solution in Visio 2003. The reason was that the add-in needed to get loaded
at document startup. Loading it later could cause problems.

Mark is correct that starting the drawing from the Organization Chart
template will correct the problem. Starting from the template will cause the
solution to be loaded and the connection logic will then work correctly.

--
Mike Mueller
Longhorn SDK

This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

Dunedin

Hello there,

Many thanks for all your replies. I have now managed to
get our drawings working with Visio 2003 by using the
ConnectShapes method and ensuring the correct child and
parent shapes are selected at any one time. We still
have to use the GlueTo method for Visio 2002 (and
previous versions).

There are a couple of minor niggles when loading a saved
drawing where Visio 2003 asks you to convert the drawing
otherwise the shapes will not function correctly but
converting the drawing removes all the lines! I expect
we'll have to work on the templates and stencils used.

Thanks again,

Dunedin
 
M

Mark Nelson [MS]

Please download Service Pack 1 for Visio 2003. There were substantial
changes made to the Org Chart conversion code. You should no longer lose
information when opening a Visio 2002 diagram.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top