• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

isValid layer?

Engaged ,
Jun 04, 2018 Jun 04, 2018

Copy link to clipboard

Copied

  var myEmboss = app.activeDocument.layers[0].layerColor; ///gives a number

       var myEmboss = app.activeDocument.layers[0].isValid; ////is undefined/?

So this should evaluate to true but I get undefined. Why?

TOPICS
Scripting

Views

520

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 04, 2018 Jun 04, 2018

Copy link to clipboard

Copied

isValid is a boolean check.

if(app.activeDocument.layers[0].isValid) {

           $.writeln('T');

}

It seems to be working.

See more here:

InDesign ExtendScript API (13.0)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 04, 2018 Jun 04, 2018

Copy link to clipboard

Copied

LATEST

so on it's own I tried it and it worked. I now know it is a local problem. Inside my script.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines