visio custom properties

U

unerklarlich

Hi,

I have created a custom stencil in Visio. Each of the shapes on the stencil
have been assigned some custom properties which the user is prompted to
enter when he drops the shape on a drawing.

The drawing is then saved in Visio XML format for further processing.

The problem I am facing is that custom properties for which the user does
not enter a value are not being saved in the XML. They do appear in the
shapesheet for the particular shape. It appears that Visio persists a custom
property in the XML only if it is modified atleast once.

Does anyone know how to overcome this problem? I need all the custom
properties to be persisted in the XML with their default values.

Thanks,
Mayank
 
A

Al Edlund

it sounds like an xml "white space" issue (i.e. don't save blank fields). Do
your custom properties have default values assigned?
al
 
U

unerklarlich

Yes, each of the properties have default values assigned. When the user is
prompted to enter the value, the default values are displayed in the dialog.

Apparently Visio saves these only if they are edited and they are not
whitespaces :(
 
R

Roger

Hi

When dropped in a page, Visio shapes initially inherit all their data from
the master except, of course, for position. As data for a particular shape is
changed, the values which are specific to the particular instance of the
shape, rather than inherited from the master, are changed from black to blue
in the ShapeSheet. If you try changing your shape's custom properties while
viewing the ShapeSheet you should see this effect.

One consequence of this behaviour is that you'll need to access the xml for
the master as well as the instance of the shape.

If you haven't already done so, I'd recommend getting a copy of Graham
Wideman's "Visio 2003 Developer's Survival Pack" book which has a short
chapter on this subject.

Best regards
Roger Billsdon
 
U

unerklarlich

Thanks :). Now I know.

Roger said:
Hi

When dropped in a page, Visio shapes initially inherit all their data from
the master except, of course, for position. As data for a particular shape is
changed, the values which are specific to the particular instance of the
shape, rather than inherited from the master, are changed from black to blue
in the ShapeSheet. If you try changing your shape's custom properties while
viewing the ShapeSheet you should see this effect.

One consequence of this behaviour is that you'll need to access the xml for
the master as well as the instance of the shape.

If you haven't already done so, I'd recommend getting a copy of Graham
Wideman's "Visio 2003 Developer's Survival Pack" book which has a short
chapter on this subject.

Best regards
Roger Billsdon
 
H

HeatherC

Please bear with me, I've never created a custom stencil before, but how do
you assign custom properties to the different shapes in the stencil? I can't
seem to find anything in help that talks about the different shapes, only the
main one.

Thanks,
Heather
 
U

unerklarlich

Hi,

Would you like to know the process for creating a custom stencil or
assigning a custom property to a master?

rgds,
unerklarlich
 
H

HeatherC

I've created a customer stencil and assigned a custom property to a master.
I guess a better way to phrase my question is: How do I reverse engineer the
Small Icons stencil? I just can't seem to figure out how to connect the
custom property where they select the icon they want with the icon that
appears.

thx,
Heather
 

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