Skip to main content

ModelCenter APIs 2026 R1

Interface PHXDATAHISTORYLib::\_DPHXDataHistory

Last update: 18.06.2026

Definition: LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 139)

The Data History is the back-end data storage piece of a Data Explorer. It contains no GUI.

Inherits from:

Members

Properties

Property suggestedIndependantVar

Definition: LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::suggestedIndependantVar

The name of the suggested independent Variable. Deprecated:

(misspelling)

Return type: BSTR

Property suggestedIndependentVar

Definition: LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::suggestedIndependentVar

The name of the suggested independent Variable.

Return type: BSTR

Property suggestedDependentVars

Definition: LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)

VARIANT PHXDATAHISTORYLib::_DPHXDataHistory::suggestedDependentVars

An array of strings which are the suggested Variable names to use for dependent Variables in plots.

Return type: VARIANT

Property suggestedCountFrom

Definition: LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)

long PHXDATAHISTORYLib::_DPHXDataHistory::suggestedCountFrom

Suggested number to use when showing the runs in a GUI as the first run number. Typically 0 or 1. Has no effect on internal API calls.

Return type: long

Property id

Definition: LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 178)

settingRun PHXDATAHISTORYLib::_DPHXDataHistory::id

IPHXDataExplorerPointer which gives you access to the associated Data Explorer object.

Return type: settingRun

Property centerLinkServer

Definition: LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::centerLinkServer

Return type: BSTR

Property centerLinkRunMatrixID

Definition: LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::centerLinkRunMatrixID

Return type: BSTR

Property centerLinkJobConnector

Definition: LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::centerLinkJobConnector

Return type: BSTR

Property centerLinkQueue

Definition: LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::centerLinkQueue

Return type: BSTR

Property dataHistoryToModel

Definition: LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)

LPDISPATCH PHXDATAHISTORYLib::_DPHXDataHistory::dataHistoryToModel

Get or set the Data History to Model object (see _DPHXDataHistoryToModel).

Return type: LPDISPATCH

Property warmStartStudyComplete

Definition: LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)

boolean PHXDATAHISTORYLib::_DPHXDataHistory::warmStartStudyComplete

Gets/Sets warm-start trade study complete flag.

Return type: boolean

Property tradeStudyModelFile

Definition: LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::tradeStudyModelFile

Gets/Sets the temp model file name saved for crash recovery of trade studies. This file will be DELETED when datahistory destructs.

Return type: BSTR

Public functions

Function addVariable

void PHXDATAHISTORYLib::_DPHXDataHistory::addVariable(LPDISPATCH var)

Adds a Variable to the Data History. All existing runs are appended with a blank value for this Variable.

Parameters:

Parameters:

  • LPDISPATCH var

Return type: void

Function setNumExpectedRuns

void PHXDATAHISTORYLib::_DPHXDataHistory::setNumExpectedRuns(long numRuns)

Sets the expected number of runs. Used for informational and GUI purposes.

Parameters:

  • numRuns: The expected number of runs.

Parameters:

  • long numRuns

Return type: void

Function startRuns

void PHXDATAHISTORYLib::_DPHXDataHistory::startRuns()

Identifies that the runs are starting.

Return type: void

Function endRuns

void PHXDATAHISTORYLib::_DPHXDataHistory::endRuns()

Tells the Data History that all runs are now complete. It will pass the data along as an event.

Return type: void

Function getNumFailedRuns

long PHXDATAHISTORYLib::_DPHXDataHistory::getNumFailedRuns()

Get the number of runs with an Error ID which is not equal to 0. Returns:

The number of failed runs.

Return type: long

Function getErrorID

long PHXDATAHISTORYLib::_DPHXDataHistory::getErrorID(long run)

Get the error ID for a particular run.

Parameters:

  • run: The 0 based index to the run to access.

Returns:

The error ID. 0 means success. All other values mean failure.

Parameters:

  • long run

Return type: long

