Click here to Skip to main content
15,877,857 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to create a new Master Shape in the Microsoft Visio 2013 x64 like the Class Master Shape in the UML Class Stencil.
When add the Class Master Shape to a page, it appends two Member and one Separator Master Shapes in itself automatically. Furthermore, can add more Member and Separator Master Shapes in it.
I was thinking that it adds other Master Shapes in itself by some written VBA codes; however, when I checked the file of the UML Class (Metric) Stencil in the following full path, I got that it uses no VBA codes, not at all.
D:\Program Files\Microsoft Office\Office15\Visio Content\1033\USTRME_M.VSSX

The file extension is "Visio Stencil (.vssx)" instead of "Visio Macro-Enabled Stencil (.vssm)"; so, it can't have VBA codes.
I know that I can do something by adding some new Rows in the Actions Section of the ShapeSheet; however, it doesn't exist any action Rows to add fresh Member and Separator Master Shapes for Class Shape.
Figure 1[^]
Figure 1 - Separator Shape with two additional options in the Context Menu and without any related rows in the ShapeSheet
Figure 2[^]
Figure 2 - Display a Bar to insert Separator Shape
Figure 3[^]
Figure 3 - Member Shape with two additional options in the Context Menu and without any related rows in the ShapeSheet
Figure 4[^]
Figure 4 - Display a Bar to insert Member Shape
When I do RMB click on a Class Shape that is placed in the page, it has two new options in the Context Menu:
- Show Template Parameter
- Show Stereotype
And I see related Actions' Section Rows for them.
Figure 5[^]
Figure 5 - Class Shape with two additional options in the Context Menu and related rows in the ShapeSheet
When I do RMB click on the Member and Separator Shapes in added Class Shape, can see "Insert "Member/Separator" before/after"; however, when I add Member and Separator Master Shapes on the page directly (not in the Class Shape), when I do RMB click on them, can't see extra options in the Context Menu.
Figure 6[^]
Figure 6 - Separator Shape with no additional options in the Context Menu
Figure 7[^]
Figure 7 - Member Shape with no additional options in the Context Menu
I checked their ShapeSheet and can't find any related rows for above-mentioned actions.
Now, my question is that how can I create a new Master Shape with the ability to accept some other Master Shapes without any VBA codes like Class Shape in the UML Class Stencil that is created by Microsoft?
Posted
Updated 17-Jan-15 2:13am
v2

1 solution

Check the following Links:
- StackOverflow[^]
- Office Dev Center[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900