Type Alias NativeGenericVariableFunctions

type NativeGenericVariableFunctions = {
    applyPatches: (patches: NxPatch[]) => Promise<void>;
    getInfo: () => Promise<NxInfo>;
    getLayout: () => Promise<GenericVariableLayout>;
    getProperties: () => Promise<GenericVariableProperties>;
    getRawContent: () => Promise<string>;
    setDualValue: (text: string, num: number) => Promise<void>;
    setNumValue: (val: number) => Promise<void>;
    setProperties: (prop: GenericVariableProperties) => Promise<void>;
    setStringValue: (val: string) => Promise<void>;
}
Index

Properties

applyPatches: (patches: NxPatch[]) => Promise<void>

Applies a patch to the properties of a variable. Allows an update to some of the properties. It should not be possible to patch "/qInfo/qId", and it will be forbidden in the near future.

Applying a patch takes less time than resetting all the properties.

Parameters:

  • patches - Array of patches.

Stability: locked

getInfo: () => Promise<NxInfo>

Returns the type and identifier of the object.

Stability: locked

getLayout: () => Promise<GenericVariableLayout>

Evaluates an object and displays its properties including the dynamic properties. If the member delta is set to true in the request object, only the delta is evaluated.

Stability: locked

getProperties: () => Promise<GenericVariableProperties>

Shows the properties of an object.

If the member **delta** is set to true in the request, only the delta is retrieved.
The following is always returned in the output:

Stability: locked

getRawContent: () => Promise<string>

Returns the raw value of a variable.

Stability: locked

setDualValue: (text: string, num: number) => Promise<void>

Sets the value of a dual variable.

These changes are not persistent. They only last the duration of the engine session.

Parameters:

  • text - String representation of a dual value. Set this parameter to "", if the string representation is to be Null.
  • num - Numeric representation of a dual value.

Stability: locked

setNumValue: (val: number) => Promise<void>

Sets a numerical value to a variable.

These changes are not persistent. They only last the duration of the engine session.

Parameters:

  • val - Value of the variable.

Stability: locked

setProperties: (prop: GenericVariableProperties) => Promise<void>

Sets some properties for a variable.

The identifier of a variable cannot be modified.
You cannot update the properties of a script-defined variable using the _SetProperties method_.

Parameters:

  • prop - Information about the variable.

Stability: locked

setStringValue: (val: string) => Promise<void>

Sets a string value to a variable.

These changes are not persistent. They only last the duration of the engine session.

Parameters:

  • val - Value of the variable. The string can contain an expression.

Stability: locked