Author Topic: Possible to start a jArchi script on launch of Archi?  (Read 123 times)

Manj75

  • Senior Member
  • ****
  • Posts: 152
Possible to start a jArchi script on launch of Archi?
« on: June 15, 2021, 15:03:47 PM »
I tried to search this in the forum with not results so here is my new post...

Is is possible to run a jArchi script when Archi tool is launched provided that jArchi plugin is installed set up and the specified script exists in the scripts folder?

There is nothing in Preferences -> Scripting tab which leads me to think it ain't supported, unless it can be setup in the archi.ini file.

Also separately, can another or multiple jArchi scripts be called from a script - to support for example a run of a single script on startup of Archi which then orchestrates the running of multiple other scripts in sequence.

This would be a great feature and if possible already can I get some guidance, as I didn't find anything in the jArchi Wiki documentation.

Jean-Baptiste Sarrodie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 695
  • Archi Evangelist and Contributor. Visionary.
    • About me...
Re: Possible to start a jArchi script on launch of Archi?
« Reply #1 on: June 15, 2021, 15:47:57 PM »
Hi,

Asof today there is no way to run a jArchi script based on some events. For your specific use-csae (Archi start) this would also be even more complicated because you're not guaranted to have a model open at that time, thus no useful things to do in a script.

Re the 2nd question: you can easily run a script inside another script (which makes it possible to create and use scripts library) through the load() function. See: https://github.com/archimatetool/archi-scripting-plugin/wiki/The-Console%2C-Dialogs-and-Other-Utilities#including-other-script-files

Regards,

JB
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

Manj75

  • Senior Member
  • ****
  • Posts: 152
Re: Possible to start a jArchi script on launch of Archi?
« Reply #2 on: June 15, 2021, 17:09:07 PM »
okay that is a fair point, but it can be added as a nice feature imo.

It is vanilla Archi that will not open any model on startup, however if one was previously opened a restart of Archi always has the previously opened model open.  There could be a new Startup tab in preferences to configure the behaviour to state the path of the model to load and be selected on startup - this could be a local .archimate file or a coArchi model from the workspace.  The option then to have on the same tab run script on startup on the default model.  Also possibly an option to open a specified view from the default model on startup, which can be enabled or disabled.  My idea was to create a Dashboard view that is always shown on startup for a default model and a script is run that updates it.

Although, a nice to have for me and possibly others but I guess you have many other feature requests on your busy roadmap.

Wrt point 2 that is great to see running of other scripts from scripts is possible.

Thanks