Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

make pathItems line extend all way to top and bottom like when dragged from left ruler

$
0
0

I have a path item, I want it to extend all the way to the top of the doc and to bottom of doc like when you drag out from left rule. I have a script that creates a vertical line and converts it to guide, but no idea how to get it to behave like native guide.

 

if ( app.documents.length > 0 ) {    var doc = app.activeDocument;    var line = doc.pathItems.add();    var center = doc.width/2;    line.setEntirePath( Array( Array(center, 0), Array(center, doc.height) ) );    line.guides = true;
}

Viewing all articles
Browse latest Browse all 12845

Trending Articles



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