create_capacitor#

MaxwellCircuitComponents.create_capacitor(name=None, value=50, location=None, angle=0, use_instance_id_netlist=False)#

Create a capacitor.

Parameters:
namestr, optional

Name of the capacitor. The default is None.

valuefloat, optional

Value for the capacitor in pF. The default is 50 pF.

locationlist of float, optional

Position on the X axis and Y axis.

anglefloat, optional

Angle of rotation in degrees. The default is 0.

use_instance_id_netlistbool, optional

Whether to use the instance ID in the net list or not. The default is False.

Returns:
ansys.aedt.core.modeler.circuits.object_3d_circuit.CircuitComponent

Circuit Component Object.

References

>>> oEditor.CreateComponent

Examples

Create a capacitor of 10 pF:

>>> from ansys.aedt.core import MaxwellCircuit
>>> circ = MaxwellCircuit()
>>> circ.modeler.schematic.create_capacitor(value=10)
>>> circ.release_desktop(close_projects=True, close_desktop=True)