Function getErrorMessage

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::getErrorMessage(long run)

Returns the error message for a particular run.

Parameters:

  • run: The 0 based index to the run to access.

Returns:

The error message of the run.

Parameters:

  • long run

Return type: BSTR

Function setError

void PHXDATAHISTORYLib::_DPHXDataHistory::setError(long run, long errorID, BSTR message)

Sets the error for a run.

Parameters:

  • run: The 0 based index to the run to access.
  • errorID: The error ID. 0 is considered success. All other values are failure.
  • message: The text for the error.

Parameters:

  • long run
  • long errorID
  • BSTR message

Return type: void

Function getNumRuns

long PHXDATAHISTORYLib::_DPHXDataHistory::getNumRuns()

Returns the number of runs currently in the matrix. Returns:

The total number of runs.

Return type: long

Function getNumVariables

long PHXDATAHISTORYLib::_DPHXDataHistory::getNumVariables()

Returns the number of Variables currently in the matrix. Returns:

The number of variables.

Return type: long

Function setResult

void PHXDATAHISTORYLib::_DPHXDataHistory::setResult(VARIANT index, long run, VARIANT value, boolean valid, boolean modified)

Sets the result for a run.

Parameters:

  • index: Either a 0 based index to the Variable, or the name of a Variable.
  • run: The 0 based index to the run to access.
  • value: The value of the Variable for this run.
  • valid: Whether this value is valid.
  • modified: Whether this value's modified flag is set.

Parameters:

  • VARIANT index
  • long run
  • VARIANT value
  • boolean valid
  • boolean modified

Return type: void

Function getValue

VARIANT PHXDATAHISTORYLib::_DPHXDataHistory::getValue(VARIANT index, long run)

Gets the value of a Variable for a particular run.

Parameters:

  • index: Either a 0 based index to the Variable, or the name of a Variable.
  • run: The 0 based index to the run to access.

Returns:

The value of the variable.

Parameters:

  • VARIANT index
  • long run

Return type: VARIANT

Function isValid

boolean PHXDATAHISTORYLib::_DPHXDataHistory::isValid(VARIANT index, long run)

Returns whether the valid flag is set for a Variable for a particular run.

Parameters:

  • index: Either a 0 based index to the Variable, or the name of a Variable.
  • run: The 0 based index to the run to access.

Returns:

True if the variable is valid, else false.

Parameters:

  • VARIANT index
  • long run

Return type: boolean

Function isModified

boolean PHXDATAHISTORYLib::_DPHXDataHistory::isModified(VARIANT index, long run)

Returns whether the modified flag is set on a Variable for a particular run.

Parameters:

  • index: Either a 0 based index to the Variable, or the name of a Variable.
  • run: The 0 based index to the run to access.

Returns:

True if the modified flag is true, else false.

Parameters:

  • VARIANT index
  • long run

Return type: boolean

Function toCSVFile

void PHXDATAHISTORYLib::_DPHXDataHistory::toCSVFile(BSTR fileName, [optional] VARIANT variablesInRows, [optional] VARIANT includeFailed)

Writes a CSV file of all the data in the Data History.

Parameters:

  • fileName: The file to write.
  • variablesInRows: If true, variables will be in rows. If false, they will be in columns.
  • includeFailed: Whether to include failed runs in the output.

Parameters:

  • BSTR fileName
  • [optional] VARIANT variablesInRows
  • [optional] VARIANT includeFailed

Return type: void

Function toXML

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::toXML([optional]VARIANT includeRunData)

Writes the Data History contents to an XML string.

Parameters:

  • includeRunData:

Returns:

The XML string.

Parameters:

  • [optional] VARIANT includeRunData

Return type: BSTR

Function toXMLFile

void PHXDATAHISTORYLib::_DPHXDataHistory::toXMLFile(BSTR fileName, [optional]VARIANT includeRunData)

Writes the Data History contents to an XML file.

Parameters:

  • fileName: The file to write. It will be overwritten if it exists, or created if it doesn't.
  • includeRunData:

