The renditions API allows you to export a scene node to an SVG file but is there a way to get the SVG contents without writing the file?
Note: It’s possible to export SVG to disk and then read that value back in, but that’s an asynchronous operation and so that creates a chain of calls that also have to be asynchronous to keep everything in the right order. This feature, if possible, would return the string value right away.
Yoshi is a designer that is using XD and Illustrator. He likes to work in XD for a few specific use cases and then import his work into Illustrator. He has been manually exporting each shape to disk and then manually importing each SVG file.
Today a new API is available to get the SVG string. He’s written a plugin that gets the SVG of the selected scene node, modifies it and then copies that value to the clipboard. He then goes to Illustrator and pastes the SVG from the clipboard thus importing his shape at the same time.
Melanie is a developer that export SVG for a design studio. She exports specific scene nodes and uploads them to the company intranet.
She’s written a plugin to export a few specific nodes that update the site dynamically. In the past she had to export 10 svg files and upload them each to the server. With the new SVG string feature she can get all of the exported SVG string data and send it in one request and parse it into individual files on the server.