Copy link to clipboard
Copied
In this scenario, I managed to delete this point by setting a note for it and then finding it by searching among pageItems.
Nevertheless, it is also interesting to know other solutions.
Copy link to clipboard
Copied
@andyf65867865 - Could you please share code what exactly you are processing. Tried the following snippet based on your steps and it works well
var _doc = app.activeDocument;
var _layer = _doc.layers.add();
var _point = _doc.pathItems.ellipse(0, 0, 30, 30);
app.executeMenuCommand('cut');
app.executeMenuCommand('paste');
app.executeMenuCommand('deselectall');
_point.selected = true;
_point.remove();
Copy link to clipboard
Copied
Hi @Charu Rajput, please try this.
(function() {
var doc = app.activeDocument;
var newLayer = doc.layers.add();
var point = doc.pathItems.ellipse(0, 0, 1, 1);
point.filled = true;
var whiteColor = new CMYKColor();
whiteColor.cyan = 0;
whiteColor.magenta = 0;
whiteColor.yellow = 0;
whiteColor.black = 0;
point.fillColor = whiteColor;
point.stroked = false;
app.executeMenuCommand('Find Fill Color menu item');
app.executeMenuCommand('cut');
app.executeMenuCommand('pasteFront');
app.executeMenuCommand('deselectall');
point.selected = true;
point.remove();
})();
It seems that it is the 'Find Fill Color menu item' followed by cut & paste that is causing this error.
Copy link to clipboard
Copied
In this scenario, I managed to delete this point by setting a note for it and then finding it by searching among pageItems.
Nevertheless, it is also interesting to know other solutions.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now