Setting and reading custom properties from shapes in visio.

W

Wes Lowe

I,ve recently started evaluating the the Visio drawing component using C# .Net.
I've taken the code from the code librarian software which came with the
visio sdk for reading / setting custom properties.
When I test this code it always fails at the point it checks if the cell
exists.
Does the cellname that it is checking correspond to the custom property
label in visio?
If not what does it correspond to, and can i set that name in visio?

Thanks for any help

Wes
 
M

Mark Nelson [MS]

There are several cells in each custom property row. The Value cell holds
the value that the user enters. The Label cell holds the text shown as a
label in the Custom Properties Window. The custom property row has a name
as well. The basic cell name would be something like:

"Prop.RowName.Value" or "Prop.RowName.Label"
 
W

Wes Lowe

The RowName is the thing I'm having a problem with.
Is this something that can be set in visio, or is it automatically created?
How do i find this name programatically?

Thanks
 
M

Mark Nelson [MS]

Rows get created using Shape.AddNamedRow or Shape.AddRow. Both methods
return an integer representing the index of the row. You should use the
AddSection method before this if the section does not yet exist.

You can get or set the row name using the RowName or RowNameU property of a
Cell object. You just need a cell in the row. Typical syntax might be
this: Shape.CellsSRC(visSectionUser, row_index, visUserValue).RowNameU


--
Mark Nelson
Microsoft Corporation

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

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