Answered
How do I adjust 'Document Setup' units to mm using Javascript in Illustrator?
- October 13, 2020
- 3 replies
- 2514 views
Hi,
I cant seem to find this in the documentation. I would like to change the Document Units to mm after I have created it using Javascript. Does anyone know how to do this?
I have figured out how to do this in the app preferences but I would like to do this in the document setup. Changing it in the app preferences isn't displaying it properly in properties panel.
Here's the start of my set up function -
function setUp() {
var newDocument = app.documents.add(DocumentColorSpace.CMYK, 842, 595, 2, DocumentArtboardLayout.GridByCol, 40, 3);
docRef = app.activeDocument;
//HERE I WANT TO ADJUST THE DOCUMENT UNITS TO MM
}
Please see attached screenshot to see the units I am trying to change in the UI.
Any help would be appreciated.
