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

File uploaded by Joyce Bossom Employee on Dec 22, 2010Last modified by Joyce Bossom Employee on Nov 2, 2017
Version 4Show Document
  • View in full screen mode

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.

Outcomes