• Introduction
• Mechanical Application Architecture
• Design Simulation Object (DS)
• Finding Functions in Mechanical Application
• Summary
Application
GUI
Note:
HTML XML Meshing and
Mechanical
JavaScript applications shares the
same XML and JScript
Core C++ Application Logic code
DS
• This is the entry point for macro execution into the
Mechanical session
• This is : wb.AppletList.Applet("DSApplet").App
– wb is the Workbench (WB1) master object
• Design Modeler, Mechanical etc. applications are applets
built on this object
Generic Procedure:
• Locate functionality in GUI
• Search the dsstringtable.xml files for menu string
• Note the corresponding ID of the string
– ID is like: ID_***
• Search for the string id ID_*** in DSPages/xml folder
• Note the methodName under actionCallback
– Command is like: do***
• Search for the command do*** in DSPages/scripts
• Attach a debugger to Mechanical process to see the script in action
Did it work?
• No
• Yes if you have selected the “Environment” node in the tree before calling the macro