AnsweredAssumed Answered

Dimension Properties

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

Arrow.jpg

 

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

*********************************************************************

swDimensionArrowsSide_e

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  https://forum.solidworks.com/message/690260

How to determine the number of multiple dimensi... | SOLIDWORKS Forums  https://forum.solidworks.com/message/570899#comment-570899

Have dimension → how to set DisplayDimension | SOLIDWORKS Forums  https://forum.solidworks.com/message/378125#comment-378125

Rotate the dimension text orientation with API? | SOLIDWORKS Forums  https://forum.solidworks.com/message/473296

How to set the Radial Dimension Text Position? | SOLIDWORKS Forums  https://forum.solidworks.com/message/429020

How to display dimension of Horizontal Text wit... | SOLIDWORKS Forums  https://forum.solidworks.com/message/366384

Vertical Ordinate Dimensions → with API | SOLIDWORKS Forums  https://forum.solidworks.com/message/385093

How to Get dimension Name in Traverse Assembly | SOLIDWORKS Forums  https://forum.solidworks.com/message/292035#comment-292035

Get Display Dimension Type - API | SOLIDWORKS Forums  https://forum.solidworks.com/message/317119#comment-317119

Outcomes