Quantcast
Channel: Adobe Community : Unanswered Discussions - Illustrator
Viewing all articles
Browse latest Browse all 41949

How to select needed objects [CS6-JSX]

$
0
0

i try to move all particular objects to new layer

so first i try to select items by strokeWidth.

 

var mDoc = app.activeDocument;
var allObject = mDoc.pathItems;for(i=0; i<allObject.length; i++){    if (allObject[i].strokeWidth==0.17599999904633) allObject[i].selected=true;

but receive nothing selected.

i assign stroke to needede objects as 0.176 pt. OK. Then try to see this parameter of one, being selected, through script

 

$.writeln(mDoc.selection[0].strokeWidth);

and receive this long number 0.1759999....

but when i use this number in codeline (see above), nothing is being selected. Why?

 

After this i tried to select by color

$.writeln(mDoc.selection[0].strokeColor);

but can't get color, exept "CMYK model". So how can i select objects by stroke color?

 

thanks!


Viewing all articles
Browse latest Browse all 41949

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>