Hello
Im developing custom Visio stencils/shapes and i would like to define the type for these shapes. I have looked under Properties, and the Property Sheet, but no luck.
I have also tried to use the "Shape name" function under Developer, this does not work either.
How do i define the type/name for a custom shape?
I need to be able to reference the shapes by name when using Visio through the COM interface. Microsoft.Office.Interop.Visio, like this:
Microsoft.Office.Interop.Visio.Master visioRectMaster = visioStencil.Masters.get_ItemU("Rectangle"); // <-- This Works, Rectangle is a build in type from "Basic shapes.vss"
Microsoft.Office.Interop.Visio.Shape visioRectShape = visioPage.Drop(visioRectMaster, 4.25, 5.5);
Microsoft.Office.Interop.Visio.Master visioRectMaster = visioStencil.Masters.get_ItemU("MyCustomShapeType"); // <-- This does not work!
Microsoft.Office.Interop.Visio.Shape visioRectShape = visioPage.Drop(visioRectMaster, 4.25, 5.5);
Regards MrSir
Have you opened the stencil containing the shape?
Hello Paul
I don't understand the question, i have developed the shapes in Visio.
Ragards MrSir
on your document stencil pane, right click on the master that you'd like to rename and choose "rename master". Alternatively you could do it programmatically by doing something like, assuming your master's current name is "Master", and you wanted to change it to "NEWname".
Sub changename()
ActiveDocument.Masters("Master").Name = "NEWname"
End Sub