create_component#
- MaxwellCircuitComponents.create_component(name=None, component_library='Resistors', component_name='RES_', location=None, angle=0, use_instance_id_netlist=False, global_netlist_list=None, page=1)#
Create a component from a library.
- Parameters:
- name
str,optional Name of the instance. The default is
None.- component_library
str,optional Name of the component library. The default is
"".- component_name
str,optional Name of component in the library. The default is
"RES".- location
listoffloat,optional Position on the X axis and Y axis. The default is
None, in which case the component is placed in [0, 0].- angle
optional Angle rotation in degrees. The default is
0.- use_instance_id_netlistbool,
optional Whether to enable the instance ID in the net list. The default is
False.- global_netlist_list
list,optional The default is
None, in which case an empty list is passed.- page: int, optional
Schematic page number. The default value is
1.
- name
- Returns:
ansys.aedt.core.modeler.circuits.object_3d_circuit.CircuitComponentCircuit Component Object.
References
>>> oEditor.CreateComponent
Examples
>>> from ansys.aedt.core import TwinBuilder >>> aedtapp = TwinBuilder() >>> cmp = aedtapp.modeler.schematic.create_component(component_library="", component_name="ExcitationComponent") >>> cmp.set_property("ShowPin", True) >>> aedtapp.desktop_class.close_desktop()