2 Optimization
The higher the number of elements in a shape, the slower will be editing and positioning of it. For sheet processing it is very advantageous if the number of elements (lines, points etc.) in the shapes is low.
The operations described here are a way that may be considered only if MS Visio license is available, since the licenses provided by AUCOTEC AG are only to be used within Engineering Base. The optimization is carried out through the Joining feature in the standard MS Visio.
How can the number of shape elements be determined?
1. Open a Visio-sheet outside of Engineering Base and enable the menu Developer
If the menu Developer is not active, follow the steps 1-4 to enable it (see the picture below).
2. Start EB. As Engineering Base always opens the integrated MS Visio when it is started there will be two separate MS Visio Versions stated in parallel!
3. Select and place the shape which shall be optimized from the EB stencils on the Visio sheet via Drag & Drop.
4. Open the VBA-Window and the Dialog Immediate (click Immediate Window in the View tab), enter the following command
? ActiveWindow.Selection(1).Shapes.Count
|
· The shortcut Alt-F11 opens the VBA-Window. · The shortcut Ctrl-G opens the Immediate Window. |
The steps 1-3 (see the picture below) show how to open the windows mentioned above.
The command counts all elements of the selected shape.
After selecting the shape and executing the command, the whole elements of the shape will be counted and displayed in the Immediate Window.
The example in the picture below shows that the shape consists of 1717 elements.
How to reduce the number of shape elements?
5. Ungroup the selected shape
6. „Join“ the single elements.
7. After that „group” the whole shape again
8. Count again to check the result
|
Depending on the shape range, it may happen that the shape elements can’t be joined in one step. In such cases the elements can be joined step by step until the whole shape is processed. It is not possible here to reduce to only one element; however, the complexity of the shape will be strongly reduced. |