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.
Evaluate FeatureScript(Onshape Api). The TransientId for a newly created plane.
max_borsh
Member, Developers Posts: 14 ✭
Hi Everybody.
I want to create an extrude feature by using Onshape Api.
So, there is a great example at Depeloper portal (Feature list API -> Example 3).
But there is a way that describes how to create sketch on the pre-defined front plane. What about creating the custom one?
As far as I understand, I have to get the transientId by evaluating FeatureScript request and then use it while creating new sketch feature by passing this Id as parameter:
I want to create an extrude feature by using Onshape Api.
So, there is a great example at Depeloper portal (Feature list API -> Example 3).
But there is a way that describes how to create sketch on the pre-defined front plane. What about creating the custom one?
As far as I understand, I have to get the transientId by evaluating FeatureScript request and then use it while creating new sketch feature by passing this Id as parameter:
<pre class="CodeBlock"><code>{ "feature" : { "type": 151, "typeName": "BTMSketch", "message": { "entities": [...], "constraints": [...], "parameters": [ { "type": 148, "typeName": "BTMParameterQueryList", "message": { "queries": [ { "type": 138, "typeName": "BTMIndividualQuery", "message": { "geometryIds": [ "JCC" // here it is ]... }So I tried to create a new plane through invoking evaluate FeatureScript request (sending a script) like this:
script = "function(context is Context, queries is map){ // I couldn't get Id as parameter. opPlane(context, id + "plane1", { "plane" : plane(vector(0, 0, 0) * inch, vector(0, 0, 1)), "width" : 10 * inch, "height" : 10 * inch }); return transientQueriesToStrings(evaluateQuery(context, qCreatedBy(id + "plane1", EntityType.FACE))); }",
But I couldn't get Id for this function. Is the way how can I get transientId for a newly created custom pane?
Same question about Determining Origin GeometryId for custom vector..
Thank you in advice!
Same question about Determining Origin GeometryId for custom vector..
Thank you in advice!
0
Answers