Copy link to clipboard
Copied
I can't find anything on how to script the Illustrator's grid in JavaScript. In particular I am looking for the GridLine Every setting, as in the Preferences dialogue box:
Any help greatly appreciated,
Tom
Hi Kurt,
I'm so happy - and I hope you are too - to tell you that you're wrong 🙂
I found this and it works. cm2pts is just my conversion constant for converting centimeters to points.
Copy link to clipboard
Copied
As far as I know this setting is currently not accessible to JavaScript.
Hopefully I'm wrong here.
Copy link to clipboard
Copied
Hi Kurt,
I'm so happy - and I hope you are too - to tell you that you're wrong 🙂
I found this and it works. cm2pts is just my conversion constant for converting centimeters to points.
Copy link to clipboard
Copied
I haven't tried your approach yet, but if it works I'm certainly happy that I was wrong.
Copy link to clipboard
Copied
did it update the active document's grid on your end?
updating the pref file grid did update the settings at an application level. New files will inherit the new grid settings, but documents already open will not change the grid size on my testing.
Copy link to clipboard
Copied
I meant to reply to the OP Kurt, not to your post sorry about that