I previously added my script to the GMS menu using the GMS GUI, which automatically generates a gtk file that can be shared with other users. Now, I would like to automate this process by generating the gtk file from the command line so that I can integrate it into my Python script.
I have searched for command line tools or API options to achieve this but haven't found a clear solution. Is there an existing tool or a documented method that allows command line generation of the gtk file? Any guidance or references to documentation would be greatly appreciated.
Additional Information:
Thank you in advance for your help!
If I understand you correctly, you want to do this from a command-line prompt. This is not possible - at least not without starting GMS in the process. The "compilation" of .s files into .gtk files is done by the GMS application.
However, it is possible to launch GMS from a command-line prompt to have it execute a script at startup using the /ef
command-line parameter.
It is done like this:
"C:\Program Files\Gatan\digitalmicrograph" /offline /ef "c:\Scripts\MyScript.s"
/ef
will attempt to execute the provided file as a script-file"c:\Scripts\MyScript.s"
is the path to the DM-script files to be executed./offline
starts GMS without loading any of the hardware related DLLs. It is optional here.
As for installing .s files from within a GMS script:
Please consult the F1 help documentation:
It explains all necessary steps including example code.