Mobile app version of vmapp.org
Login or Join
Courtney577

: Does the isIsolated property have something to do with the isolation mode in Illustrator? As a follow up to this answer, I was able to select the innermost group via a script on Illustrator,

@Courtney577

Posted in: #AdobeIllustrator #IllustratorScripting

As a follow up to this answer, I was able to select the innermost group via a script on Illustrator, but I'd like to enable the isolation mode for that group too. So that I don't have to double-ckick on all the hierarchy of parent groups to get to the one I want to "isolate".

In the the Adobe Illustrator CC 2017 Reference (JavaScript) they mention the property isIsolated but I can't enable the isolation mode by setting the property to true.

What is the isIsolated property supposed to do?

Can it be used to enable the isolation mode for some particular group?

This is the script to make the parent group isolated.

if ( app.documents.length > 0 ) {
var doc = app.activeDocument;

if ( typeof doc.selection[0] !== 'undefined') {
var parent = doc.selection[0].parent;

if ( parent !== doc.selection[0] && typeof parent.layer !== 'undefined') {
parent.isIsolated = true;
alert(parent.isIsolated)
//doc.selection = parent;
}
}
}

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Courtney577

1 Comments

Sorted by latest first Latest Oldest Best

 

@Gail6891361

Generally having a name like is* means that the attribute is meant for checking. So isIsolated would generally be called just isolated if it were meant to be used in a read and write context, like hidden, locked selected.

This is pretty simple to test though, far simpler and faster than to ask random strangers on interweb. So open ExtendScript Toolkit, and Illustrator. Create a new document in illustrator and populate it with a few objects. Then type following in ExtendScript toolkit:
#target illustrator

var obj = app.activeDocument.pathItems[0];
alert(obj.name + "nIsolated: " + obj.isIsolated);
obj.isIsolated = true;


And asa result i can say: No, isIsolated does not do much anything. In fact it does not even seem to indicate object is in isolation mode.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme