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)#
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
"Resistors"
.- component_name
str
,optional
Name of component in the library. The default is
"RES"
.- location
list
of
float
,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.
- name
- Returns:
ansys.aedt.core.modeler.cad.object_3dcircuit.CircuitComponent
Circuit 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.release_desktop(True, True)