Parameters:

  • BSTR fileName
  • [optional] VARIANT includeRunData

Return type: void

Function fromXML

void PHXDATAHISTORYLib::_DPHXDataHistory::fromXML(BSTR xmlStr, [optional] VARIANT root)

Tells the Data History to load its state from the XML string passed in.

Parameters:

  • xmlStr: The XML string to read.
  • root: The node ID of the node to begin reading at. This is useful if you are loading a larger document which contains a Data History node as a child.

Parameters:

  • BSTR xmlStr
  • [optional] VARIANT root

Return type: void

Function fromXMLFile

void PHXDATAHISTORYLib::_DPHXDataHistory::fromXMLFile(BSTR fileName, [optional] VARIANT root)

Tells the Data History to load its state from the XML file passed in.

Parameters:

  • fileName: The name of the file to read.
  • root: The node ID of the node to begin reading at. This is useful if you are loading a larger document which contains a Data History node as a child.

Parameters:

  • BSTR fileName
  • [optional] VARIANT root

Return type: void

Function toCSV

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::toCSV([optional] VARIANT variablesInRows, [optional] VARIANT includeFailed)

Returns a CSV string of all the data in the Data History.

Parameters:

  • variablesInRows: If true, variables will be in rows. If false, they will be in columns.
  • includeFailed: Whether to include failed runs in the output.

Returns:

The string of comma-seperated values.

Parameters:

  • [optional] VARIANT variablesInRows
  • [optional] VARIANT includeFailed

Return type: BSTR

Function getNumNonEmptyRuns

long PHXDATAHISTORYLib::_DPHXDataHistory::getNumNonEmptyRuns()

Returns the number of runs which have at least one piece of data filled in. Returns:

The number of runs that contain data.

Return type: long

Function getVariable

IDispatch * PHXDATAHISTORYLib::_DPHXDataHistory::getVariable(VARIANT index)

Gets the IDHVariable object for a particular Variable.

Parameters:

  • index: Either a 0 based index to the Variable, or the name of a Variable.

Returns:

An IDispatch* to the IDHVariable object.

Parameters:

  • VARIANT index

Return type: IDispatch *

Function createVariable

IDispatch * PHXDATAHISTORYLib::_DPHXDataHistory::createVariable()

Creates a new IDHVariable object so that you can fill it in and pass it to addVariable. Returns:

An IDispatch* to a newly created IDHVariable object.

Return type: IDispatch *

Function isRunning

boolean PHXDATAHISTORYLib::_DPHXDataHistory::isRunning()

Returns true if the running flag is set. Returns:

True if running flag is set, else false.

Return type: boolean

Function getNumExpectedRuns

long PHXDATAHISTORYLib::_DPHXDataHistory::getNumExpectedRuns()

Returns the number of runs expected for this Trade Study. Returns:

The number of expected runs.

Return type: long

Function getRunName

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::getRunName(long runNum)

Returns the human readable name for a particular run. Usually this is blank, but can be used for things like Design Histories and snapshots.

Parameters:

  • runNum: The 0 based index to the run to access.

Returns:

The name of the particular run.

Parameters:

  • long runNum

Return type: BSTR

Function setRunName

void PHXDATAHISTORYLib::_DPHXDataHistory::setRunName(long runNum, BSTR name)

Sets the name of a run. This name typically will show up in the run header for the Table View and is only used for Snapshots and Design Histories.

Parameters:

  • runNum: The 0 based index to the run to access.
  • name: The name of the run.

Parameters:

  • long runNum
  • BSTR name

Return type: void

Function insertRun

void PHXDATAHISTORYLib::_DPHXDataHistory::insertRun(long insertBefore)

Inserts a blank run.

Parameters:

  • insertBefore: The 0 based index to the run to reference. May be -1 to insert at the end. Usually -1 is not needed because setValue call will add runs automatically as necessary.

Parameters:

  • long insertBefore

