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.
Is it possible to write a featureScript that deletes parts depending on their name?
timo_schmid
Member Posts: 36 EDU
I didn't find any query that depends on the name of a part, so I was wondering if it is possible to delete parts depending on their name with a FeatureScript?
Thank you,
Timo
Thank you,
Timo
Tagged:
0
Best Answer
-
NeilCooke Moderator, Onshape Employees Posts: 5,675Not by name because you cannot read properties, only write. You could have another feature which tags parts with attributes that your delete feature could read and then delete the associated body.Senior Director, Technical Services, EMEAI5
Answers
Is there a possibility that some day we will be able to get a body by Name? There are a lot of cases where this would be helpful.
thanks
Honestly I think multiple bodies able to share the same name is a good feature. Worst part about other CAD is you need to rename files in a specific way to make sure there are never two files of the same name. Lest you open an older assembly at the same time. Now all of your parts got replaced anb broke your assembly.. (stupid solidworks.)
Code relying on part/body name is a proven problem that i'm thankful Onshape didn't repeat.