Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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_schmidtimo_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

Best Answer

Answers

  • jacob_corder805jacob_corder805 Member Posts: 1
    @NeilCooke

    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
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,675
    Ideally. There are a lot of technical reasons why we don’t allow this currently, but may be sometime in the future. 
    Senior Director, Technical Services, EMEAI
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,935 PRO
    You can have multiple bodies with the same name. So that is probably the biggest problem with exposing that ability to us. It could be misused by naive coders and cause a lot of odd behavior that the forum or Onshape support would need to troubleshoot. 

    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. 
Sign In or Register to comment.