Return type: void

Function deleteRun

void PHXDATAHISTORYLib::_DPHXDataHistory::deleteRun(long run)

Deletes all the data for a numbered run.

Parameters:

  • run: The 0 based index to the run to delete.

Parameters:

  • long run

Return type: void

Function deleteVariable

void PHXDATAHISTORYLib::_DPHXDataHistory::deleteVariable(VARIANT index)

Deletes a Variable from the Data History

Parameters:

  • index: Either a 0 based index to the Variable, or the name of a Variable.

Parameters:

  • VARIANT index

Return type: void

Function getFormattedValue

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::getFormattedValue(VARIANT index, long run)

Returns the value of a Variable for a run formatted according to the Variable's formatting mode.

Parameters:

  • index: Either a 0 based index to the Variable, or the name of a Variable.
  • run: The 0 based index to the run to access.

Returns:

The formatted value of the variable.

Parameters:

  • VARIANT index
  • long run

Return type: BSTR

Function setFormattedResult

void PHXDATAHISTORYLib::_DPHXDataHistory::setFormattedResult(VARIANT index, long run, BSTR value, boolean valid, boolean modified)

Sets the result for a run using formatted string text.

Parameters:

  • index: Either a 0 based index to the Variable, or the name of a Variable.
  • run: The 0 based index to the run to access.
  • value: The value of the Variable for this run, as a formatted string.
  • valid: Whether this value is valid.
  • modified: Whether this value's modified flag is set.

Parameters:

  • VARIANT index
  • long run
  • BSTR value
  • boolean valid
  • boolean modified

Return type: void

Function getNumCustomVars

long PHXDATAHISTORYLib::_DPHXDataHistory::getNumCustomVars()

Returns the number of Variables which are marked as Custom Variables. Returns:

The number of custom variables.

Return type: long

Function getUniqueID

long PHXDATAHISTORYLib::_DPHXDataHistory::getUniqueID()

Gets an ID that uniquely identifies this Data History with the current running process. Is not unique across multiple processes. Returns:

The unique ID for this DataHistory object.

Return type: long

Function getVariableValues

VARIANT PHXDATAHISTORYLib::_DPHXDataHistory::getVariableValues(VARIANT index)

Gets all the values of a variable as an array of variants.

Parameters:

  • index: The 0 based index or name of the variable to query.

Parameters:

  • VARIANT index

Return type: VARIANT

Function createDesignVariable

long PHXDATAHISTORYLib::_DPHXDataHistory::createDesignVariable(VARIANT index)

Creates a design variable with the same properties and data as the specified variable.

Parameters:

  • index: The 0 based index of the variable to copy.

Returns:

The index of the newly created variable.

Parameters:

  • VARIANT index

Return type: long

Function addVariableAt

void PHXDATAHISTORYLib::_DPHXDataHistory::addVariableAt(LPDISPATCH var, long location)

Adds a Variable to the Data History. All existing runs are appended with a blank value for this Variable.

Parameters:

  • var: Pass in a filled in IDHVariable object from a previous call to createVariable().
  • location: The 0 based index of where to put the variable. Data History will enforce that variables are grouped first by design variables, then non-design variables.

Parameters:

  • LPDISPATCH var
  • long location

Return type: void

Function setVariableValues

void PHXDATAHISTORYLib::_DPHXDataHistory::setVariableValues(VARIANT index, long run, VARIANT values, boolean valid, boolean modified)

Sets all values of a variable as a chunk.

Parameters:

  • index: Variable ID (0-based index).
  • run: Run ID (0-based index).
  • values: Array of values.
  • valid: Whether values are valid.
  • modified: Whether values should appear as modified.

Parameters:

  • VARIANT index
  • long run
  • VARIANT values
  • boolean valid
  • boolean modified

Return type: void

Function isHighlighted

boolean PHXDATAHISTORYLib::_DPHXDataHistory::isHighlighted(long run)

Check highlight state.

