Posts

Post not yet marked as solved
0 Replies
871 Views
I'm looking for a way to create path items in Adobe Illustrator using JXA (JavaScript for Automation).I googled the whole internet several times and couldn't find anything... There is only a very basicintroduction of JXA on the Apple Developer Site. https://developer.apple.com/library/content/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/Articles/OSX10-10.html#//apple_ref/doc/uid/TP40014508-CH109-SW1Here is my code, where I tried to add an ellipse to an existing document: illuApp = Application('Illustrator') docPath = "/Users/userOne/Desktop/Document_One.ai" illuApp.open(docPath) currentDoc = illuApp.currentDocument console.log(currentDoc.name()) // Ellipse constructor newEllipse = illuApp.Ellipse({left: 512.5, top: 87.5, width: 425.0, height: 75.0, reversed: false, inscribed: true}) // This doesn't work **(Error -1700: Can't convert types.)** currentDoc.pathItems.push(newEllipse)Any help would be appreciated, thanks! 🙂
Posted
by blauzahn.
Last updated
.