Exporting a project as XML

wawak wrote on 11/26/2022, 2:12 PM

Hello guys, i'm trying to write a little script to export my Vegas Pro 19 project as an XML file,

I tried using the Vegas.Project.ArchiveProject() method but it seems like it is not the right one to use since it is exporting a binarised file and also showing a little warning message.

There is a "ArchiveProjectFlags" parameter mentioned in the documentation but there is not a single detail about it.

Is it actually possible to export a project as XML using a script ?


Code i'm using :


Thanks in advance.


jetdv wrote on 11/26/2022, 8:21 PM

Short answer is yes. But it would be considerably more complicated that that depending on exactly you are wanting to do.

wawak wrote on 11/27/2022, 3:51 AM

Ok so i just want to click on a script button on my vegas interface to export the current project to XML.

What should I look for in the documentation to achieve this ?

DMT3 wrote on 11/27/2022, 7:08 AM

There is a built in function to export to a Final Cut XML. It might be more information than you need though. It is under File>Export

wawak wrote on 11/27/2022, 7:29 AM

Yes, i know but I would like to use this function with a script and there is not mention of this in the documentation.

jetdv wrote on 11/27/2022, 8:05 AM

"ArchiveProject" will save the VEG file with all media used into a new folder.

There is no way for a script to access the "export to Final Cut XML" or other options in that menu.

If you want to export an XML via a script, you will have to go through and code creating the XML file and adding the pieces of information you want exported manually. Once you have the script written, though, then it will just be a push button from then on. So, yes, it can be done but, as I said, you will have to write all of the code telling it what to do.

Under Tools - Scripting, there *is* and "Export EDL" option. You might start by looking at that one.

wawak wrote on 11/27/2022, 8:12 AM

Thanks ! I will try to generate the XML then.