Hi,
I am new to API. I would like to know how to run automatically the intersection of lines and surface with points
As seen from the pics, I plotted an archimedes spiral, plot the lines vertically up the z-direction, then managed to plot the intersection of the surface. I used the record function then run the loop. However, the macro only intersect one face. I tried to use the surface-knit feature to make the faces to be one face, but was unable to run the loop however. Can anybody help me?
Part of the macro is this:
_________________________________________________________________________________________
For i = 1 To (pointCount - 1)
lin = "Line" & CStr(i) & "@3Dsketch31"
x1Value = sketchPointArray(i).X
y1Value = sketchPointArray(i).Y
z1Value = sketchPointArray(i).Z
Set skPoint = Part.SketchManager.CreatePoint(0.015273, 0.007649, 0#)
boolstatus = Part.Extension.SelectByID2(lin, "EXTSKETCHSEGMENT", 0#, 0#, 0#, True, 0, Nothing, 1)
boolstatus = Part.Extension.SelectByID2("Surface-Knit1", "FACE", 0.014424551047, 0.008505751521099, 0.009999999999991, True, 0, Nothing, 1)
Part.SketchAddConstraints "sgATINTERSECT"
Part.ClearSelection2 True
Next i
Part.SketchManager.Insert3DSketch True
End Sub
_________________________________________________________________________________________________
SolidworksApi macros