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

How do I get the position of the selected PathItem in pixels ?

$
0
0

Hi,

 

I have a simple problem, but can't seem to find my way around it:

 

I have PathItem and Illustrator points out that it is at position (781px,250px).

How can I get those values in jsx ?

 

I've noticed that the PathItem inherits the position property from PageItem, and position

is a point, but when I try prining the values, I get undefined:

 

$.writeln(app.activeDocument.selection[0].position.x);

 

If I leave out .x from the line above I get this printed in the console:

 

521,510

 

What are these values ? Are they x,y coordinates ? In what unit ? How can I convert to pixels ?

Why can I not access x,y/top,left properties (always get undefined) ?

 

I'm using Illustrator CS5.


Viewing all articles
Browse latest Browse all 12845

Trending Articles



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