AnsweredAssumed Answered

How to determine the number of multiple dimension ?

Question asked by Yong Ning on Mar 28, 2016
Latest reply on Mar 29, 2016 by Yong Ning

Select Many Dimension

a.jpg

 

 

Follow code → Choose several dimension line。

Question is see follow picture

 

 

a1.jpg

 

 

Help me. How to determine the number of multiple dimension ?

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

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)

       Set SwDim = SwDispDim.GetDimension

       Debug.Print SwDim.Name, SwDim.FullName

       Set SwDispDim = SwSelMgr.GetSelectedObject5(2)

       Set SwDim = SwDispDim.GetDimension

       Debug.Print SwDim.Name, SwDim.FullName

       Set SwDispDim = SwSelMgr.GetSelectedObject5(3)

     

       Set SwDispDim = SwSelMgr.GetSelectedObject5(4)

       Set SwDim = SwDispDim.GetDimension

       Debug.Print SwDim.Name, SwDim.FullName

       Stop

     

       Stop

End Sub

 

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

Attachments

Outcomes