FileArrayValue#

class ansys.tools.variableinterop.file_array_value.FileArrayValue#

Bases: ansys.tools.variableinterop.variable_value.CommonArrayValue[ansys.tools.variableinterop.file_value.FileValue]

Stores a value for the FileArrayValue variable type.

In Python, the FileArrayValue type is implemented by extending NumPy’s ndarray type. This means that they decay naturally into numpy.ndarray objects when using NumPy’s array operators.

Overview#

accept

Invoke the visitor pattern of this object using the passed-in visitor

to_api_string

Convert this value to an API string.

to_display_string

Convert the value to a formatted string.

variable_type

Variable type of the object.

from_api_object

Initialize a new FileArrayValue type from a list of API strings.

Import detail#

from ansys.tools.variableinterop.file_array_value import FileArrayValue

Property detail#

property FileArrayValue.variable_type: ansys.tools.variableinterop.variable_type.VariableType#

Variable type of the object.

Returns:
VariableType

Variable type of the object.

Method detail#

FileArrayValue.__eq__(other)#
FileArrayValue.accept(visitor: ansys.tools.variableinterop.ivariable_visitor.IVariableValueVisitor[T]) T#

Invoke the visitor pattern of this object using the passed-in visitor implementation.

Parameters:
visitorIVariableValueVisitor

Visitor object to call.

Returns:
T

Results of the visitor invocation.

FileArrayValue.to_api_string(context: ansys.tools.variableinterop.isave_context.ISaveContext | None = None) str#

Convert this value to an API string.

Parameters:
contextISaveContext

Context used for saving.

Returns:
str

String appropriate for use in files and APIs.

static FileArrayValue.from_api_object(value: Any, context: ansys.tools.variableinterop.isave_context.ILoadContext, scope: ansys.tools.variableinterop.file_scope.FileScope) FileArrayValue#

Initialize a new FileArrayValue type from a list of API strings.

Parameters:
valueAny

Value to use.

contextILoadContext

Load context to initialize the value with.

scopeFileScope

Scope to initialize the value in.

Returns:
FileArrayValue

New FileArrayValue type initialized from the value.

FileArrayValue.to_display_string(locale_name: str) str#

Convert the value to a formatted string.

Parameters:
locale_namestr

Locale to format the string in.

Returns:
str

String appropriate for use in user-facing areas.