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.

Translation to SOLIDWORKS: how to match partid to the "ONSHAPE_ORIGINALBODY_ID" field?

Dev_LoppementDev_Loppement Member Posts: 1
I'm trying to minimize the stress on the API during a complex export in SOLIDWORKS by grouping multiple translations from the same PartStudio into one call with multiple partids. Problem: the resulting .sldprt contains one body per partid but I don't see any way to map a partid to its corresponding body. I guess the ONSHAPE_ORIGINALBODY_ID metadata field can help but I don't know how.
Example: I request a conversion to SOLIDWORKS for partids KFTD, KFHB and KFXB from a given PartStudio and retrieve a .sldprt with three bodies with ONSHAPE_ORIGINALBODY_ID values 177222, 88735 and 286415. Which is which?


Answers

  • Ethan_KEthan_K Member, Onshape Employees Posts: 57
    It looks like the ONSHAPE_ORIGINALBODY_ID field actually has no relation to those partIds. It is generated internally and has no relation to the Onshape side of things. As for determining which part is which, we currently have no fool-proof way for you to do this. Our best suggestion is to use the part names - those should come through. And if two parts are named the same thing, perhaps you could fall back to compare the bounding box to disambiguate the two. Sorry I don't have a better answer!
Sign In or Register to comment.