Each of the Organization Chart shapes which use the Block Text feature are
actually a group. The main text is part of the main shape geometry, and
then there are up to 4 'children' which represent the corner blocks. Once
you have a local Master on your Document stencil for a Position shape, for
instance, you can manipulate the master to update the values in the
sub-text items as needed.
To create an example, update a shape using the UI, and observe what gets
updated in the shapesheets. By the way - notice that you can't use the
Macro recorder to capture the actions taken by the solution. This is by
design - none of the actions taken by the add-on code (Org Chart or any
other) are recorded in Macro code. So reviewing the ShapeSheet is your
best bet.
Each grouped shape is a collection of Shapes, so you can programmatically
get the text items by accessing the Shapes collection of the main shape.
Barb Way
Product Support - Visio
Microsoft Corporation
[This posting is provided "As Is" with no warranties, and confers no
rights.]
--------------------
Thread-Topic: Organization Chart - Blocks
Subject: Organization Chart - Blocks
Date: Mon, 12 May 2008 00:07:00 -0700
All,
In the Organization Chart dropdown, you can select fields and then choose
blocks by the field name (Block 1, Block 2, etc.). These blocks then
display
in the upper left, right, etc.
How can I assign these fields via code? I have scoured the web to no avail..
Thanks.
Thanks Barb for the information. After a lot of investigation, I
discovered the above. However, the object model is extremely complex
and hard to code toward. I understand that a lot of this is legacy and
that Visio goes back a long way. The client agreed to switch to Nevron
for the diagramming so we can move past the issue. I love Visio as a
client tool but the object model is tough to work with.
I am keeping the code and this response in case I need to use it in
the future. Thank you again.
Alan