AmesimKnowledge

Tutorial

Creating supercomponents

AMECreateSupercomponent

In this section we demonstrate how to create supercomponents with the Circuit API. To do this, we will use the circuit built in the previous sections, and show how to create supercomponents within that circuit.

The following Python script produces the supercomponents shown in the figure below.

AMECreateSupercomponent(('mass_friction1port', 'springdamper01'), 'left_piston', 'left_piston_alias', 'LEFT_PISTON', 'duplicate')

AMECreateSupercomponent(('mass_friction1port_2', 'springdamper01_2'), 'right_piston', 'right_piston_alias', 'RIGHT_PISTON', 'keep')

AMECreateSupercomponent(('simple_crank', 'simple_crank_2', 'rconnector'), 'rot_to_linear', 'rot_to_linear_alias', 'ROT_TO_LINEAR', 'replace')

AMECreateSupercomponent(('rload01',), 'rotational_src', 'rotational_src_alias', 'ROTATION_SRC')

Add the code to your script.

Figure 18: The Supercomponents created by the script

Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Circuit_API/xid1124858 · retrieved 2026-07-17