I’ve just started a new project of converting an existing in-house plugin in Photoshop to use XD instead. The primary purpose of the plugin is to pre-setup files using various inputs from a separate application to create a starting point file for our designers and save them some time in their setup process.
What I’d like to know is:
There is some fairly complex behavior possible (though clunky and prone to crashing…) in Photoshop by using an application COM interface to, basically, boss Photoshop around via code. lol Is there something similar that can be done with XD, or will Plugins be the only way to initiate these types of behaviors in XD?
Specifically, I’m looking to do things like:
Open an existing file on the local disk or a network location
Save a new copy of that file in X location
Editing components for bulk changes (images, text, colors, etc) across artboards
Creating and naming new artboards
Exporting artboard images to a remote location
That kind of thing!
I’m digging through the API, doing some basic test use-cases and have started wrapping my head around making modifications, but will immediately run into problems if I can’t, say, open a file and save it in a new location. Judging by the public Trello roadmap and the API as-is, I’m guessing these don’t exist just yet. Is that a correct assumption on my part?
Either way, excited to get started, and loving XD already!
currently, plugins are probably the only way to achieve anything like this. However, you are correct in your assumption that these things do not exist yet.
Currently (as there isn’t any kind of permission system, yet, and plugins can get installed with one click via the plugin manager), the APIs basically follow a philosophy of not being able to break a users document without being undo-able. This includes things like the edit-context (plugins can only edit selected nodes in the document), system-level access and so on.
this is something you already can do with the current APIs .
You could open an API feature request in the #plugin-api-feedback category. Then, we can vote on it, meaning it’ll get added to the roadmap if it gets enough votes.
I will, however, say, that I personally wouldn’t like the addition of saving and opening files without a permission system (“Plugin X would like to save your file”) etc. for the reasons stated above.
Although this probably isn’t the response you were hoping for, I hope I still could help ,
Happy coding,
Pablo
Just as a side-note (and something to be aware of for your use-case): Since Adobe XD is moving more and more towards auto-saving cloud documents, including live co-editing etc., it’ll probably be a bit more complicated to think about how these APIs should get handled in such a context.