Sg2.9
js and rulers.visible
Recent RSS
js and rulers.visible
From:  danbo
Date:  30. July 2012, 16:08

Thanks for answering

Hello,

I'm trying to make the rulers visible in a script I build in JS (javascript)
I'm working on Illustrator CS 5.

After having define the document (doc), I can't make my rulers visible.

I don't find with the words (syntax) on Google, any correct answer.

doc.rulers.visible or so many approaches like that don't work.

Have I to declare a variable including the path method, like this ?

var rulers0 = doc....something else

and write

doc.rulers0.visible=true;

Thanks for that.

Re: js and rulers.visible
Date:  30. July 2012, 22:38

Within a script there is really no need to have visble rulers so I would not expect to find such an operation.

If you read the Adobe Illustrator Javascript reference (a useful thing to do) - you will find there are two properties relating to rulers

rulerOrigin array of 2 numbers
The zero-point of the rulers in the document
relative to the bottom left of the document.

rulerUnits RulerUnits Read-only.
The default measurement units for
the rulers in the document.

If Adobe don't provide it, Scriptographer cannot.

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
Boxes Flow 19.04.12