Scripts - deleteMe failing

Scripts - deleteMe failing

hanskellner
Autodesk Autodesk
362 Views
1 Reply
Message 1 of 2

Scripts - deleteMe failing

hanskellner
Autodesk
Autodesk

I'm trying to delete some bodies from my model but the call generates an error dialog with the message:

 

Failed : InternalValidationError : rawNeutronObject() == NULL

 

Here's the piece of code making the call:

 

for (var iBody = 0; iBody < rootComp.bRepBodies.count; ++iBody) {
  var body = rootComp.bRepBodies.item(iBody);

  if ( body.name.indexOf("_Hole_") === 0 ) {
    body.deleteMe();
    break;
  }
}

 

It looks for any body that has a name that begins with "_Hole_" and then deletes that body.

 

Is this the correct method for deleting a body?

 

Thanks.



Hans Kellner
Senior Manager, Principal Engineer
0 Likes
Accepted solutions (1)
363 Views
1 Reply
Reply (1)
Message 2 of 2

ekinsb
Alumni
Alumni
Accepted solution

Thank you for reporting this.  I can reproduce the problem and have filed a report.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes