Skip to main content
Definition: LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/ModelCenterVariableUtils.cs (line 17) Variable utilities.

Members

Public static functions

Function ReadFromIVariable

Read a variable from the specified MC variable. Uses the full ModelCenter.IVariable name for the PHXVariable name. Parameters:
  • ivar: The ModelCenter variable COM object.
  • dest: The variable data to write to.
Parameters:
  • IVariable ivar
  • PHXVariable dest
Return type: void

Function ReadFromDHVariable

Read a variable from the specified MC variable metadata. Uses the full DHVariable name for the PHXVariable name. Parameters:
  • dhvar: The ModelCenter variable COM object.
  • dest: The variable data to write to.
Parameters:
  • IDHVariable dhvar
  • PHXVariable dest
Return type: void

Function ReadFromIVariable

Read a variable from the specified MC variable. Uses the full ModelCenter.IVariable name for the PHXVariable name. Parameters:
  • ivar: The ModelCenter variable COM object.
  • dest: The variable data to write to.
  • compVar: Flag which determines how the variable will be used. If true it is read as a variable to a component, if false as a variable to a model.
Parameters:
  • IVariable ivar
  • PHXVariable dest
  • bool compVar
Return type: void

Function ReadFromDHVariable

Read a variable from the specified MC variable metadata. Uses the full DHVariable name for the PHXVariable name. Parameters:
  • dhvar: The ModelCenter variable COM object.
  • dest: The variable data to write to.
  • compVar: Flag which determines how the variable will be used. If true it is read as a variable to a component, if false as a variable to a model.
Parameters:
  • IDHVariable dhvar
  • PHXVariable dest
  • bool compVar
Return type: void

Function WriteToDHVariable

Write PHXVariable info to an IDHVariable. Parameters:
  • source: The PHXVariable.
  • dhVar: The IDHVariable.
Parameters:
  • PHXVariable source
  • IDHVariable dhVar
Return type: void

Function ReadFromIVariable

Read a variable from the specified MC variable. Parameters:
  • prefix: The path to the containing group.
  • ivar: The ModelCenter variable COM object.
  • dest: The variable data to write to.
Parameters:
  • string prefix
  • IVariable ivar
  • PHXVariable dest
Return type: void

Function ReadFromIVariable

Read a variable from the specified MC variable. Parameters:
  • prefix: The path to the containing group.
  • ivar: The ModelCenter variable COM object.
  • dest: The variable data to write to.
  • compVar: Flag which determines how the variable will be used. If true it is read as a variable to a component, if false as a variable to a model.
Parameters:
  • string prefix
  • IVariable ivar
  • PHXVariable dest
  • bool compVar
Return type: void

Function ReadFromModelCenter

Read a variable from the specified MC variable. Uses the full ModelCenter.IVariable name for the PHXVariable name. Parameters:
  • name: The variable’s full name.
  • modelCenter: The instance of ModelCenter from which to read the variable.
  • dest: The variable data to write to.
  • compVar: Flag which determines how the variable will be used. If true it is read as a variable to a component, if false as a variable to a model.
Parameters:
  • string name
  • IModelCenter modelCenter
  • PHXVariable dest
  • bool compVar
Return type: void

Function WriteToIVariable

Write a variable to the specified MC variable. Parameters:
  • src: The variable to write from.
  • ivar: The ModelCenter COM object.
Parameters:
  • PHXVariable src
  • IVariable ivar
Return type: void

Function GetGroups

Gets the groups from the given ModelCenter object. Parameters:
  • obj: The object.
Returns: The groups. Exceptions:
  • InvalidOperationException: If the given object is not a ModelCenter object containing groups.
Parameters:
  • object obj
Return type: IGroups

Function GetVariables

Gets the variables from the given ModelCenter object. Parameters:
  • obj: The object.
Returns: The variables. Exceptions:
  • InvalidOperationException: If the given object is not a ModelCenter object containing groups.
Parameters:
  • object obj
Return type: IVariables

Function Find

Retrieve a variable or group, recursively. Parameters:
  • mcObject: The component or group to search.
  • name: The relative name to search for.
Returns: Either the IVariable of IGroup object by that name. Returns null if not found. Parameters:
  • object mcObject
  • string name
Return type: object