hexagon logo

Can we switch between Adams Modeler and Adams View through a macro/python script from within Adams Modeler?

Can we switch between Adams Modeler and Adams View through a macro/python script from within Adams Modeler?
  • As a general tip, you can usually find scripting commands you need by recording a macro of the operation and inspecting the resulting file:
    Screen Shot 07-15-22 at 11.10 AM
    For your particular task the commands appear to be:
    apex.hideAppGui() to switch from Modeler to View
    apex.showAppGui() to switch back again
  • I had tried this. This does not work for me. Below is the error:
    ---------------------------------------------------------------------
    Python exception encountered running script.
    Traceback (most recent call last):
     File "<string>", line 3, in <module>
     File "C:/Users/RavuriS/Documents/Adams Modeler Workspace/Macros/Macro 3.py", line 31, in <module>
      apex.hideAppGui()
    AttributeError: module 'apex' has no attribute 'hideAppGui'
     
    **************************************
    Output (Prior to Exception):
    ----------------------------------------------------------------------------
    I wanted to create a workflow in which I would perform a few steps in Modeler, switch to View, perform a few more steps and switch back to Modeler. As soon as I switch to View, Modeler stops recording.
     
  • Sorry, I should have tested that properly before I answered... It looks to me like this workflow is not supported yet.