AnsweredAssumed Answered

Dimension Properties

Question asked by Yong Ning on Feb 28, 2017
Latest reply on Jun 23, 2017 by Dave Bear



Private Sub ll()

   Dim swApp As SldWorks.SldWorks, swModel As ModelDoc2

       Set swApp = Application.SldWorks

       Set swModel = swApp.ActiveDoc

   Dim SwSelMgr As SelectionMgr

       Set SwSelMgr = swModel.SelectionManager

   Dim swDispDim As DisplayDimension, swDim As Dimension

       Set swDispDim = SwSelMgr.GetSelectedObject5(1)

       With swDispDim

           .ArrowSide = swDimArrowsInside

           .SetArrowHeadStyle False, swCLOSED_ARROWHEAD  ' swNO_ARROWHEAD

           Debug.Print .GetArrowHeadStyle

           '.SetOverride False, 10 '"<DIM>"

           .SetBrokenLeader2 False, swBrokenLeaderAlignedText  'swBrokenLeaderHorizontalText  ' swSolidLeaderAlignedText

           Debug.Print .GetBrokenLeader2

       End With

       swModel.ForceRebuild3 True

End Sub



swDimArrowsInside - Always positioned on the inside.

swDimArrowsOutside - Always positioned on the outside.

swDimArrowsSmart - Positioned on the inside, if there is room; otherwise, positioned on the outside.

swDimArrowsFollowDoc - As per the document's default setting.


swSolidLeaderAlignedText - The leader is solid (not broken) and the text is aligned with the leader.

swBrokenLeaderHorizontalText - The leader is broken and the text is horizontal.

swBrokenLeaderAlignedText - The leader is broken and the text is aligned with the leader.



How to Align Dimension with API ? | SOLIDWORKS Forums

How to determine the number of multiple dimensi... | SOLIDWORKS Forums

Have dimension → how to set DisplayDimension | SOLIDWORKS Forums

Rotate the dimension text orientation with API? | SOLIDWORKS Forums

How to set the Radial Dimension Text Position? | SOLIDWORKS Forums

How to display dimension of Horizontal Text wit... | SOLIDWORKS Forums

Vertical Ordinate Dimensions → with API | SOLIDWORKS Forums

How to Get dimension Name in Traverse Assembly | SOLIDWORKS Forums

Get Display Dimension Type - API | SOLIDWORKS Forums