AnsweredAssumed Answered

Macro for converting curve entity within a sketch

Question asked by Bill Bigbee-Hansen on Nov 17, 2019
Latest reply on Nov 17, 2019 by Bill Bigbee-Hansen

I have been developing a tool that will read propeller blade section data into SW and creating a blade.  I have automated the section reference planes, curves and sketches.  What I am trying to do is select the curve data within a sketch and use the convert entity function within a macro.


The following code is in a loop which processes each section of the blade (radii)

' create sketches at section planes and convert curves
   swModel.ClearSelection2 True
   section_sk = sections(i) & "sk"
   Set swFeat = swSketch
   boolstatus = swModel.Extension.SelectByID2(section_pl, "PLANE", 0, 0, 0, False, 0, Nothing,      swSelectOption_e.swSelectOptionDefault)
   swSketchMgr.InsertSketch True
   Set swSketch = swModel.GetActiveSketch2
   Set swFeat = swSketch
   swFeat.Name = section_sk
   bRet = swModel.Extension.SelectByID2(section_cv, "REFERENCECURVES", 0, 0, 0, False, 0, Nothing, 0)


need to somehow use the sketch object with the selected curve object.