After selecting a line I need to find the Feature that the line belongs to. What class/method can I use to extract this?
If you are interested in my motivation keep reading. I have a solid body (with lots of variation in thickness, not a single flat portion) that has lots of shapes projected onto it (hundreds). I need to break the surface apart into the constituent shapes that are projected onto the surface. Manually I do a law extension, selecting the surface and a single closed loop sketch that is projected onto the surface, then I do a split body, selecting the previous law extension and the solid body. I repeat these steps for each closed sketch on the surface.
I thought it might speed things up to have a tool that does the repetitive stuff and I can just select the next closed sketch when needed. I recorded a journal file that does the steps, but the specific curves, surfaces, features ... are populated, along with an excess amount of un-needed commands.
For the law extension, I need a line of the closed sketch along with the feature that contains the line. I have a journal for selecting the line, but now I need to get the associated feature.
Thanks for any help. I am also open to better ideas for this process. If this goes well, I would like to extend the program to create a new part and wave link in the newly formed body, save it and also export a step file. But first things first.