Skip to main content
Definition: ModelCenter/src/ModelCenter.odl (line 5335) COM Instance. Inherits from:

Members

Properties

Property hasChanged

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Return type: boolean

Property hide

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Return type: boolean

Property OwningComponent

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Return type: LPDISPATCH

Property value

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Value of the variable. Return type: double

Property reference

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Reference of the variable. Return type: BSTR

Property referencedVariables

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Gets the referenced variables. Return type: VARIANT

Property referencedVariable

Definition: ModelCenter/src/ModelCenter.odl (line 1)
Gets the referenced variable. Convenience method for if there is only one reference. Return type: VARIANT

Public functions

Function isValid

Returns whether or not the variable is valid. Returns: True if variable is valid. False if the variable is not valid. Return type: boolean Reimplements: isValid

Function validate

Validates the variable by running the component if needed. Return type: void Reimplements: validate

Function getName

Gets the name of the variable. Returns: The name of the variable. Return type: BSTR Reimplements: getName

Function getFullName

Gets the full ModelCenter path of the variable. Returns: The full ModelCenter path of the variable. Return type: BSTR Reimplements: getFullName

Function getType

Gets the type of the variable. Returns: The type of the variable as a string. Return type: BSTR Reimplements: getType

Function isInput

Finds out whether or not the variable is an input with respect to the model. Returns the same value as isInputToModel. Return values:
  • true: Input
  • false: Output
Return type: boolean Reimplements: isInput

Function toString

Converts the variable value to a string, validating the variable if necessary. Returns: The value of the variable as a string. Return type: BSTR Reimplements: toString

Function fromString

Sets the value of the variable from the specified string. Parameters:
  • value: New value.
Parameters:
  • BSTR value
Return type: void Reimplements: fromString

Function toStringAbsolute

Converts the value of the variable to a string. Returns: The value of the variable as a string. Return type: BSTR Reimplements: toStringAbsolute

Function invalidate

Marks the variable as invalid (needs to be computed). This will set all dependent variables invalid also. Return type: void Reimplements: invalidate

Function directPrecedents

Returns a list of variables that are immediate precedents to the value of this variable. This function returns all variables that influence this variable and are directly connected via a link to it. Parameters:
  • followSuspended: Optional boolean specifies whether links which are suspended should be included in the search. Default is false.
  • reserved: Reserved for future use.
Returns: IDispatch* to an IVariables object. Parameters:
  • [optional] VARIANT followSuspended
  • [optional] VARIANT reserved
Return type: LPDISPATCH Reimplements: directPrecedents

Function directDependents

Returns a list of variables that are immediate dependents of the value of this variable. This function returns all variables that are influenced by this variable and are directly connected via a link to it. Parameters:
  • followSuspended: Optional boolean specifies whether links which are suspended should be included in the search. Default is false.
  • reserved: Reserved for future use.
Returns: IDispatch* to an IVariables object. Parameters:
  • [optional] VARIANT followSuspended
  • [optional] VARIANT reserved
Return type: LPDISPATCH Reimplements: directDependents

Function precedentLinks

Returns a list of links that are immediate precedents to the value of this variable. All the returned links will have this variable as the LHS of the equation. Except for arrays, the returned list will be 1 element long. Parameters:
  • reserved: Reserved for future use.
Returns: IDispatch* to an IVariableLinks object. Parameters:
  • [optional] VARIANT reserved
Return type: LPDISPATCH Reimplements: precedentLinks

Function dependentLinks

Returns a list of links that immediately depend on the value of this variable. All the returned links will have this variable as part of a RHS equation. Parameters:
  • reserved: Reserved for future use.
Returns: IDispatch* to an IVariableLinks object. Parameters:
  • [optional] VARIANT reserved
Return type: LPDISPATCH Reimplements: dependentLinks

Function precedents

Returns a list of variables that are precedents to the value of this variable. This function returns all variables that influence this variable, not just directly connected ones. Parameters:
  • followSuspended: Optional boolean specifies whether links which are suspended should be included in the search. Default is false.
  • reserved: Reserved for future use.
Returns: IDispatch* to an IVariables object. Parameters:
  • [optional] VARIANT followSuspended
  • [optional] VARIANT reserved
Return type: LPDISPATCH Reimplements: precedents

Function dependents

Returns a list of variables that are dependent upon the value of this variable. This function returns all variables that are influenced by this variable, not just directly connected ones. Parameters:
  • followSuspended: Optional boolean specifies whether links which are suspended should be included in the search. Default is false.
  • reserved: Reserved for future use.
Returns: IDispatch* to an IVariables object. Parameters:
  • [optional] VARIANT followSuspended
  • [optional] VARIANT reserved
Return type: LPDISPATCH Reimplements: dependents

Function isInputToComponent

Checks whether or not the variable is an input. Returns true if the variable was originally added as an input, ignoring the current state that can change based off of links. Return values:
  • true: Input
  • false: Output
Return type: boolean Reimplements: isInputToComponent

Function isInputToModel

Checks whether or not the variable is an input. A linked input returns false (Output). Return values:
  • true: Input
  • false: Output
Return type: boolean Reimplements: isInputToModel

Function setMetadata

Sets the meta data value of the given meta data key name. Parameters:
  • name: Metadata specifier used to store the data.
  • type:
  • value:
  • access:
  • archive:
Parameters: Return type: void Reimplements: setMetadata

Function getMetadata

Gets the meta data value of the given meta data key name. Parameters:
  • name: Metadata key name.
Returns: Metadata value. Parameters:
  • BSTR name
Return type: VARIANT Reimplements: getMetadata

Function createRefProp

Creates a reference property for the variable. Parameters:
  • name: Name of the reference property.
  • type: Type of reference property to create.
    Allowed types are: double, long, boolean, and string.
Returns: IDispatch* to an IRefProp object. Parameters:
  • BSTR name
  • BSTR type
Return type: IDispatch *

Function getRefPropValue

Gets the value of a specified reference property for the variable. Parameters:
  • name: Name of the reference property.
Returns: The value as a variant. Parameters:
  • BSTR name
Return type: VARIANT

Function setRefPropValue

Sets the value of a specified reference property for the variable. Parameters:
  • name: Name of the reference property.
  • value: New value.
Parameters:
  • BSTR name
  • BSTR value
Return type: void

Function getRefPropValueAbsolute

Gets the value of a specified reference property for the variable, without validating first. Parameters:
  • name: Name of the reference property.
Returns: The value as a variant. Parameters:
  • BSTR name
Return type: VARIANT