AnsweredAssumed Answered

How to determine the vertical size, or horizontal size.

Question asked by Yong Ning on Feb 28, 2017
Latest reply on Jun 30, 2017 by Yong Ning


follow code, don't determine oriate.


Private Sub ll1()

   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

   Dim SwAnn As Annotation

       Set SwDispDim = SwSelMgr.GetSelectedObject5(1)

       With SwDispDim

           Debug.Print .VerticalJustification, .HorizontalJustification

           Set SwDim = .GetDimension

           Set SwAnn = .GetAnnotation

           Set Ss = SwDim.ExtensionLineDirection

       End With

       SwModel.ForceRebuild3 True

End Sub






Get Display Dimension Type - API | SOLIDWORKS Forums