create_component_from_sml#

TwinBuilderComponents.create_component_from_sml(input_file, model, pins_names)[source]#

Create and place a new component based on a .sml file.

Parameters:
input_filestr

Path to .sml file.

modelstr

Model name to import.

pins_nameslist

List of model pins names.

Returns:
bool

True when successful, False when failed.

Examples

>>> from ansys.aedt.core import TwinBuilder
>>> tb = TwinBuilder(version="2025.1")
>>> input_file = os.path.join("Your path", "test.sml")
>>> model = "Thermal_ROM_SML"
>>> pins_names = ["Input1_InternalHeatGeneration", "Input2_HeatFlow", "Output1_Temp1,Output2_Temp2"]
>>> tb.modeler.schematic.create_component_from_sml(input_file=model, model=model, pins_names=pins_names)
>>> tb.release_desktop(False, False)