Skip to main content

ModelCenter APIs 2026 R1 SP03

Interface PHXDATAHISTORYLib::_DPHXDataHistoryToModel

Last update: 30.07.2026

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

The Data History to Model connector is the piece that connects a Data History to a ModelCenter instance, for the purpose of restoring a run or re-running runs. It allows a user to override the default behaviors of the "Save to Model" and "Rerun Runs" capabilities of Data Explorer.

Members

Public functions

Function canSaveToModel

BOOL PHXDATAHISTORYLib::_DPHXDataHistoryToModel::canSaveToModel(LPDISPATCH dataHistory, long run)

Determine if a run could be saved to the model; returning FALSE means that option should be disabled in any menus.

Parameters:

  • dataHistory: the data history to check in regards to
  • run: the index of the run to check

Returns:

TRUE if the run could be saved, FALSE if not

Parameters:

  • LPDISPATCH dataHistory
  • long run

Return type: BOOL

Function saveToModel

void PHXDATAHISTORYLib::_DPHXDataHistoryToModel::saveToModel(LPDISPATCH dataHistory, long run)

Notify that a user has requested to save the indicated run to the model.

Parameters:

  • dataHistory: the data history to supply the data
  • run: the index of the run to save

Parameters:

  • LPDISPATCH dataHistory
  • long run

Return type: void

Function canRerunRuns

BOOL PHXDATAHISTORYLib::_DPHXDataHistoryToModel::canRerunRuns(LPDISPATCH dataHistory, VARIANT runs)

Determine if the specified runs can be re-run. Returning FALSE means that the option should be disabled in any menus.

Parameters:

  • dataHistory: the data history to check in regards to
  • runs: an array of run indexes

Returns:

True if the runs can be re-run, false if not.

Parameters:

  • LPDISPATCH dataHistory
  • VARIANT runs

Return type: BOOL

Function rerunRuns

void PHXDATAHISTORYLib::_DPHXDataHistoryToModel::rerunRuns(LPDISPATCH dataHistory, VARIANT runs)

Notify that the user has requested to re-run a set of runs. Does not wait for the runs to complete. endRuns from PHXDataHistory will be called when completed.

Parameters:

  • dataHistory: the data history to read and write from
  • runs: an array of run indexes

Parameters:

  • LPDISPATCH dataHistory
  • VARIANT runs

Return type: void

Function closeDataHistory

void PHXDATAHISTORYLib::_DPHXDataHistoryToModel::closeDataHistory(LPDISPATCH dataHistory)

Notify that the user is attempting to close the given data history.

Parameters:

  • dataHistory: the data history the user is attempting to close

Exceptions:

  • Exception: on error

Parameters:

  • LPDISPATCH dataHistory

Return type: void

Connect with Ansys