Parameters:

  • run: Run ID (0-based index).

Returns:

True if hightlighted, false otherwise.

Parameters:

  • long run

Return type: boolean

Function highlight

void PHXDATAHISTORYLib::_DPHXDataHistory::highlight(long run, boolean highlight, boolean handleEvent)

Highlight or unhighlight a run.

?> setting this will reset your highlighted items to just this item, or in the case of unhighlighting it will unhighlight all items.

Parameters:

  • run: Run ID (0-based index).
  • highlight: True to highlight, false to remove highlight.
  • handleEvent: Handle highlight event in the listener.

Parameters:

  • long run
  • boolean highlight
  • boolean handleEvent

Return type: void

Function getNumDesignVariables

long PHXDATAHISTORYLib::_DPHXDataHistory::getNumDesignVariables()

Returns the number of Variables which are marked as Design Variables. Returns:

The number of design variables.

Return type: long

Function setTradeStudySetup

void PHXDATAHISTORYLib::_DPHXDataHistory::setTradeStudySetup(BSTR setup)

Sets the trade study XML setup data. Parameters:

  • setup: The XML string to set up the trade study.

Parameters:

  • BSTR setup

Return type: void

Function getTradeStudySetup

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::getTradeStudySetup()

Gets the trade study setup, in XML form, used for generating the data. Returns:

The XML representaion of the trady study setup.

Return type: BSTR

Function setTradeStudyType

void PHXDATAHISTORYLib::_DPHXDataHistory::setTradeStudyType(BSTR type)

Sets the trade study type that generated the data ("DOE", "PAT", etc). Parameters:

  • type: The type of trade study.

Parameters:

  • BSTR type

Return type: void

Function getTradeStudyType

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::getTradeStudyType()

Gets the trade study type that generated the data ("DOE", "PAT", etc). Returns:

The type of trade study.

Return type: BSTR

Function setShortVariableNames

void PHXDATAHISTORYLib::_DPHXDataHistory::setShortVariableNames(boolean shortenVariableNames)

Sets a flag that determines if variables will be returned in long or short form.

Parameters:

  • shortenVariableNames: True to shorten variable names.

Parameters:

  • boolean shortenVariableNames

Return type: void

Function setRunValues

void PHXDATAHISTORYLib::_DPHXDataHistory::setRunValues(long run, VARIANT values, BOOL valid, BOOL modified)

Sets all values of a variable as a chunk.

Parameters:

  • run: Run ID (0-based index).
  • values: Array of values.
  • valid: Whether values are valid.
  • modified: Whether values should appear as modified.

Parameters:

  • long run
  • VARIANT values
  • BOOL valid
  • BOOL modified

Return type: void

Function getFailedRunIndexes

VARIANT PHXDATAHISTORYLib::_DPHXDataHistory::getFailedRunIndexes()

Gets an array which contains all the indexes of runs which have errors. Returns:

An array of long values.

Return type: VARIANT

Function toXMLSaveContext

void PHXDATAHISTORYLib::_DPHXDataHistory::toXMLSaveContext(LPDISPATCH saveContext, [optional] VARIANT includeRunData)

Writes the Data History contents to an XML file.

Parameters:

  • saveContext: Context to use when loading this file, used for storing large files and other data contained in the save file but not directly in the XML.
  • includeRunData:

Parameters:

  • LPDISPATCH saveContext
  • [optional] VARIANT includeRunData

Return type: void

Function fromXMLSaveContext

void PHXDATAHISTORYLib::_DPHXDataHistory::fromXMLSaveContext(LPDISPATCH saveContext, [optional] VARIANT root)

Tells the Data History to load its state from the XML file passed in.

Parameters:

  • saveContext: Context to use when loading this file, used for storing large files and other data contained in the save file but not directly in the XML.
  • root: The node ID of the node to begin reading at. This is useful if you are loading a larger document which contains a Data History node as a child.

Parameters:

  • LPDISPATCH saveContext
  • [optional] VARIANT root

