0 Replies Latest reply on May 27, 2016 4:48 AM by VIGNESH NAGARAJAN

    Need to add sketch relation between sketchpoint and edge vertex

    VIGNESH NAGARAJAN

      Hello All ,

      I am new to Solidworks API . I have a small problem in sketching. I have drawn a line. I need to add relation to the line endpoint and the edge vertex. But unfortunately the relation is not adding properly. I need a guidance from you. 

       

      The code i have tried is :

      sktmgr.Insert3DSketch True

      Set skent(3) = sktmgr.CreateLine(1,0, 0, 0, 0, 0)

      bret = swDoc.Extension.SelectByID2("", "VERTEX", 0, 0, 0, False, 0, Nothing, 0)

      bret = swDoc.Extension.SelectByID2("", "SKETCHPOINT", 0, 0, 0, True, 0, Nothing, 0)

      swDoc.SketchAddConstraints ("sgCOINCIDENT")

       

      Thanks and regards,

      Vignesh N