Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Featurescript - query/delete all sketches
leon_poot
Member, Developers Posts: 87 ✭✭✭
I want to clean up my Part Studio, so that when I derive it in another (using opMergeContexts in FeatureScript) I don't get all the sketches and points and all, but I do want to import all parts and surfaces at once.
Either I can query these one by one, calling opDeleteBodies on all the queries, but I'd really like a smoother version where I don't select these by hand, but automatically query them.
Can anybody point me in the right direction for querying all sketches at once?
Either I can query these one by one, calling opDeleteBodies on all the queries, but I'd really like a smoother version where I don't select these by hand, but automatically query them.
Can anybody point me in the right direction for querying all sketches at once?
"A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools." - Douglas Adams, Mostly Harmless
Tagged:
0
Best Answer
-
lana Onshape Employees Posts: 704@NeilCooke It would still leave behind sheet bodies created by sketch. One can use
evOwnerSketchPlane() to filter for sketch objects, but in next release there'll be qSketchFilter() making it easier.
5
Answers
evOwnerSketchPlane() to filter for sketch objects, but in next release there'll be qSketchFilter() making it easier.
It gives a different number of bodies in the result, don't know why, but it works.
Edit: although using the profiler I see yours is faster due to not testing solid bodies.
I tend to think of only solids when I see "BODY", so I took some unnecessary detours in my code without thinking.