0 Replies Latest reply on Aug 14, 2017 2:03 PM by Greg James

    Any way to automate PowerTrim "drag over segments to delete"

    Greg James

      I have intersecting sketch contours.  In my custom Addin, I'd like to create the CSG union of all of them, but I don't see any API for this.

      Instead, I can manually use PowerTrim to delete the internal segments.  With PowerTrim, I click and drag on the inside, crossing over the segments to delete, and everything works out great.  Problem is, I see no API to automate this "drag over segments to delete them." aspect of PowerTrim.  

       

      I've recorded a macro of my manual PowerTrim, but this calls out the segments explicitly by their name and a coordinate.  SolidWorks is cheating by not showing me how it has found the segments from my click-drag.

       

      I would like an API that lets me start a PowerTrim and provide a list of coordinates to use as the mouse drag path.  Actually, I'd prefer even the barest minimum of an API for doing CSG operations on sketch elements, but short of this, any way to automate the PowerTrim would work.

       

      Got any tips?

      Thanks