Remove last Object from RAddObjectsOperation
Posted: Sat Nov 02, 2024 1:33 am
Hello!
In my script i am creating a blockreference. Afterwards i have do to some geometrical checks. If they fail I want to remove it. But as i have not applied the transaction I can not use the delete command. Furthermore i have to do the operation many times and to add with the transaction and then delete with transaction would make the script slow.
So here a the code part:
I suppose my wording is not the right one, but thats is the level of my understanding until now.
thanks and greets
In my script i am creating a blockreference. Afterwards i have do to some geometrical checks. If they fail I want to remove it. But as i have not applied the transaction I can not use the delete command. Furthermore i have to do the operation many times and to add with the transaction and then delete with transaction would make the script slow.
So here a the code part:
Code: Select all
var di = this.getDocumentInterface();
var op = new RAddObjectsOperation();
op.addObject(blockRef)
.... to some testing
if (test fails) {
here i would like to "undo" the addOject of the BlockRef
}else{
some other stuff happens here
}
di.applyOperation(op);
thanks and greets