PostScenarioVariant Class — NXOpen Python API Reference 12.0.0 documentation

# PostScenarioVariant Class

class `NXOpen.CAE.``PostScenarioVariant`

  Bases: `NXOpen.TransientObject`

  A dynamically typed scalar value.

  A Variant is a scalar value whose type is determined at runtime based on the previously assigned value. For example, once an integer number is assigned to a variant, that Variant now represents an integer. Variants are needed to read and assign values in a generic way, and it permits arbitrary PostScenarios (`NXOpen.CAE.PostScenarioBuilder`) and arbitrary Data Sources to work together to provide a seamless post processing experience. Variant instances need to be disposed of after they are no longer needed.

  To create a new instance of this class, use `NXOpen.CAE.PostScenarioSelectionParameters.NewVariant()`

  New in version NX11.0.0.

# Methods

Method | Description
--- | ---
Dispose | Dispose of this instance.
GetDataType | Read the type.
GetValueAsBoolean | Read the typed value.
GetValueAsComplex | Read the typed value.
GetValueAsComponent | Read the typed value.
GetValueAsDouble | Read the typed value.
GetValueAsInteger | Read the typed value.
GetValueAsModeDescription | Read the typed value.
GetValueAsString | Read the typed value.
GetValueAsUnicodeString | Read the typed value.
GetValueAsVector3d | Read the typed value.
SetValueAsBoolean | Set a typed value.
SetValueAsComplex | Set a typed value.
SetValueAsComponent | Set a typed value.
SetValueAsDouble | Set a typed value.
SetValueAsInteger | Set a typed value.
SetValueAsModeDescription | Set a typed value.
SetValueAsString | Set a typed value.
SetValueAsUnary | Set a typed value.
SetValueAsUnicodeString | Set a typed value.
SetValueAsVector3d | Set a typed value.

# Method Detail

## Dispose

`PostScenarioVariant.``Dispose`

  Dispose of this instance.

  Signature `Dispose()`

  New in version NX11.0.0.

  License requirements: None.

## GetDataType

`PostScenarioVariant.``GetDataType`

  Read the type.

  Signature `GetDataType()`

  Returns: |
  Return type: | `NXOpen.CAE.PostScenarioVariantType`

  New in version NX11.0.0.

  License requirements: None.

## GetValueAsBoolean

`PostScenarioVariant.``GetValueAsBoolean`

  Read the typed value.

  Signature `GetValueAsBoolean()`

  Returns: |
  Return type: | bool

  New in version NX11.0.0.

  License requirements: None.

## GetValueAsComplex

`PostScenarioVariant.``GetValueAsComplex`

  Read the typed value.

  Signature `GetValueAsComplex()`

  Returns: |
  Return type: | `NXOpen.CAE.Complex`

  New in version NX11.0.0.

  License requirements: None.

## GetValueAsComponent

`PostScenarioVariant.``GetValueAsComponent`

  Read the typed value.

  Signature `GetValueAsComponent()`

  Returns: |
  Return type: | `NXOpen.CAE.PostScenarioVariantComponent`

  New in version NX12.0.0.

  License requirements: None.

## GetValueAsDouble

`PostScenarioVariant.``GetValueAsDouble`

  Read the typed value.

  Signature `GetValueAsDouble()`

  Returns: |
  Return type: | float

  New in version NX11.0.0.

  License requirements: None.

## GetValueAsInteger

`PostScenarioVariant.``GetValueAsInteger`

  Read the typed value.

  Signature `GetValueAsInteger()`

  Returns: |
  Return type: | int

  New in version NX11.0.0.

  License requirements: None.

## GetValueAsModeDescription

`PostScenarioVariant.``GetValueAsModeDescription`

  Read the typed value.

  Signature `GetValueAsModeDescription()`

  Returns: |
  Return type: | `NXOpen.CAE.PostScenarioModeDescription`

  New in version NX12.0.0.

  License requirements: None.

## GetValueAsString

`PostScenarioVariant.``GetValueAsString`

  Read the typed value.

  Signature `GetValueAsString()`

  Returns: |
  Return type: | str

  New in version NX11.0.0.

  License requirements: None.

## GetValueAsUnicodeString

