Jump to content

Exit GOM 2019 via scripting


---
 Share

Recommended Posts

Hello,

I start GOM from an external program, open a project, import the g3d, recalculate the project and export the results. The next step should be the closing of GOM but I have troubles to do that. My first guess was to record the closing and I got the command, which is in the file "recorded.py". But when I execute this script, I get an error called  "GAPP-0003: The chosen command is not active." Then I imported the module "os" and tried the command "os._exit(0)". But this command has no effect on GOM 2019. I tried this command with GOM 2018 and GOM 2016 and both software versions are closing after this command.

How can I exit GOM 2019 via scripting?

Thanks!

Anita

recorded.py

Link to comment
Share on other sites

Hi Anita!  Sorry for the delayed response.

 

If you run your script from inside the scripting editor, it will error out, but if you run the script from just the menu with no other windows open, it should complete successfully.

Link to comment
Share on other sites

 Share

×
×
  • Create New...