Skip to main content

Component Plug-In SDK 2026 R1

Constructor RuntimeVariable

Last update: 19.06.2026

Namespace: Phoenix.Pacz
Assembly: Phoenix.Pacz.dll

RuntimeVariable()

Constructor which generates an unusable empty RuntimeVariable.

public RuntimeVariable()

RuntimeVariable(string, VariableType, IVariableValue, string, string, string, object, object, object[], string[], IReadOnlyDictionary<string, string>)

Constructor

public RuntimeVariable(string name, VariableType type, IVariableValue defaultValue, string format = null, string units = null, string description = null, object upperBound = null, object lowerBound = null, object[] enumValues = null, string[] enumAliases = null, IReadOnlyDictionary<string, string> metadata = null)

Parameters

name string

The name of the variable, must be non-null

type VariableType

The type of the variable using the JSON type names, must be non-null

defaultValue IVariableValue

The default value for the variable. Must be non-null except for File variables.

format string

The format for displaying variable values

units string

The units the variable is in

description string

A description of the variable

upperBound object

An upper bound for the variable

lowerBound object

A lower bound for the variable

enumValues object[]

The enumerated values for the variable

enumAliases string[]

The enumerated aliases for the variable. If provided, enumValues must be provided and the same length.

metadata IReadOnlyDictionary<string, string>

Arbitrary additional metadata for the variable

Remarks

This constructor creates a clone of the defaultValue.

RuntimeVariable(string, VariableMetadata, IVariableValue, IReadOnlyDictionary<string, string>)

Constructor

public RuntimeVariable(string name, VariableMetadata metadata, IVariableValue defaultValue, IReadOnlyDictionary<string, string> customMetadata)

Parameters

name string

The name of the variable. Must be non-null.

metadata VariableMetadata

The metadata about the variable. Must be non-null.

defaultValue IVariableValue

The default value for the variable. The type of this value must match the type of metadata

customMetadata IReadOnlyDictionary<string, string>

Custom metadata values associated with this variable

Remarks

This constructor creates a clone of the defaultValue.

RuntimeVariable(IRuntimeVariable)

Copy constructor. Makes a copy of the source such that dispose independently cleans up the source and the new RuntimeVariable.

public RuntimeVariable(IRuntimeVariable source)

Parameters

source IRuntimeVariable

The source to copy. A clone will be made and this object should be independently Disposed.

Connect with Ansys