Did You Know that adding custom tool menus in AcuConsole is very simple. Let us say you want to launch HyperMesh from AcuConsole and you want the behavior also be customized, you can use the following script. Notice that hm path is hard-coded, one can use environment variables ( if set ), any preferred command line options etc very easily. Once you copy the script below to a file called testhm.py, you can launch it from AcuSolve command window as follows; acuConsole -ut testhm.py In AcuConsole you will see a new menu item called HyperMesh under Tools.

##===== starts from below…copy this to testhm.py ============= import os from acuLaunch import AcuLaunch

def launchHM( item ):

prgfile = os.getenv( “PROGRAMFILES” ) filepath = os.path.join( prgfile , “Altair” , “12.0”, “hm”, “bin” ) filepath = os.path.join( filepath , “win64”, “hmopengl.exe” ) proc = AcuLaunch( program = filepath, modal = False )

AddTool( text = ‘Launch HyperMesh’, menuText = ‘Launch HyperMesh’, tooltip = ‘Click to launch hypermesh’, whatsthis = ‘Button to launch hypermesh’, active = ‘all’, func = launchHM ) ##===== ends above =============(June 7, 2013)

Browse 20+ free eBooks.
Browse 20+ free eBooks.

Have a question or comment?

Post your comment/question on our user forum.