ValueHelper#

class ansys.sam.sysml2.classes.value_helper.ValueHelper(prefix: str)#

Helper class for feature value resolve.

Overview#

get_value_for_scripting_element

Get the value of the feature.

get_value_for_sysml_element

Get the value of the feature.

set_or_update_value

Create the commit to set or update the value of type value_type.

Import detail#

from ansys.sam.sysml2.classes.value_helper import ValueHelper

Attribute detail#

ValueHelper.prefix#

Method detail#

static ValueHelper.get_value_for_scripting_element(element)#

Get the value of the feature.

static ValueHelper.get_value_for_sysml_element(element)#

Get the value of the feature.

static ValueHelper.set_or_update_value(element, value_type: type, new_value: str | int | float | bool)#

Create the commit to set or update the value of type value_type.

Parameters:
elementSysMLElement or Element

Element whose feature value is updated.

value_typetype

Value type of the new value.

new_valueUnion[str | int | float | bool]

New value to update to.