Removing an image entity
Posted: Tue May 13, 2014 8:51 am
Hello dear friends.
I add an image entity to my map using this code :
Suppose that entId is a unique key associated to each ImageEntity and TickImageEntites is something like this :
Then I want to remove all of this image entities inside TickImageEntites using this code :
But my code doesn't work at all! What the problem. thanks.
I add an image entity to my map using this code :
Code: Select all
var i = new RImageEntity(
document,
new RImageData("scripts/MyScripts/tick.png",
new RVector(0,0),
new RVector(1,0),
new RVector(0,1),
50, 50, 0)
);
documentInterface.setRelativeZero(point);
i.setWidth(2);
i.setHeight(2);
i.setInsertionPoint(point);
TickImageEntites[entId] = i;
Code: Select all
var TickImageEntites = {};
Code: Select all
for (var k in TickImageEntites) {
QMessageBox.information(0,"msg", "id:"+k);
var op = new RDeleteObjectOperation(TickImageEntites[k], false);
di.applyOperation(op);
}