Skip to main content

Hi,

I would like to create an xml file from my process diagram to be able to automate some actions from the content of this file using a third party app.

How could i do that?

Could we use some javascript library like filesaver.js or simply use a few line of code like that:

// Create the URL with the data to export
const file = new File([data], fileName, { type: "text/plain" });
const exportUrl = URL.createObjectURL(file);
const a = document.createElement("a");
document.body.appendChild(a);
a.href = exportUrl;
a.download = fileName;
a.target = "_self";
a.click();
URL.revokeObjectURL(exportUrl);

In adding package in the package.json file?

Best regards.

Hi @Michel L, thanks for contributing to the Lucid for Developers Community!

To help you out, our Documents endpoint provides a Document Content resource. You can check out all the details in our API documentation. Additionally, our Lucid Standard Import lets you format JSON to import document elements into a new document. For some examples, take a look at the /standard-import folder in Lucid's repository of Sample Lucid REST Applications. You can also find some example .lucid ZIP files in there that might be useful for your projects here.

Just to clarify, are you looking to export the diagram to XML, modify it with a third-party app, and then re-import it into Lucidchart?


Thanks for your reply.

So I need to call REST api in my lucid extension right?


That is correct! Please let us know if need help troubleshooting errors if they come up.


Reply