Hide Table of Contents
AutoDimension Method (IDrawingDoc)

Automatically dimensions the selected drawing view.

.NET Syntax

Visual Basic (Declaration) 
Function AutoDimension( _
   ByVal EntitiesToDimension As Integer, _
   ByVal HorizontalScheme As Integer, _
   ByVal HorizontalPlacement As Integer, _
   ByVal VerticalScheme As Integer, _
   ByVal VerticalPlacement As Integer _
) As Integer
Visual Basic (Usage) 
Dim instance As IDrawingDoc
Dim EntitiesToDimension As Integer
Dim HorizontalScheme As Integer
Dim HorizontalPlacement As Integer
Dim VerticalScheme As Integer
Dim VerticalPlacement As Integer
Dim value As Integer
 
value = instance.AutoDimension(EntitiesToDimension, HorizontalScheme, HorizontalPlacement, VerticalScheme, VerticalPlacement)
C# 
int AutoDimension( 
   int EntitiesToDimension,
   int HorizontalScheme,
   int HorizontalPlacement,
   int VerticalScheme,
   int VerticalPlacement
)
C++/CLI 
int AutoDimension( 
&   int EntitiesToDimension,
&   int HorizontalScheme,
&   int HorizontalPlacement,
&   int VerticalScheme,
&   int VerticalPlacement
) 

Parameters

EntitiesToDimension
Entities to dimension as defined in swAutodimEntities
HorizontalScheme
Horizontal dimensioning scheme as defined in swAutodimScheme_e
HorizontalPlacement
Placement relative to the drawing view as defined in swAutodimHorizontalPlacement_e
VerticalScheme
Vertical dimensioning scheme as defined in swAutodimScheme_e
VerticalPlacement
Placement relative to the drawing view as defined in swAutodimVerticalPlacement_e

Return Value

swAutodimStatusSuccess if the view is automatically dimensioned; see swAutodimStatus_e for reasons for possible failures

Example

Remarks

This method requires information about the:

  • drawing view to autodimension. This information can be supplied by selecting the drawing view to use. No mark is necessary.

    If a drawing view is not selected, then this method attempts to determine the drawing view information from the other entities that are selected. If no other selections exist, then this method defaults to using the first drawing view, which is consistent with how the SolidWorks user interface works.

  • datums to use for the dimensioning baseline. These can be supplied by selecting a vertical edge, vertical sketch line, vertex, or sketch point as the datum for the horizontal dimensioning scheme. Mark the selection with swAutodimMarkHorizontalDatum from swAutodimMark_e. Similarly a horizontal edge, horizontal sketch line, vertex, or sketch point should be selected and marked with swAutodimMarkVerticalDatum for defining the datum for the vertical dimensioning scheme. If only one of these datums is supplied, only the appropriate dimensions are created for that datum.

    Instead of selecting the horizontal and vertical datum separately, you can select a vertex or sketch point to use to define both datums. Mark the selected vertex or sketch point selection with swAutodimMarkOriginDatum. If no datums are selected, then this method automatically uses the leftmost and bottom-most entities in the view to determine default datums, which is consistent with how the SolidWorks user interface works.

  • entities to autodimension. This information is supplied by the entitiesToDimension argument and the selected entities marked with swAutodimMarkEntities. The entitiesToDimension argument takes a value from the swAutodimEntities_e enumeration:

    • swAutodimEntitiesSelected indicates that only selected entities marked with a value of swAutodimMarkEntities are considered for autodimensioning.  

    • swAutodimEntitiesAll indicates that all entities in the drawing view are autodimensioned.  

    • swAutodimEntitiesBasedOnPreselect indicates that SolidWorks figures out what to do based on the selected entities marked with swAutodimMarkEntities. If any exist, then autodimension them, just like swAutodimEntitiesSelected. If none exist, then autodimension all entities, just like swAutodimEntitiesAll.

      Supported entities for dimensioning are lines, points, vertices, faces, sketch entities, center lines, and center marks.

 

See Also

Availability

SolidWorks 2005 FCS, Revision Number 13.0


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   AutoDimension Method (IDrawingDoc)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:



x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2012 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.