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

dave_cowden
dave_cowden Member, Developers Posts: 484 ✭✭✭
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_carr
    john_f_carr Onshape Employees Posts: 74 image
    I see a close comment after your opExtrude.  Is it commented out?
  • dave_cowden
    dave_cowden Member, Developers Posts: 484 ✭✭✭
    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_baran
    ilya_baran Onshape Employees, Developers, HDM Posts: 1,279 image
    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_cowden
    dave_cowden Member, Developers Posts: 484 ✭✭✭
    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.