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.
How can I uniquely identify copied parts when performing a "copy workspace" through the API?
ethan_keller924
Member, csevp Posts: 42 PRO
Say I have a PS in my original document named "A". Now I want to copy my workspace and point to PS "A" within the new document. Is my only option to sort through the names and find the matching name? How can I positively know that new PS "A" is referring to the same PS as old PS "A"... essentially I want a map that relates all the old document PS element ids to the new PS element ids. Is there a simple way to generate this without using the user-settable names? (That would be a bad choice because the element name namespace allows duplicate names.)
Tagged:
0
Best Answer
-
raj_Onshape Onshape Employees Posts: 110Currently copy workspace doesn't return the mapped entities. Each part studio/assembly name is faithfully copied to the target document. So are each part names within a part studio. So you can use the tab name to map to the correct tab and within a tab use part name to map the part. All this depends having unique tab names within a document and unique parts within a tab.
Alternatively you can use additional metadata like description or title set globally unique on all tabs/parts to disambiguate.5
Answers
Alternatively you can use additional metadata like description or title set globally unique on all tabs/parts to disambiguate.