Simple examples
Export Setup
Proceed as follows to execute this simple example:
Procedure
In Simcenter Amesim, use Help > Get demo to load the Engine_DID_Turbocharged.ame demo model.
Start a Python console using Tools > Python command interpreter:
Warning You must ensure that the model is in its expanded state if you load the Export Setup API from a Python console launched from outside Simcenter Amesim (you can right-click on the model and select Explode).
Follow the sequence of steps as provided in the script. Copy`import ame_export_apy
print("\n..........load the configuration .........") try: export_config=ame_export_apy.XPT.get_config(r'$AME\demo\Libraries\SIG
PositionControlLoop.ame') except Exception as e: print ("Exception caught\n") print("\n..........add mass of mass-friction port as input parameter .........") mass = export_config.add_param('mass@mass_friction2port') print("\n..........Export name of added param: %s" %mass.get_property(ame_export_apy.Property.Export_Name)) print("\n..........modify the export parameter Name to Exportmass .........") mass.set_property(ame_export_apy.Property.Export_Name, 'Exportmass') print("\n..........add stiction force of mass-friction port as input parameter .........") stiction_force = export_config.add_param('stict@mass_friction2port') print("\n..........Export name of added param: %s" %stiction_force.get_property(ame_export_apy.Property.Export_Name)) print("\n..........modify the export parameter Name to Exportstict .........") stiction_force.set_property(ame_export_apy.Property.Export_Name, 'Exportstict') print("\n..........add pressure at port 1 .........") pressureAtPort1 = export_config.add_param('p1@h2port_2') print("..........Export name of added param: %s" %pressureAtPort1.get_property(ame_export_apy.Property.Export_Name)) print("\n..........modify the export parameter Name to pressureAtPort1 .........") pressureAtPort1.set_property(ame_export_apy.Property.Export_Name, 'pressureAtPort1') print("\n..........adding a compound parameter .........") cmpd_param = export_config.add_param(ame_export_apy.IOType.Compound) print("..........Export name of added param: %s" %cmpd_param.get_property(ame_export_apy.Property.Export_Name)) print("\n..........modify the export parameter Name to CompundParam .........") cmpd_param.set_property(ame_export_apy.Property.Export_Name, 'CompoundParam') cmpd_param.set_property(ame_export_apy.Property.Expression, 'Exportmass+pressureAtPort1') print("..........Modified Expresison value is : %s" %cmpd_param.get_property(ame_export_apy.Property.Expression)) print("\n..........save the configuration file .........") ret_value = export_config.save(ame_export_apy.XptFormat.iSIGHT) print("\n..........Save Status : %s" %ret_value)`
Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Scripting/xid1124686 · retrieved 2026-07-17