Shapesheet formula syntax (V2003)

M

///Matt

I'm new to Visio Property Sheet use, am trying to create some compound
shapes, and need to figure out the 'trick' to referencing a shape by
name. I'm working with named shapes (e.g. "Titlebar" versus
"sheet.<id>")
for simplicity and general elegance (coder habit). Per MSDN, I should
be able to use 'Name' (single quotes) in place of sheet.<id>.
However, the method suggested does not work.

Example: While sheet.31!width works, 'MyShape'!width generates an
"error in formula"* error. I have tried
numerous variations and could get none to work.

Does anyone have a tested-and-known-good syntax sample for referencing
a shape by name?

Also, in case the ID is needed again, can the Drawing Explorer be told
to display ID's? I can't seem to find a simple way to learn a shape's
ID once it's been named.

Thanks for any help,
Matt

* A tip of the hat to Microsoft for their religious adherence to the
"Convey as little useful information as possible:" error message
authoring philosophy. "Error in formula" is probably second only to
"OLE Error" in this regard :)
 
M

Mark Nelson [MS]

The general answer is that you should never reference shapes using name.
Always use the Sheet.ID. Technically, Visio will support the name reference
as long as you only use it within the same scope (i.e. group container). In
practice, it is better to avoid names altogether in syntax.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

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

///Matt

Understood. It's a shame though; makes the formulae harder to work
with. I'll take "Title!Width" over "sheet.312!width" any day :)

Thanks,
Matt
 

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