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.

Please help me: `deterministicIds` DO NOT in ALL ids returned by `qeverything()`

jiahao_lee103jiahao_lee103 Member Posts: 3

I want to convert deterministicIds(in feature list) into query and then parse it. The conversion code is as follows:

body = {
"script":
"function(context is Context, queries) { "
" const _ = qEverything();"
" const all_q = evaluateQuery(context, _);"
" var target_q = -1;"
" return transientQueriesToStrings(all_q);"
" for (var i = 0; i < size(all_q); i += 1) {"
" if (\"%s\" == all_q[i].transientId) {" % tid +
" target_q = all_q[i];"
" }"
" }"
#parse ...
"}",
}
res = self._api.request("post", "/api/v10/partstudios/d/" + did + "/w/" + wid + "/e/" + eid + "/featurescript",
body=body)
res_ = res.json()["result"]["value"]

But I found that the deterministicIds in chamfer or fillet cannot be found in this way, so I can't resolve the edges or faces referenced by chamfer or fillet operations. Why does this happen? How should I solve this problem?

Below is a snippet from the feature list, which contains the entity IDs referenced by chamfer and fillet.

..
"name" : "Fillet 1",
"suppressed" : false,
"parameters" : [ {
"btType" : "BTMParameterEnum-145",
"namespace" : "",
"nodeId" : "s0mNttKDQSsG0DyB",
"enumName" : "FilletType",
"value" : "EDGE",
"parameterId" : "filletType"
}, {
"btType" : "BTMParameterQueryList-148",
"queries" : [ {
"btType" : "BTMIndividualQuery-138",
"queryStatement" : null,
"queryString" : "query=qCompressed(1.0,\"%B5$QueryM5S12$disambiguationDataA1M2S12$disambiguationTypeS13$ORIGINAL_DEPENDENCYS9$originalsA1C0M5Sa$entityTypeBa$EntityTypeS4$EDGESb$historyTypeS8$CREATIONSb$operationIdB2$IdA1S11.6$FGOtGUnjjNTgkPK_0wireOpS9$queryTypeSd$SKETCH_ENTITYSe$sketchEntityIdSc$KfxfNm3nASbMR4C6S4$FACER6R7R8CbA1S11.9$FNJb7sDs7ut4Qgu_0opExtrudeRbSa$SWEPT_FACE\",id);",
"deterministicIds" : [ "JIq" ],
"nodeId" : "FYOJEjM52q5B5zT"
} ], .. "name" : "Chamfer 1",
"suppressed" : false,
"parameters" : [ {
"btType" : "BTMParameterQueryList-148",
"queries" : [ {
"btType" : "BTMIndividualQuery-138",
"queryStatement" : null,
"queryString" : "query=qCompressed(1.0,\"%B5$QueryM5S12$disambiguationDataA1M2S12$disambiguationTypeS13$ORIGINAL_DEPENDENCYS9$originalsA1C0M5Sa$entityTypeBa$EntityTypeS4$EDGESb$historyTypeS8$CREATIONSb$operationIdB2$IdA1S11.6$FGOtGUnjjNTgkPK_0wireOpS9$queryTypeSd$SKETCH_ENTITYSe$sketchEntityIdSc$KfxfNm3nASbMR4C6S4$FACER6R7R8CbA1S11.9$FNJb7sDs7ut4Qgu_0opExtrudeRbSa$SWEPT_FACE\",id);",
"deterministicIds" : [ "JHW" ],
"nodeId" : "Fa7FuglbD6nZMi2"
}, {
"btType" : "BTMIndividualQuery-138",
"queryStatement" : null,
"queryString" : "query=qCompressed(1.0,\"%B5$QueryM5S12$disambiguationDataA1M2S12$disambiguationTypeS13$ORIGINAL_DEPENDENCYS9$originalsA2C0M5Sa$entityTypeBa$EntityTypeS4$EDGESb$historyTypeS8$CREATIONSb$operationIdB2$IdA1S11.6$FGOtGUnjjNTgkPK_0wireOpS9$queryTypeSd$SKETCH_ENTITYSe$sketchEntityIdSc$9delQkV37VSqC0M5R4R5R6R7R8RaRbRcRdSc$JMwbFu0nRJJBR4R5R6R7R8CbA1S11.9$FNJb7sDs7ut4Qgu_0opExtrudeRbSa$SWEPT_EDGE\",id);",
"deterministicIds" : [ "JHF" ],
"nodeId" : "Fzp1jM2lf3yf1Uj"
} ], ..

Sign In or Register to comment.