ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
YNYong Ning21/01/2015

It is possible to rotate the dimension text orientation using the Custom Text Position options in the Leaders tab of the Dimensions Property Manager.

11-5-2014+8-47-18+AM.jpg

Private Sub llll()

   Dim SwApp As SldWorks.SldWorks, SwModel As ModelDoc2, SwDraw As DrawingDoc

      Set SwApp = Application.SldWorks

      Set SwModel = SwApp.ActiveDoc

   Dim SwSelMgr As SelectionMgr

      Set SwSelMgr = SwModel.SelectionManager

      Set SwDraw = SwModel

   Dim SwDispDim As DisplayDimension, SwDim As Dimension

      Set SwDispDim = SwSelMgr.GetSelectedObject5(1)

      Debug.Print SwDispDim.GetDimension.FullName

     With SwDispDim

         .ShowParenthesis = True

            ' text orientation using the Custom Text Position options ????????

     End With

     ''

   Dim SwAnn As Annotation

      Set SwAnn = SwDispDim.GetAnnotation

      With SwAnn

             '' text orientation using the Custom Text Position options ???????

      End With

   

End Sub

Solidworks API: How to change Dimension text - DASSAULT: SOLIDWORKS 3D Design - Eng-Tips

http://www.eng-tips.com/viewthread.cfm?qid=240157