Export Project to XML from the IDE, by code

The idea is to export a project as XML by code.

Unfortunately, I do not have a single idea to how to do that (that is new to me; usually, ideas comes by themselves).

When you need to be concise you are vague. And when you need to explain with more detail your explanation is too short.

What do you want to do and why? What format do you have now? Have you tried Arbed? Do you need to repeat your actions?

OK. Beatrix, I rephrase it:

I want to be able to save as XML the current project, on demand (or better: load a project and Save As it to XML format)…

It may even be in the form of passing a Xojo project file (.xojo_binary_project) to the Xojo IDE and ask it to save as XML project (.xojo_xml_project).

I can do that manually, but I want to be able to do it with code.

If Xojo (the IDE) had an AppleScript dictionary, I am quite sure that I can do it using AppleScript, but it do not have one.

It is not a matter of what I have or not.

To save as Xojo or XML, one have to have a valid license for the running Xojo version: I have one.

What Arbed have to do there ? Can you automate it to load a Xojo binary file (.xojo_binary_project) and save it as XML project (.xojo_xml_project)

Is it clear now ?

Theoretically, you should be able to use a combination of opening a file and then doing a “SaveFileAs” with DoCommand. See http://developer.xojo.com/userguide/ide-scripting-docommand$Commands%20used%20by%20DoCommand .

OpenFile works like this : openfile(basePath + "code\\ current/max\\ scheduler.rbp")

Then instead of

DoCommand "SaveFile" DoCommand "CloseWindow"

you would have to use the “SaveFileAs” in the second line. The parameters for DoCommand aren’t in the docs. I’d start with a shell path.

Thanks Beatrix, I will try that.

Do you know Arbed (Wikipedia) ? :wink: