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.
What would cause a qCreatedBy query right after opExtrude not to find anything?
dave_cowden
Posts: 484 ✭✭✭
I have this code:
When the code runs, there are no errors, and the extrusions I am looking for are successfully created. But inexplicably, the qCreatedBy query returns no results. This is textbook extrude stuff, I've done this hundreds of time, but I've never seen a case where qCreatedBy didnt work, even when the extrude operation did.
Any ideas?
var extrudeId = id + "_extrude";
opExtrude(context, extrudeId, {
"entities" : qSketchRegion(currentLetter["sketchId"]),
"direction" : surfaceTangentPlane.normal,
"startBound" : BoundingType.UP_TO_SURFACE,
"startBoundEntity": definition.surface,
"endBound" : BoundingType.BLIND,
"endDepth" : definition.thickness
});
**/
var justExtruded = qCreatedBy(extrudeId, EntityType.BODY );
debug(context, justExtruded);
When the code runs, there are no errors, and the extrusions I am looking for are successfully created. But inexplicably, the qCreatedBy query returns no results. This is textbook extrude stuff, I've done this hundreds of time, but I've never seen a case where qCreatedBy didnt work, even when the extrude operation did.
Any ideas?
0
Answers
-
I see a close comment after your opExtrude. Is it commented out?0
-
ah, sorry, no sadly that's a copy-paste error. The objects created by the extrude are actually on the screen, so i know the extrude actually ran.0
-
I don't see the issue from the code snippet then. If you don't filter for EntityType.BODY, does debug output anything? If this is a public doc, please post a link, if not, you can share with support.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc0
-
thanks Ilya. I'll see what happens when I try not filtering.
There's a lot of code in this document, so before I have you review it I will try to reduce it to the least code that shows the issue. A little background is that the sketchregions I am extruding have been transformed just before this operation. this code has worked a ton of times for me, so this is really weird.0


