SysMLUtil#

class ansys.sam.sysml2.builder.classes.sysml_util.SysMLUtil#

Provides utility methods for SysML element name resolution and class lookup.

Overview#

check_sysml_inherited_name

Resolve the element name, with a ClassName::id (or dot-safe) fallback.

get_sysml_constructor

Get the class constructor from type.

get_scripting_constructor

Get a class composing the dynamic mixin in front of the generated class.

Import detail#

from ansys.sam.sysml2.builder.classes.sysml_util import SysMLUtil

Method detail#

static SysMLUtil.check_sysml_inherited_name(element: ansys.sam.sysml2.meta_model.element.Element, dot_safe: bool = False) → str#

Resolve the element name, with a ClassName::id (or dot-safe) fallback.

static SysMLUtil.get_sysml_constructor(element_type: str) → type[ansys.sam.sysml2.meta_model.e_object.EObject]#

Get the class constructor from type.

static SysMLUtil.get_scripting_constructor(element_type: str) → type[ansys.sam.sysml2.meta_model.e_object.EObject]#

Get a class composing the dynamic mixin in front of the generated class.