Return type: void

Function getCompletedRunIndices

VARIANT PHXDATAHISTORYLib::_DPHXDataHistory::getCompletedRunIndices()

Gets an array which contains all the indices of runs which completed Returns:

An array of long values.

Return type: VARIANT

Function isRunComplete

boolean PHXDATAHISTORYLib::_DPHXDataHistory::isRunComplete(long run)

Gets whether the run is complete or not Parameters:

  • run: Run ID (0-based index).

Returns:

Whether the run has completed or not

Parameters:

  • long run

Return type: boolean

Function addCheckpoint

void PHXDATAHISTORYLib::_DPHXDataHistory::addCheckpoint(long runNumber, BSTR value)

Add a warm start checkpoint to the cache Parameters:

  • name: name for the checkpoint
  • value: value for the checkpoint

Parameters:

  • long runNumber
  • BSTR value

Return type: void

Function getNumCheckpoints

long PHXDATAHISTORYLib::_DPHXDataHistory::getNumCheckpoints()

Gets the number of warm start checkpoints available Returns:

the number of warm start checkpoints available

Return type: long

Function getCheckpointValue

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::getCheckpointValue(long checkpointIndex)

Gets the wam start checkpoint's value, the caller is responsible for releasing the BSTR memory. Parameters:

  • checkpointIndex: Checkpoint Index (0-based index)

Returns:

the checkpoint value

Parameters:

  • long checkpointIndex

Return type: BSTR

Function getCheckpointRunNumber

long PHXDATAHISTORYLib::_DPHXDataHistory::getCheckpointRunNumber(long checkpointIndex)

Gets the warm start checkpoint's run number Parameters:

  • checkpointIndex: Checkpoint Index (0-based index)

Returns:

the checkpoint run number

Parameters:

  • long checkpointIndex

Return type: long

Function setUniqueID

void PHXDATAHISTORYLib::_DPHXDataHistory::setUniqueID(long identifier)

Sets an ID that uniquely identifies this Data History. Parameters:

  • identifier: The unique ID for this DataHistory object.

Parameters:

  • long identifier

Return type: void

Function getNumCompletedRuns

long PHXDATAHISTORYLib::_DPHXDataHistory::getNumCompletedRuns()

Retrieves the number of completed runs for the current trade study.

Returns:

The number of completed runs for the current trade study

Return type: long

Function getCompletedRunData

ULONG PHXDATAHISTORYLib::_DPHXDataHistory::getCompletedRunData([out] VARIANT *runIDs, [out] VARIANT *errorIDs, [out] VARIANT *errorMessages, [out] VARIANT *variableValues, [out] LONG *endSequenceNumber, [in, defaultvalue(0)] ULONG startSequenceNumber, [in, defaultvalue(0xFFFFFFFF)] ULONG maxLength, [in, defaultvalue(FALSE)] boolean allVariables)

Gets runIDs, error IDs, error messages, and variable values for completed runs of only design variables unless allVariables param is set to true. ?> If the PHXDataHistoryEvents::dataChanged event is fired with a runIndex of -1, the completed-run list is purged and reconstructed. Therefore the next call to this method should restart startSequenceNumber with 0.

?> If a startSequenceNumber is given that is greater than the number of items in the completed-run list (out of range), this method will act as if a startSequenceNumber of 0 had been given.

Parameters:

  • runIDs: array of longs, runIDs that have recently completed.
  • errorIDs: array of longs, error IDs for each corresponding run in runIDs.
    0 indicates success, all other values indicate failure.
  • errorMessages: array of strings, error messages for each corresponding run in runIDs.
  • variableValues: multi-dimensional array of VARIANTs, variable values. First index is for each run in runIDs and the second index is for each variable.
  • endSequenceNumber: index of the last avalable completed run. Will be -1 if there are no completed runs avalable.
  • startSequenceNumber: index in the completed-run list to begin fetching from. Defaults to 0, the start of the list.
  • maxLength: maximum number of completed runs to fetch. Defaults to requesting all available runs.
  • allVariables: flag if true will result in run data returned for all variables else only design variable data will be returned

