Skip to main content
Inspiring
September 15, 2011
Answered

Stroked?

  • September 15, 2011
  • 1 reply
  • 803 views

An easy one… In AI I can check boolean properties filled & stroked but ID appears not to have these… When I test the weight it returns the last weight applied to the page item even if its now gone, not 0 as I would have expected… So is my best/only method to test the stroke color name for 'None' feel like I missed something here?

This topic has been closed for replies.
Correct answer Harbs.

Sorry for not being clearer...

You need to do something like

var NOCOLOR = doc.swatches.item(0);

I was just writing in shorthand...

1 reply

Harbs.
Legend
September 15, 2011

You need to test for BOTH a stroke weight and a color.

if(pi.strokeWeight > 0 && pi.strokeColor != NOCOLOR){

//there's a visible stroke.

}

Harbs

Inspiring
September 15, 2011

Harbs, I will check later when back at a CS5 box… as is… NOCOLOR is undefined…

Harbs.
Harbs.Correct answer
Legend
September 15, 2011

Sorry for not being clearer...

You need to do something like

var NOCOLOR = doc.swatches.item(0);

I was just writing in shorthand...