0 Replies Latest reply on Jun 13, 2017 7:46 AM by Uma S.

    how to get vertex of sketch inserted using Tools->Block->insert .i need api code for this.please help

    Uma S.

      Hi I need code for get coordinates of sketch. to calculate width and hight of unknown sketch using coding.sketch inserted using Tools->Block ->insert(dxf file)


      I tried api function



      Set swApp =  CreateObject("SldWorks.Application")

      Set Part = swApp.ActiveDoc

      Set theSketch  = Part.GetActiveSketch2


      sketchPointArray  = theSketch.GetSketchPoints2

      pointCount =  UBound(sketchPointArray) + 1



      this throughing error