Returns:

next startSequenceNumber to use in next call to getCompletedRunData. This value may be greater than (startSequenceNumber + runs) if a given run completed multiple times due to re-runs.

Parameters:

  • [out] VARIANT * runIDs
  • [out] VARIANT * errorIDs
  • [out] VARIANT * errorMessages
  • [out] VARIANT * variableValues
  • [out] LONG * endSequenceNumber
  • [in, defaultvalue(0)] ULONG startSequenceNumber
  • [in, defaultvalue(0xFFFFFFFF)] ULONG maxLength
  • [in, defaultvalue(FALSE)] boolean allVariables

Return type: ULONG

Function getHighlightedRuns

VARIANT PHXDATAHISTORYLib::_DPHXDataHistory::getHighlightedRuns()

Retrieve the set of currently highlighted run indices Returns:

the set of currently highlighted run indices as an array of integers

Return type: VARIANT

Function setHighlightedRuns

void PHXDATAHISTORYLib::_DPHXDataHistory::setHighlightedRuns(VARIANT selectedRunIndices)

Specify the set of currently highlighted run indices. ?> This will overwrite the existing highlighted runs.

Parameters:

  • selectedRunIndices: the set of run indices to highlight, specified by either a single integer, numeric string, array of integers, or array of numeric strings. Specifying an empty or null value will remove all highlighted run indices.

Exceptions:

  • COM: exception thrown if passed non-numeric types or arrays of non-numeric types.

Parameters:

  • VARIANT selectedRunIndices

Return type: void

Function addVariableStructs

void PHXDATAHISTORYLib::_DPHXDataHistory::addVariableStructs(VARIANT dhVarStructs, long run)

Sets the results for a run. This method will add variables to the DataHistory if they are not already present File variables are not supported, their value cannot be represented in a DataHistoryVariableStruct Parameters:

  • dhVarStructs: SAFEARRAY of DataHistoryVariableStructs to add
  • run: The 0 based index to the run to set.

Parameters:

  • VARIANT dhVarStructs
  • long run

Return type: void

Private functions

void PHXDATAHISTORYLib::_DPHXDataHistory::fromCenterLink(BSTR serverName, BSTR runMatrixID, BSTR userName, BSTR password)

Parameters:

  • BSTR serverName
  • BSTR runMatrixID
  • BSTR userName
  • BSTR password

Return type: void

Function setUsernamePassword

void PHXDATAHISTORYLib::_DPHXDataHistory::setUsernamePassword(BSTR username, BSTR password)

Parameters:

  • BSTR username
  • BSTR password

Return type: void

Function setResultAsFile

void PHXDATAHISTORYLib::_DPHXDataHistory::setResultAsFile(VARIANT index, long run, boolean valid, boolean modified, BSTR tempFileName, BSTR tempFileDir)

Parameters:

  • VARIANT index
  • long run
  • boolean valid
  • boolean modified
  • BSTR tempFileName
  • BSTR tempFileDir

Return type: void

Function getDatabaseFile

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::getDatabaseFile()

Return type: BSTR

Function setDatabaseFile

void PHXDATAHISTORYLib::_DPHXDataHistory::setDatabaseFile(BSTR filename)

Parameters:

  • BSTR filename

Return type: void

Function removeAutosave

void PHXDATAHISTORYLib::_DPHXDataHistory::removeAutosave()

Return type: void

Function getVariable2

IDispatch * PHXDATAHISTORYLib::_DPHXDataHistory::getVariable2(VARIANT index)

Parameters:

  • VARIANT index

Return type: IDispatch *

Function getVariableTempDir

BSTR PHXDATAHISTORYLib::_DPHXDataHistory::getVariableTempDir(VARIANT index)

Parameters:

  • VARIANT index

Return type: BSTR

Connect with Ansys