For the Geometry you provided and other things which are simple vertical extrusions, I managed to extract the correct data. I didn’t bother to try and query the sketch lines as I didn’t have to in this case. Instead I am relying on the fact that every element you provided used the same sketch plane - the level, and that anything with a normal Z value equal to -1 will be the bottom of the element’s geometry, which as noted is the sketch plane of the element and therefore it’s perimeter is made up of the sketch lines. Try this in a code block:
Surfs.NormalAtParameter(0.5, 0.5).Z ==
This may help you today, but this is still worth reviewing, as I think that the “real” solution is likely one which:
- Opens up each family,
- Gets all geometry elements,
- Pulls the sketch lines from the elements,
- Recreates those lines in the project environment with appropriate transformations and location to match the family itself.
Step 1 isn’t fun and can cause issues, step 2 is painful as it requires switching to family environment which causes issues, step 3 is painful as each type of geometry creation is unique which causes issues, and step 4 is problematic as you’re dealing with curtain panel families which cause issues. For those keeping score at home that issuesissuesissues*issues or issues^4, which I why I’m going to sidestep that problem.