Is there a way of generating a JPython script that creates a given project?

Hi,

Is there a way, or will there be, to generate an FL script that creates a project that is given as input?

Does the FL scripting language have that capability?

Is that being considered, for a future version, an Export to Script option?

Can you state your query more clearly? With a use case?

Thanks!

Luna,

Sorry, I don’t know what you’re asking.

My question is in two parts:

  1. Is it possible, with an FL JPythong script, to generate an .xlogic project from scratch, i.e. generating the project from code instead of from the gui?

  2. Take any of the samples, e.g. Vicious Circle.xlogic. If the answer to the first question is Yes, then is there a way to generate a script, which would in turn generate Vicious Circle.xlogic from scratch.

I’m trying to remember which Report Writer it was, but way back there was a database Report Writer with an accompanying script language.

You could design the Report in the standard gui. After you designed a basic report, you could Export the report as a script. When you executed the script, it would re-generate the entire report. So even if you no longer had the Report file to load into the gui, you could use the script to generate the Report file, which you could then load into the gui.

So you would have the choice of building reports in the GUI, or generating them from code.

That’s what I’m asking, if it’s possible for a FL script to do this. Can an FL script generate an .xlogic project from scratch? And if so, is it possible to go in the opposite direction, taking an .xlogic project and generate a script that would create it?

Flying Logic’s scripting API is designed to do anything that can be done in the GUI. You can create a new document, add entities, edges, junctor and groups, set confidence values and annotations, save or export a document, etc.

If there is an action that can be performed in the GUI that can’t be done via script, that is likely a bug!

1 Like

Thanks, Joe. That confirms that scripts are capable of generating any project.

So the second question is whether there is, or will be, an export feature that transforms an existing project to an equivalent script that can be used for study, or for re-generating the original project.

Now I see what you are asking in your second question.

Flying Logic cannot currently generate a script based on a document that when run would regenerate the document. It’s an interesting suggestion, though. We’ll add it to our possible future features list.

1 Like

Sounds good, thanks J.P.