How to add custom property to visio shape in C#

N

Nilesh

Hi,
I am creatting tool for drawing state diagram. it contains state and
transitions.
and i want to add some string values like transitionId and command to
transition shape. so i am thinkig about adding transitionId etc as custom
property to that transition shape. so can u help me? please...

Thanks.
Nilesh.
 
O

Oleg

TRY this

private Visio.Cell AddCustomProperty(Visio.Shape dropShape, string
PropertyName)
{
Visio.Cell multiUseCell;

short rowIndex = dropShape.AddNamedRow((short)Visio.
VisSectionIndices.visSectionProp, PropertyName, (short)Visio.VisRowIndices.
visRowProp);

multiUseCell = dropShape.get_CellsSRC(
(short)Visio.VisSectionIndices.visSectionProp,
rowIndex,
(short)Visio.VisCellIndices.visCustPropsLabel);
multiUseCell.FormulaU = StringToFormulaForString(PropertyName);

return multiUseCell;
}

url:http://www.ureader.com/msg/11301780.aspx
 

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