[An...] Posted June 22, 2021 Share Posted June 22, 2021 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 More sharing options...
[Se...] Posted June 23, 2021 Share Posted June 23, 2021 Hi Anita, I use gom.script.sys.exit_program() in 2019 to exit. Link to comment Share on other sites More sharing options...
[An...] Posted June 23, 2021 Author Share Posted June 23, 2021 Hi Sean, thanks for your answer. Don't you get the error message? What modules have you imported? Link to comment Share on other sites More sharing options...
[Se...] Posted June 30, 2021 Share Posted June 30, 2021 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 More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in