Copy link to clipboard
Copied
I have a lot of live paint objects in a document and would like to loop through and expand them, but there is no option for "Select > Object" in the menu. I looked through documentation and only found 2 mentions of livepaint, but neither for detection, and are only related to to Tracing Options. Anyone know if this is possible with scripting?
Looping has been problematic recently causing my scripts to run too long. I had one that was looping through 30,000+ page items that took over 15 minutes to check visibility, and delete invisible objects.
I found recently, that I don't even need to loop through, it's as simple as:
app.executeMenuCommand ('selectall');
app.executeMenuCommand('Expand Planet X');
I've been using select all with a bunch of other commands like outline stroke and text, and it saves a lot of time.
Copy link to clipboard
Copied
sure, Live paint objects are "pluginItems" also known as Planet x objects
var idoc = app.activeDocument;
var livepaintObject = idoc.pluginItems[0];
livepaintObject.selected = true;
app.executeMenuCommand('Expand Planet X');
Copy link to clipboard
Copied
Maybe when Live Paint was first invented, it was thought to be such an advanced feature that it was "far out", as "in outer space". Who knows, but I'm curious
Copy link to clipboard
Copied
me too, aren't we programmers encouraged to give our objects more descriptive names? it'll be great to know how did planet x came about.
Copy link to clipboard
Copied
Once again saving the day! I will try this out. I think that we need to come together as a community and crowd fund documentation of the more obscure features of Illustrator Scripting. Otherwise, I'm going to continue to ask stupid questions to the community, in hope of building a database of answers. The Adobe documentation that does exist is helpful, but is limited, and in current day doesn't allow copy/paste without unlocking.
Copy link to clipboard
Copied
I think this forum's it.
Copy link to clipboard
Copied
Looping has been problematic recently causing my scripts to run too long. I had one that was looping through 30,000+ page items that took over 15 minutes to check visibility, and delete invisible objects.
I found recently, that I don't even need to loop through, it's as simple as:
app.executeMenuCommand ('selectall');
app.executeMenuCommand('Expand Planet X');
I've been using select all with a bunch of other commands like outline stroke and text, and it saves a lot of time.