`PostScenarioVariant.``GetValueAsUnicodeString`

  Read the typed value.

  Signature `GetValueAsUnicodeString()`

  Returns: |
  Return type: | str

  New in version NX11.0.0.

  License requirements: None.

## GetValueAsVector3d

`PostScenarioVariant.``GetValueAsVector3d`

  Read the typed value.

  Signature `GetValueAsVector3d()`

  Returns: |
  Return type: | `NXOpen.Vector3d`

  New in version NX12.0.0.

  License requirements: None.

## SetValueAsBoolean

`PostScenarioVariant.``SetValueAsBoolean`

  Set a typed value.

  Signature `SetValueAsBoolean(value)`

  Parameters: | value (bool) –

  New in version NX11.0.0.

  License requirements: nx_masterfem (“Finite Element Modeling”) OR nx_design_sim (“NX Design Simulation”)

## SetValueAsComplex

`PostScenarioVariant.``SetValueAsComplex`

  Set a typed value.

  Signature `SetValueAsComplex(value)`

  Parameters: | value (`NXOpen.CAE.Complex`) –

  New in version NX11.0.0.

  License requirements: nx_masterfem (“Finite Element Modeling”) OR nx_design_sim (“NX Design Simulation”)

## SetValueAsComponent

`PostScenarioVariant.``SetValueAsComponent`

  Set a typed value.

  Signature `SetValueAsComponent(value)`

  Parameters: | value (`NXOpen.CAE.PostScenarioVariantComponent`) –

  New in version NX12.0.0.

  License requirements: nx_masterfem (“Finite Element Modeling”) OR nx_design_sim (“NX Design Simulation”)

## SetValueAsDouble

`PostScenarioVariant.``SetValueAsDouble`

  Set a typed value.

  Signature `SetValueAsDouble(value)`

  Parameters: | value (float) –

  New in version NX11.0.0.

  License requirements: nx_masterfem (“Finite Element Modeling”) OR nx_design_sim (“NX Design Simulation”)

## SetValueAsInteger

`PostScenarioVariant.``SetValueAsInteger`

  Set a typed value.

  Signature `SetValueAsInteger(value)`

  Parameters: | value (int) –

  New in version NX11.0.0.

  License requirements: nx_masterfem (“Finite Element Modeling”) OR nx_design_sim (“NX Design Simulation”)

## SetValueAsModeDescription

`PostScenarioVariant.``SetValueAsModeDescription`

  Set a typed value.

  Signature `SetValueAsModeDescription(value)`

  Parameters: | value (`NXOpen.CAE.PostScenarioModeDescription`) –

  New in version NX12.0.0.

  License requirements: nx_masterfem (“Finite Element Modeling”) OR nx_design_sim (“NX Design Simulation”)

## SetValueAsString

`PostScenarioVariant.``SetValueAsString`

  Set a typed value.

  Signature `SetValueAsString(value)`

  Parameters: | value (str) –

  New in version NX11.0.0.

  License requirements: nx_masterfem (“Finite Element Modeling”) OR nx_design_sim (“NX Design Simulation”)

## SetValueAsUnary

`PostScenarioVariant.``SetValueAsUnary`

  Set a typed value.

  This method is parameterless because the void types does not have values.

  Signature `SetValueAsUnary()`

  New in version NX12.0.0.

  License requirements: nx_masterfem (“Finite Element Modeling”) OR nx_design_sim (“NX Design Simulation”)

## SetValueAsUnicodeString

`PostScenarioVariant.``SetValueAsUnicodeString`

  Set a typed value.

  Signature `SetValueAsUnicodeString(value)`

  Parameters: | value (str) –

  New in version NX11.0.0.

  License requirements: nx_masterfem (“Finite Element Modeling”) OR nx_design_sim (“NX Design Simulation”)

## SetValueAsVector3d

`PostScenarioVariant.``SetValueAsVector3d`

  Set a typed value.

  Signature `SetValueAsVector3d(value)`

  Parameters: | value (`NXOpen.Vector3d`) –

  New in version NX12.0.0.

  License requirements: nx_masterfem (“Finite Element Modeling”) OR nx_design_sim (“NX Design Simulation”)