MaxwellCircuitComponents: create_component #4847
Replies: 2 comments
-
Hi @rickygill00, To create a winding you simply need this method: create_winding(). Hope this helps, Kind regards, Giulia |
Beta Was this translation helpful? Give feedback.
-
Hi @rickygill00 , Without a snippet of the code I can't know why this is failing but here are my two cents. As @gmalinve pointed out there are two things that you'll need to do, you need to create the winding and assign a name to it. Just to reiterate over what was said, you can go through the maxwell winding = circuit.modeler.create_component(
component_library="Dedicated Elements",
component_name="Winding",
location=[0,0],
angle=0,
page=("Page{}".format(1))
)
winding.set_property("Name", "Layer_1") Note that the name "Layer_" needs to match the name that you gave the Windings on the Maxwell Model. In this example the create component method will simply create a component Winding with a name LLayer_1 in Page 1 of the schematics at location 0,0. Please see https://examples.aedt.docs.pyansys.com/version/dev/examples/low_frequency/general/external_circuit.html#Finalize-external-circuit . It'll show you how to create components - not only winding but also sources. I hope this helps |
Beta Was this translation helpful? Give feedback.
-
Hello, I can't seem to name a winding component using create_component(). For example:
myWinding = MaxwellCircuitComponent.create_component(name="myWinding", component_library="", component_name="Winding")
This creates the winding but does not set the name to "myWinding". Using myWinding.set_property(name="Name", value="myWinding") changes the name.
Am I doing something wrong with create_component()?
Beta Was this translation helpful? Give feedback.
All reactions