New APIs in Adobe XD 14.0.42

Adobe XD version 14.0.42 is now available to the public, and there are some new API features you might want to be aware of when developing plugins XD. We’ll go over some of the highlights in this post. As always, if you have any questions, you can post them on our developer forums.

Convenient access to selection and the root node

You can now access the current selection and root node any time without having to pass it to other functions and methods. Just use require(“scenegraph”).selection and require(“scenegraph”).root respectively to get access.

This new method works side-by-side with the existing method of getting access to the current selection and document root node. As such, you can do either of the following (depending on your needs):

Viewport APIs

Shared links

It’s now possible to get links to the most recently shared prototypes and design specs. This should improve the workflow for plugins that need access to published prototypes and design specs.

Document and node metadata

Your plugin can now store arbitrary metadata on nodes in the user’s document. The metadata is specific to your plugin and must be serializable to a string (think JSON.stringify). If you want to store document-wide metadata, you can store the data on the document’s root node.

Note that the data you store is not available to other plugins, and your plugin can’t access data stored by other plugins.

Other changes

These aren’t the only changes that landed in XD 14, but they are among the most useful for both existing and new plugins. Be sure to check out the change log for the entire set of changes.

As always, we’re excited to hear your feedback on these new APIs, as well as your requests for future APIs. You can leave feedback here. We can’t wait to see what you create.