personalize OrgChart template, stencil and master properties

C

Casper

Hello,
I need to adapt the OrgChart Template to get the following features:

1. need to make custom properties to master shapes (so that they are
availables each time i drag and drop a master from the stancil to the
drawing). This means two things: first remove the default built-in
properties (name, title, email, etc), and second add my own properties. I
want ONLY my own properties on masters!!

2. need a custom stencil (based on the OrgChart stencil) with master with my
custom properties defined at point 1.

3. On the masters' istances on the drowaing I want to display my own custom
property named "label" and "editor" instead of "name" and "title"

4. would like to keep the feature that when you drag a master on another
istance in the drawing it automatically makes a connection between the two.

5. in one word, would like to keep the organizational chart features,
including the Menu in the menu bar.

6. need to export the drowing including the custom properties and their
values to an EXCEL file.

Please help me, I've been reading books, ebooks, and trying with Visio 2003
Professional for 2 days and cannot figure this out.
Thank you a lot
Giovanni
 
M

Mike Mueller [MSFT]

What version of Visio are you using? I ask because the Organization Chart
solution changed significantly from Visio 2002 to Visio 2003.

Adding your own custom properties to the shapes in the Org Chart stencil
should work fine as long as you start with the original masters. You will
need to understand the shape sheet in order to make the changes that you
want. The solution code depends on all of the cells in the User section so
don't remove any of those.

In Visio 2003 you will *not* be able to remove the Name property. If you do,
the solution will add it back in. It is used internally.

In Visio 2003, the mappings of custom properties to text fields are
controlled programmatically. You will have to create a new template and use
the Organization Chart-> Options menu item to map your custom properties to
text blocks.

Hope this helps
 
C

Casper

What version of Visio are you using? I ask because the Organization Chart
solution changed significantly from Visio 2002 to Visio 2003.

I'm using Visio 2003

Adding your own custom properties to the shapes in the Org Chart stencil
should work fine as long as you start with the original masters. You will
need to understand the shape sheet in order to make the changes that you
want. The solution code depends on all of the cells in the User section so
don't remove any of those.


How do I manipulate the shape sheet to get to my solution?

In Visio 2003 you will *not* be able to remove the Name property. If you
do, the solution will add it back in. It is used internally.

ok, keeping the Name property is fine.
I woulld like to remove the other pre-defined properties though, and add my
own properties.

In Visio 2003, the mappings of custom properties to text fields are
controlled programmatically. You will have to create a new template and
use the Organization Chart-> Options menu item to map your custom
properties to text blocks.

that's fine.


Hope you can give me some more insight on how to reach my objective.
Thank you.

Giovanni
 
M

Mike Mueller [MSFT]

I just tried to create a new Organization Chart stencil and template and I
did not have any success geting the solution to load my custom stencil. It
has been a while since I wrote this solution and my memory is kind of fuzzy
and I no longer have access to the source code. I will try to take a look
later and will post what I find.
 
M

Mike Mueller [MSFT]

OK, here is what you have to do to create your own Organization Chart
Template and Stencil. It requires editing an XML file and doing some things
that are definitely *not* for the typical Visio user. Also, I make *no*
guarantees (see the disclaimer at the bottom of the post). Changes could be
made to the Org Chart solution that could break this behavior so, like the
preacher in "Blazing Saddles" said, "Son, you're on your own".

If you are still with me, read on.

1. Open a copy of the Organization Chart Stencil. Edit the shapes to add the
custom properties that you want. You can remove the Name, Title, Department,
etc. properties if you want, but they will be added back in by the Org Chart
solution when a drawing is created, so I wouldn't bother. Save this stencil
on your disk. Where you save it is irrelavent but you *must* name it the
same as the Visio stencil ("Organization Chart Shapes (US units).vss" e.g.).
If your stencil is not the same name as the Visio Stencil, Visio will load
both your stencil and the standard one.

2. Open a new Organization chart. Do not drop any shapes. Save this as an
XML template (.xlt file)

3. Open this template in your favorite XML editor and do the following:

Find the <Masters> tag and delete all the lines between <Masters> and
</Masters>. This removes all the document masters that were added when the
document was opened.

Find the <Windows> tag. One of the <Window> tags underneath will be the
Organization Chart Stencil (look for the stencil name in the Document
attribute). Change the path in the Document attribute to point to your
modified stencil.

Find the <SolutionXML> tag. The first entry in this tag is <SolutionModel>.
underneath this tag is the schema for the solution model. Find the
<ComplexType> tag for "Position". Add element tags for your custom
properties (this is standard XSD syntax)

Find the <SolutionModelData> tag. Underneath this tag is a <Root> tag.
Underneath the <Root> tag is a <Block1CustomProperty> tag. This defines the
default custom property(s) that you want to appear in the center text block.
Replace Name and Title with the custom properties that you want to appear in
the shapes.

4. Save this file. This is now your custom template. If you create a new
drawing using this template you should see your shapes with your custom
properties and still have all the Org Chart behavior.
 
C

Casper

If you are still with me, read on.

sure! and it worked out ! :)
I still have to set the property I want to appear in the shape by hand (have
not figured out how to do that by editing the xml template), anyway it's
just fine!!
that was great thank you VERY MUCH !!

Giovanni
 
O

Organisation woes

That seems to be a really complicated process just to get your own fields
into an organisational chart. Surely there is a simpler way to get an excel
sheet off a template of one's own properties without having to code?
 

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