AnsweredAssumed Answered

CreateLine2,How to use AutoDimension2

Question asked by Yong Ning on May 6, 2016
Latest reply on May 6, 2016 by Murat Aksoy

0.jpg

 

 

 

follow code ,

Set SwSketchSeg = SwModel.CreateLine2(0, 0, 0, 0, 0.01, 0) → SwsketchSeg is Nothing

 

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

 

Private Sub ll()

   Dim SwApp As SldWorks.SldWorks, SwModel As ModelDoc2

       Set SwApp = Application.SldWorks

       Set SwModel = SwApp.ActiveDoc

   Dim SwSelMgr As SelectionMgr, Tmp

       Tmp = SwModel.Extension.SelectByID2("Top Plane", "PLANE", 0, 0, 0, False, 0, Nothing, 0)

       ''

   Dim SwSketchSeg As SketchSegment

       Set SwSketchSeg = SwModel.CreateLine2(0, 0, 0, 0, 0.01, 0)

 

 

       SwSketchSeg.Select True

       Stop

       Stop

       Stop

      

      

End Sub

Outcomes