![]() |
Visio 2003 Developer's Survival Pack Tools and Samples |
Chapter 12: Composite Shapes | |
![]() ![]() |
Examples of composite shapes, where the basic structure is maintained solely by the ShapeSheet, and editing of the structure (insertion of new subcomponents for example) is performed by Addon code, in this case VBA code in the drawing or in a separate stencil.
Filename | Description | Installation |
GWComp.vsd | All-in-one-file demo of composite shapes, corresponding to Fig 10-8. In this case the VBA to change the structure of the shape is included in the drawing file, so no additional stencil is necessary. | |
CompositeShapeDemo.vsd | Sample drawing. | |
GWComposite.vss | Stencil that holds main shapes and sub-component shapes. Also contains VBA code called from drawing to perform structural edits on the composite shapes. Hence stencil must be installed for the composite shape's right-click menu items to operate. | Create a new subdirectory under Visio\..\Solutions and copy copy stencil file into it. |
Experiment with shapes on drawing to see how various edits work.
The simple GWComp sample provides a couple of composite shapes on the drawing. Select one of the member shapes and right-click to access menu items that add, delete and move member shapes.
The more complete CompositeShapeDemo drawing works in conjunction with VBA code in stencil GWComposite.vss.
Selecting overall composite shape provides right-click menu with commands to Append Item and Show/Hide Items. Selecting (sub-selecting) individual Items provides right-click menu with commands to insert new items, separator bar, or change order of items.
To edit text of item, select it and hit F2 (as usual in Visio)..
Article Created: 2003-09-01 Last edit: Last edit:
03-10-11 Graham
Wideman
Go to:
DiagramAntics.com