This example shows how to change the position of a dimension in a drawing.
- Extract the archive in a convenient location.
- Open a drawing with a dimension in SolidWorks (see Notes).
- Select a dimension.
- Run the macro (VBA, VB.NET, C#) in the Macro Editor.
The selected dimension is moved to the drawing sheet origin, retaining its original alignment (horizontal and vertical).
Its new position is printed in the Immediate window.
Notes: You can also re-position dimensions in parts and assemblies, but this is usually done when automating the production of drawings.
|- required for full access.|
- Looking for more API Examples?
Copyright © 2011 Dassault Systèmes SolidWorks Corp. All rights reserved.
Do not distribute or reproduce without the written consent of Dassault Systèmes SolidWorks Corp.