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.

What would cause a qCreatedBy query right after opExtrude not to find anything?

dave_cowdendave_cowden Member, Developers Posts: 470 ✭✭✭
I have this code:
            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?

Answers

  • john_f_carrjohn_f_carr Onshape Employees Posts: 74
    I see a close comment after your opExtrude.  Is it commented out?
  • dave_cowdendave_cowden Member, Developers Posts: 470 ✭✭✭
    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.
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,173
    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 Inc
  • dave_cowdendave_cowden Member, Developers Posts: 470 ✭✭✭
    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.
Sign In or Register to comment.