API: How to change position of dimensions in drawings (VBA, VB.NET, C#)

Version 3

    This example shows how to change the position of a dimension in a drawing.

     

    1. Extract the archive in a convenient location.
    2. Open a drawing with a dimension in SolidWorks (see Notes).
    3. Select a dimension.
    4. 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.

     

    Note:
    - Subscription Services 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.