update_quantity_value#

TwinBuilderComponents.update_quantity_value(component_name, name, value, netlist_units='')[source]#

Change the quantity value of a component.

Parameters:
component_namestr

Component name.

namestr

Quantity name.

valuestr

Value of the quantity.

netlist_unitsstr, optional

Value of the netlist unit.

Returns:
bool

True when successful, False when failed.

Examples

>>> from ansys.aedt.core import TwinBuilder
>>> tb = TwinBuilder(version="2025.1")
>>> G = 0.00254
>>> modelpath = "Simplorer Elements\Basic Elements\Tools\Time Functions:DATAPAIRS"
>>> source1 = tb.modeler.schematic.create_component("source1", "", modelpath, [20 * G, 29 * G])
>>> tb.modeler.schematic.update_quantity_value(source1.composed_name, "PERIO", "0")
>>> tb.release_desktop(False, False)