Hi All,
First off I am new to the Solidworks API. I am working on a VBA macro that takes dxf polyline data and converts them to extrusions. I want to do this since Solidworks can't import a polyline with width and instead just makes a single line. So far I have been able to create the closed curves for each polyline (see attached image).
The problem I am having is turning this sketch into an extrusion since it contains overlapping curves. I can extrude this manually in Solidworks by selecting each closed region or contour. I have recorded a macro to try to understand how this works, but I can seem to choose the correct X and Y points to make SelectByID2 using "SKETCHCONTOUR" work correctly. I have tried placing each closed contour in a seperate sketch then extruding them individually which works but takes hours for thousands of sketches. How would I automate contour selection using VBA or is there an easier way to create a single extrusion from multiple closed and intersecting contours?
Thanks!
Chris
SolidworksApi macros