Identifying entities recently added
Posted: Wed Feb 05, 2014 12:29 pm
Hello,
I'm modifying the Line2p.js scritp since I would like to create a new tool able to create automatically a new block built with a closed polygon.
To create the block I need to know the entities which forming the closed polygon.
Is there a way to know the ids of these entities?
I see that the entity is created in the getOperation method, but I suppose that the id of the entity will be assigned after the RAddObjectOperation completion, since here the id is still -1
Thanks
sramp
I'm modifying the Line2p.js scritp since I would like to create a new tool able to create automatically a new block built with a closed polygon.
To create the block I need to know the entities which forming the closed polygon.
Is there a way to know the ids of these entities?
I see that the entity is created in the getOperation method, but I suppose that the id of the entity will be assigned after the RAddObjectOperation completion, since here the id is still -1
Code: Select all
Line2P.prototype.getOperation = function(preview) {
var line = new RLineEntity(
this.getDocument(),
new RLineData(this.point1, this.point2)
);
return new RAddObjectOperation(line);
};
sramp