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.

Regarding AddFeature API

Hi,
I am trying to copy a custom feature from element in source document to an element in the target document by using API Add feature with following request body. The "feature" , "serializationVersion", "sourceMicroversion" map is same as i got from running "Get feature list" api in source document. But i am getting error code 500 with message internal server issue. Please let me know if i missing something here.

{
"feature": {"typeName":"BTMFeature","type":134,"message":{"returnAfterSubfeatures":false,"featureType":"AM_RemoveParts","name":"RemoveParts","namespace":"ec83abe757a77321f2311a3a0::mc5c71376f21012bf7dcf56c9","hasUserCode":false,"suppressionState":{"type":0},"suppressed":false,"subFeatures":[],"parameters":[{"typeName":"BTMParameterQueryList","type":148,"message":{"parameterId":"rParts","hasUserCode":false,"queries":[{"typeName":"BTMIndividualQuery","type":138,"message":{"hasUserCode":false,"geometryIds":[],"nodeId":"Ft9w2Ruq4HvGv61"}}],"nodeId":"UizCThV4XlgfCm0h"}}],"nodeId":"MK0eAZQOZ6G0/KUXb","featureId":"FpCqMy9bYOeGGlN_1"}},
"serializationVersion":"1.1.18",
"sourceMicroversion":"8d24c76c2d9f6401cbae968c",
"rejectMicroversionSkew": "false"
}

Comments

  • Kirankumar_ThimmegowdaKirankumar_Thimmegowda Member Posts: 28 PRO
    It worked now after doing changes in few values. For those who are curious to know, The values changed are "namespace"(ids related to feature studio, if it is a custom feature add doc id & doc version id in addition) & "sourceMicroversion"(it is the microversion of document where feature is being added).
Sign In or Register to comment.