Copy link to clipboard
Copied
Hi guys, I have been puzzled by this for a couple of days. I've made a script that shows the position of selection and Mark pointed out my Y position was negative. I have CS5 at work and CS4 at home and both versions worked right, but I just noticed that my CS5 (0,0) is at bottom left, just like CS4, doesn't CS5 have it at top/left? both artboard and global rules are at bottom/left here.
I made a small script to test moving a path item, moving down supposed to be positve in CS5, negative in CS4.
#target Illustrator
var idoc = app.documents.add();
var iab = idoc.artboards[0];
var ipath = idoc.pathItems.rectangle(100,0,100,100);ipath.top = ipath.top+20;
ipath.left = ipath.left+20;$.writeln("abRect (0) = " + iab.artboardRect[0]);
$.writeln("abRect (1) = " + iab.artboardRect[1]);
$.writeln("abRect (2) = " + iab.artboardRect[2]);
$.writeln("abRect (3) = " + iab.artboardRect[3]);$.writeln("Ruler Origin (0) = " + idoc.rulerOrigin[0]);
$.writeln("Ruler Origin (1) = " + idoc.rulerOrigin[1]);
the script makes a square that "sits" at bottom/left of the artboard, then moves 20 positive. Results as shown moved the square up.
Can you guys test and compare to mine to see if you get the same?
this is what gets printed in the ESTK console
abRect (0) = 0
abRect (1) = 792
abRect (2) = 612
abRect (3) = 0
Ruler Origin (0) = 0
Ruler Origin (1) = 0
Result: undefined
is my CS5 behaving like CS4? is it possible I changed somehow my ruler origin to bottom/left?
thanks for your help
Copy link to clipboard
Copied
When CS5 first came out some people balked at the change in the origin. There was an editing hack to the preferences, something to do with changing the quadrant.
Try looking here
http://forums.adobe.com/thread/645926
Copy link to clipboard
Copied
Carlos, welcome to headache… I can't work it out…
$.writeln(app.coordinateSystem);
Always returns 'CoordinateSystem.DOCUMENTCOORDINATESYSTEM' no matter if Im using artboard or global rulers… I can't find a purpose for it…?
Strangely your…
var idoc = app.documents.add();
Creates a doc where 0,0 is bottom/left like of old… Yet using the GUI to make a new doc is always top/left…
app.activeDocument.pathItems.rectangle(100,0,100,100);
Works as yours with your scripted new document creation… but is off the top of the page with a doc already open…
Trying to work this out wrecked both my head and a weekend… Gave up and went for a pint and watch the football instead…
Both artboard & global rulers 0,0 stays top/left in a doc I create in the GUI yet it jumps top/left to bottom/left on a doc created by script…
If you get to work any sort of sense of it do lit me know and put me out of my misery…
Copy link to clipboard
Copied
Hi Mark...sorry about ruining your head/weekend...
very strange findings....but very much inline with Illustrator's confusing ways. I'm at home with CS4, so I hope to have some time to play with it a little tomorrow at work.
I remember replying to questions about how the origin went from bottom/left to top/left, but I can't seem to remember if my own copy of CS5 has always been like this or I accidentally changed it.
thanks for trying, I'll let you know how it goes
Copy link to clipboard
Copied
Carlos, you didn't wreck my weekend adobe did with this… They didn't even include any useful examples when they made this change all the same old stuff… It would be better if all new stuff added came with real life examples of usage… Or is that just too much to hope for…? As it is City beat that other lot so all was well…
Copy link to clipboard
Copied
I know why they didn't include how to examples...cos they know when things don't work...hahaha. Hey if Microsoft does it all the time, why not.
Besides, we already said that Illustrator programming team don't actually use Illustrator.
Copy link to clipboard
Copied
Hi Larry, thanks for the info. I checked the pref file but didn't make any changes...today was crazy busy day at work. I'll test it and report back.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now