    

 ## On this page

  

 

 # Interface PHXDATAHISTORYLib::\_DPHXDataHistory

 Last update: 30.07.2026 

![](https://img.shields.io/badge/language-IDL-blue "IDL")![](https://img.shields.io/badge/-public-brightgreen "public")

**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**:

- PHXDataHistoryEvents

## Members

- [addCheckpoint](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a9e6d72c9c2f589323e745f69426aaefb)
- [addVariable](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a9a819127adb7f83be0acfa4e79f4643d)
- [addVariableAt](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a156c9828bc7c8251e68886297349ccab)
- [addVariableStructs](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a9bf37e7831e0c32cfe17225f019c9cc4)
- [centerLinkJobConnector](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1af8f87624e919e067935bb5403261b63f)
- [centerLinkQueue](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1aac2a1a4d2bc65319ac7e94f0f20368b1)
- [centerLinkRunMatrixID](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a61514463a5c0f82163d4789cd9e60f8a)
- [centerLinkServer](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a226709acf22397c41215acd7f0ab0605)
- [createDesignVariable](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1adb61a037918e5f45dfc6a43541023970)
- [createVariable](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a68acd508b225f5c74c27daf848f3ae27)
- [dataHistoryToModel](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a4c0b3167dd18062593fb1a221bce40af)
- [deleteRun](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a0be98d87ed201827314037c9100e8fce)
- [deleteVariable](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1af26d20927c5ef5ccd3304b1c3ba220c4)
- [endRuns](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a0576632449bf05bc8b0274fb341a3332)
- [fromCenterLink](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a3ff1b9e535edf561dfa7f575814f1792)
- [fromXML](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a1649ee497672683a575cc6cd6b78c9a6)
- [fromXMLFile](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a3b65f441a218c193aae8863e6354cc2d)
- [fromXMLSaveContext](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ad00d42b514b490170b0d28930b4bd32b)
- [getCheckpointRunNumber](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a71781fe2343b7ef49d1fb80ed91d295a)
- [getCheckpointValue](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ae28168a3a789a8d8c2413e6c58c635d0)
- [getCompletedRunData](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a76a5d19e76fdfe69e61d6910917acb32)
- [getCompletedRunIndices](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a434f332ecfce0734f8f940da4b722cc6)
- [getDatabaseFile](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1aaecbc010eb87c6a2fbe894a646d83a4e)
- [getErrorID](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a90e9fc9cfb0d469c4169504e6f2c9cd4)
- [getErrorMessage](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a876302a3d26eda812e93bdd8b15bb26d)
- [getFailedRunIndexes](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a2acdef5238b168dae7f3294ba1629c77)
- [getFormattedValue](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a45bea3dd1938199a0846f46c3d024503)
- [getHighlightedRuns](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ab7998245db9550b3e7c21a25b37ce7bf)
- [getNumCheckpoints](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ae1070b5293d700b8e095477fbb54b80c)
- [getNumCompletedRuns](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a023f64de843e0e97d47e37b9cfbac5ae)
- [getNumCustomVars](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a0b2e2ab12279325bc63b9db7330d6bab)
- [getNumDesignVariables](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ade57b335d32a772b6de31d129b6374bc)
- [getNumExpectedRuns](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a250340a6fc41c19a43783cd3171db63d)
- [getNumFailedRuns](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ac08c8abcc799991d7b12548ae1172378)
- [getNumNonEmptyRuns](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ac1ad590e863b19678c6e47ae4ff3e521)
- [getNumRuns](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a59b24c674a512a94640f4c5a890e9309)
- [getNumVariables](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1aca767f94c4b80412c79eba62214eebfd)
- [getRunName](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a42f819d3a26184898d9487b42894d4e2)
- [getTradeStudySetup](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a5f068466f0c9b18f8ba1681d97c2ddf9)
- [getTradeStudyType](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a9f51a8f280c8bc80f4cebcb9de40ab5e)
- [getUniqueID](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a01538f2f06fba2512c31fb7a35a04b4d)
- [getValue](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a43d806edede4bc2efa5e88c7615189ed)
- [getVariable](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a074ed759e40eb4931c5b6e23f2c72e02)
- [getVariable2](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a03430a06338ca51c6f5c45421a47f320)
- [getVariableTempDir](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1aee367d3da3f483f1d9d476e832c7bb9a)
- [getVariableValues](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a03fd55d685a75a6041202d00e676e052)
- [highlight](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a77749479f2bbdf8caa1f90119e6112fd)
- [id](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a1a709440522385b3161831eea313c15d)
- [insertRun](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ab64f03fca9f43b3a491393d44c9144d5)
- [isHighlighted](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a81c862c59a3b280376afc1b9bd221116)
- [isModified](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1af7b8598fa12d5b516344517c0593a983)
- [isRunComplete](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ad0d48129784f8ce140ff3dfb76ee8ba3)
- [isRunning](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ab045302c25ef3b584eb3736b9071569b)
- [isValid](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a55e6f50a94f58d4c39bb6fe06c5398da)
- [removeAutosave](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a222463b648be93775c026887adf9d75f)
- [setDatabaseFile](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ae38c2eeccd0c6e3c6c2e68063bd7008a)
- [setError](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a51fddca34fae5fbd0a5f5c858eddac26)
- [setFormattedResult](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a9d98950fdb4e2e3f07519c40580c8ae9)
- [setHighlightedRuns](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1aea1fd966af29d2f3d0f7d95ac8f93ce3)
- [setNumExpectedRuns](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a8ee93fde7260e85a34331b2c32a1289c)
- [setResult](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a9260828e57d6cee2ec51e26dcef48ea7)
- [setResultAsFile](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a8fe368442becfe48a2642b16d9a73e3c)
- [setRunName](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1adff96af9fbbb349cd4d0d69aab8a1b43)
- [setRunValues](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1aa6fcc8d517001f5b1e1c2b4cb9d6a95c)
- [setShortVariableNames](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ae53e12cca23a7988b0d8c7dfdbe14308)
- [setTradeStudySetup](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1acfc1654be0cc6fbe5469b487f9576bb9)
- [setTradeStudyType](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a7e9c912ffb74926c67437bf50b8b944f)
- [setUniqueID](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1adc572aab955548292d15997e1b519434)
- [setUsernamePassword](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ab6b36fde7ab38b09357add72dcbaf225)
- [setVariableValues](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1aff837e76c92ab15ac33eebfe3f348c99)
- [startRuns](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a74028f784809522e15bf71133d8fd23c)
- [suggestedCountFrom](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a07162878a7dcf1c2a6ea41a56c9ddb6b)
- [suggestedDependentVars](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ae1e8705d32948c759d3ab3e59bf6306b)
- [suggestedIndependantVar](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a3b5732bdccab13e2a7ed55c852d4c55b)
- [suggestedIndependentVar](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a1713976f65a0fdc2d37e9606bbc8672b)
- [toCSV](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ada3b86a293b267a74999e35c70fea775)
- [toCSVFile](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a582bd6a4ad61e03070dcde9e4df76812)
- [toXML](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ac6e672dc87278a4037bbf085b76f6aa4)
- [toXMLFile](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a7d11e224b1eaac4fab085ed9fa3d183b)
- [toXMLSaveContext](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a21df6ed38dc18c8cc9054f40f1f9daaf)
- [tradeStudyModelFile](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1aeecce56460ab6c1c203c9d56433f4371)
- [warmStartStudyComplete](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ac68974459907dcaf6b35ea631bba2801)

## Properties

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a3b5732bdccab13e2a7ed55c852d4c55b"></a>

### Property suggestedIndependantVar

![](https://img.shields.io/badge/-public-brightgreen "public")

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

```
BSTR PHXDATAHISTORYLib::_DPHXDataHistory::suggestedIndependantVar

```

The name of the suggested independent Variable. **Deprecated**:

(misspelling)

**Return type**: BSTR

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a1713976f65a0fdc2d37e9606bbc8672b"></a>

### Property suggestedIndependentVar

![](https://img.shields.io/badge/-public-brightgreen "public")

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

```
BSTR PHXDATAHISTORYLib::_DPHXDataHistory::suggestedIndependentVar

```

The name of the suggested independent Variable.

**Return type**: BSTR

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ae1e8705d32948c759d3ab3e59bf6306b"></a>

### Property suggestedDependentVars

![](https://img.shields.io/badge/-public-brightgreen "public")

**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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a07162878a7dcf1c2a6ea41a56c9ddb6b"></a>

### Property suggestedCountFrom

![](https://img.shields.io/badge/-public-brightgreen "public")

**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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a1a709440522385b3161831eea313c15d"></a>

### Property id

![](https://img.shields.io/badge/-public-brightgreen "public")

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

```
settingRun PHXDATAHISTORYLib::_DPHXDataHistory::id

```

[IPHXDataExplorerPointer](interfacePHXDATAEXPLORERLib_1_1IPHXDataExplorerPointer.md#interfacePHXDATAEXPLORERLib_1_1IPHXDataExplorerPointer) which gives you access to the associated Data Explorer object.

**Return type**: settingRun

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a226709acf22397c41215acd7f0ab0605"></a>

### Property centerLinkServer

![](https://img.shields.io/badge/-private-red "private")

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

```
BSTR PHXDATAHISTORYLib::_DPHXDataHistory::centerLinkServer

```

**Return type**: BSTR

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a61514463a5c0f82163d4789cd9e60f8a"></a>

### Property centerLinkRunMatrixID

![](https://img.shields.io/badge/-private-red "private")

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

```
BSTR PHXDATAHISTORYLib::_DPHXDataHistory::centerLinkRunMatrixID

```

**Return type**: BSTR

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1af8f87624e919e067935bb5403261b63f"></a>

### Property centerLinkJobConnector

![](https://img.shields.io/badge/-private-red "private")

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

```
BSTR PHXDATAHISTORYLib::_DPHXDataHistory::centerLinkJobConnector

```

**Return type**: BSTR

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1aac2a1a4d2bc65319ac7e94f0f20368b1"></a>

### Property centerLinkQueue

![](https://img.shields.io/badge/-private-red "private")

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

```
BSTR PHXDATAHISTORYLib::_DPHXDataHistory::centerLinkQueue

```

**Return type**: BSTR

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a4c0b3167dd18062593fb1a221bce40af"></a>

### Property dataHistoryToModel

![](https://img.shields.io/badge/-public-brightgreen "public")

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

```
LPDISPATCH PHXDATAHISTORYLib::_DPHXDataHistory::dataHistoryToModel

```

Get or set the Data History to Model object (see [\_DPHXDataHistoryToModel](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistoryToModel.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistoryToModel)).

**Return type**: LPDISPATCH

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ac68974459907dcaf6b35ea631bba2801"></a>

### Property warmStartStudyComplete

![](https://img.shields.io/badge/-public-brightgreen "public")

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

```
boolean PHXDATAHISTORYLib::_DPHXDataHistory::warmStartStudyComplete

```

Gets/Sets warm-start trade study complete flag.

**Return type**: boolean

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1aeecce56460ab6c1c203c9d56433f4371"></a>

### Property tradeStudyModelFile

![](https://img.shields.io/badge/-public-brightgreen "public")

**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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a9a819127adb7f83be0acfa4e79f4643d"></a>

### Function addVariable

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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**:

- **var**: Pass in a filled in [IDHVariable](interfacePHXDATAHISTORYLib_1_1IDHVariable.md#interfacePHXDATAHISTORYLib_1_1IDHVariable) object from a previous call to [createVariable()](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a68acd508b225f5c74c27daf848f3ae27).

**Parameters**:

- LPDISPATCH **var**

**Return type**: void

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a8ee93fde7260e85a34331b2c32a1289c"></a>

### Function setNumExpectedRuns

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a74028f784809522e15bf71133d8fd23c"></a>

### Function startRuns

![](https://img.shields.io/badge/-public-brightgreen "public")

```
void PHXDATAHISTORYLib::_DPHXDataHistory::startRuns()

```

Identifies that the runs are starting.

**Return type**: void

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a0576632449bf05bc8b0274fb341a3332"></a>

### Function endRuns

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ac08c8abcc799991d7b12548ae1172378"></a>

### Function getNumFailedRuns

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a90e9fc9cfb0d469c4169504e6f2c9cd4"></a>

### Function getErrorID

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a876302a3d26eda812e93bdd8b15bb26d"></a>

### Function getErrorMessage

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a51fddca34fae5fbd0a5f5c858eddac26"></a>

### Function setError

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a59b24c674a512a94640f4c5a890e9309"></a>

### Function getNumRuns

![](https://img.shields.io/badge/-public-brightgreen "public")

```
long PHXDATAHISTORYLib::_DPHXDataHistory::getNumRuns()

```

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

The total number of runs.

**Return type**: long

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1aca767f94c4b80412c79eba62214eebfd"></a>

### Function getNumVariables

![](https://img.shields.io/badge/-public-brightgreen "public")

```
long PHXDATAHISTORYLib::_DPHXDataHistory::getNumVariables()

```

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

The number of variables.

**Return type**: long

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a9260828e57d6cee2ec51e26dcef48ea7"></a>

### Function setResult

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a43d806edede4bc2efa5e88c7615189ed"></a>

### Function getValue

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a55e6f50a94f58d4c39bb6fe06c5398da"></a>

### Function isValid

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1af7b8598fa12d5b516344517c0593a983"></a>

### Function isModified

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a582bd6a4ad61e03070dcde9e4df76812"></a>

### Function toCSVFile

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ac6e672dc87278a4037bbf085b76f6aa4"></a>

### Function toXML

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a7d11e224b1eaac4fab085ed9fa3d183b"></a>

### Function toXMLFile

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a1649ee497672683a575cc6cd6b78c9a6"></a>

### Function fromXML

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a3b65f441a218c193aae8863e6354cc2d"></a>

### Function fromXMLFile

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ada3b86a293b267a74999e35c70fea775"></a>

### Function toCSV

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ac1ad590e863b19678c6e47ae4ff3e521"></a>

### Function getNumNonEmptyRuns

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a074ed759e40eb4931c5b6e23f2c72e02"></a>

### Function getVariable

![](https://img.shields.io/badge/-public-brightgreen "public")

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

```

Gets the [IDHVariable](interfacePHXDATAHISTORYLib_1_1IDHVariable.md#interfacePHXDATAHISTORYLib_1_1IDHVariable) 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](interfacePHXDATAHISTORYLib_1_1IDHVariable.md#interfacePHXDATAHISTORYLib_1_1IDHVariable) object.

**Parameters**:

- VARIANT **index**

**Return type**: IDispatch \*

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a68acd508b225f5c74c27daf848f3ae27"></a>

### Function createVariable

![](https://img.shields.io/badge/-public-brightgreen "public")

```
IDispatch * PHXDATAHISTORYLib::_DPHXDataHistory::createVariable()

```

Creates a new [IDHVariable](interfacePHXDATAHISTORYLib_1_1IDHVariable.md#interfacePHXDATAHISTORYLib_1_1IDHVariable) object so that you can fill it in and pass it to addVariable. **Returns**:

An IDispatch\* to a newly created [IDHVariable](interfacePHXDATAHISTORYLib_1_1IDHVariable.md#interfacePHXDATAHISTORYLib_1_1IDHVariable) object.

**Return type**: IDispatch \*

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ab045302c25ef3b584eb3736b9071569b"></a>

### Function isRunning

![](https://img.shields.io/badge/-public-brightgreen "public")

```
boolean PHXDATAHISTORYLib::_DPHXDataHistory::isRunning()

```

Returns true if the running flag is set. **Returns**:

True if running flag is set, else false.

**Return type**: boolean

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a250340a6fc41c19a43783cd3171db63d"></a>

### Function getNumExpectedRuns

![](https://img.shields.io/badge/-public-brightgreen "public")

```
long PHXDATAHISTORYLib::_DPHXDataHistory::getNumExpectedRuns()

```

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

The number of expected runs.

**Return type**: long

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a42f819d3a26184898d9487b42894d4e2"></a>

### Function getRunName

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1adff96af9fbbb349cd4d0d69aab8a1b43"></a>

### Function setRunName

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ab64f03fca9f43b3a491393d44c9144d5"></a>

### Function insertRun

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a0be98d87ed201827314037c9100e8fce"></a>

### Function deleteRun

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1af26d20927c5ef5ccd3304b1c3ba220c4"></a>

### Function deleteVariable

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a45bea3dd1938199a0846f46c3d024503"></a>

### Function getFormattedValue

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a9d98950fdb4e2e3f07519c40580c8ae9"></a>

### Function setFormattedResult

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a0b2e2ab12279325bc63b9db7330d6bab"></a>

### Function getNumCustomVars

![](https://img.shields.io/badge/-public-brightgreen "public")

```
long PHXDATAHISTORYLib::_DPHXDataHistory::getNumCustomVars()

```

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

The number of custom variables.

**Return type**: long

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a01538f2f06fba2512c31fb7a35a04b4d"></a>

### Function getUniqueID

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a03fd55d685a75a6041202d00e676e052"></a>

### Function getVariableValues

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1adb61a037918e5f45dfc6a43541023970"></a>

### Function createDesignVariable

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a156c9828bc7c8251e68886297349ccab"></a>

### Function addVariableAt

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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](interfacePHXDATAHISTORYLib_1_1IDHVariable.md#interfacePHXDATAHISTORYLib_1_1IDHVariable) object from a previous call to [createVariable()](interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory.md#interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a68acd508b225f5c74c27daf848f3ae27).
- **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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1aff837e76c92ab15ac33eebfe3f348c99"></a>

### Function setVariableValues

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a81c862c59a3b280376afc1b9bd221116"></a>

### Function isHighlighted

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a77749479f2bbdf8caa1f90119e6112fd"></a>

### Function highlight

![](https://img.shields.io/badge/-public-brightgreen "public")

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

```

Highlight or unhighlight a run.

?&gt; 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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ade57b335d32a772b6de31d129b6374bc"></a>

### Function getNumDesignVariables

![](https://img.shields.io/badge/-public-brightgreen "public")

```
long PHXDATAHISTORYLib::_DPHXDataHistory::getNumDesignVariables()

```

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

The number of design variables.

**Return type**: long

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1acfc1654be0cc6fbe5469b487f9576bb9"></a>

### Function setTradeStudySetup

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a5f068466f0c9b18f8ba1681d97c2ddf9"></a>

### Function getTradeStudySetup

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a7e9c912ffb74926c67437bf50b8b944f"></a>

### Function setTradeStudyType

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a9f51a8f280c8bc80f4cebcb9de40ab5e"></a>

### Function getTradeStudyType

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ae53e12cca23a7988b0d8c7dfdbe14308"></a>

### Function setShortVariableNames

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1aa6fcc8d517001f5b1e1c2b4cb9d6a95c"></a>

### Function setRunValues

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a2acdef5238b168dae7f3294ba1629c77"></a>

### Function getFailedRunIndexes

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a21df6ed38dc18c8cc9054f40f1f9daaf"></a>

### Function toXMLSaveContext

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ad00d42b514b490170b0d28930b4bd32b"></a>

### Function fromXMLSaveContext

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a434f332ecfce0734f8f940da4b722cc6"></a>

### Function getCompletedRunIndices

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ad0d48129784f8ce140ff3dfb76ee8ba3"></a>

### Function isRunComplete

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a9e6d72c9c2f589323e745f69426aaefb"></a>

### Function addCheckpoint

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ae1070b5293d700b8e095477fbb54b80c"></a>

### Function getNumCheckpoints

![](https://img.shields.io/badge/-public-brightgreen "public")

```
long PHXDATAHISTORYLib::_DPHXDataHistory::getNumCheckpoints()

```

Gets the number of warm start checkpoints available **Returns**:

the number of warm start checkpoints available

**Return type**: long

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ae28168a3a789a8d8c2413e6c58c635d0"></a>

### Function getCheckpointValue

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a71781fe2343b7ef49d1fb80ed91d295a"></a>

### Function getCheckpointRunNumber

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1adc572aab955548292d15997e1b519434"></a>

### Function setUniqueID

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a023f64de843e0e97d47e37b9cfbac5ae"></a>

### Function getNumCompletedRuns

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a76a5d19e76fdfe69e61d6910917acb32"></a>

### Function getCompletedRunData

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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. ?&gt; 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.

?&gt; 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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ab7998245db9550b3e7c21a25b37ce7bf"></a>

### Function getHighlightedRuns

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1aea1fd966af29d2f3d0f7d95ac8f93ce3"></a>

### Function setHighlightedRuns

![](https://img.shields.io/badge/-public-brightgreen "public")

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

```

Specify the set of currently highlighted run indices. ?&gt; 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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a9bf37e7831e0c32cfe17225f019c9cc4"></a>

### Function addVariableStructs

![](https://img.shields.io/badge/-public-brightgreen "public")

```
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](structPHXDATAHISTORYLib_1_1DataHistoryVariableStruct.md#structPHXDATAHISTORYLib_1_1DataHistoryVariableStruct)**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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a3ff1b9e535edf561dfa7f575814f1792"></a>

### Function fromCenterLink

![](https://img.shields.io/badge/-private-red "private")

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

```

**Parameters**:

- BSTR **serverName**
- BSTR **runMatrixID**
- BSTR **userName**
- BSTR **password**

**Return type**: void

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ab6b36fde7ab38b09357add72dcbaf225"></a>

### Function setUsernamePassword

![](https://img.shields.io/badge/-private-red "private")

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

```

**Parameters**:

- BSTR **username**
- BSTR **password**

**Return type**: void

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a8fe368442becfe48a2642b16d9a73e3c"></a>

### Function setResultAsFile

![](https://img.shields.io/badge/-private-red "private")

```
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

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1aaecbc010eb87c6a2fbe894a646d83a4e"></a>

### Function getDatabaseFile

![](https://img.shields.io/badge/-private-red "private")

```
BSTR PHXDATAHISTORYLib::_DPHXDataHistory::getDatabaseFile()

```

**Return type**: BSTR

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1ae38c2eeccd0c6e3c6c2e68063bd7008a"></a>

### Function setDatabaseFile

![](https://img.shields.io/badge/-private-red "private")

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

```

**Parameters**:

- BSTR **filename**

**Return type**: void

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a222463b648be93775c026887adf9d75f"></a>

### Function removeAutosave

![](https://img.shields.io/badge/-private-red "private")

```
void PHXDATAHISTORYLib::_DPHXDataHistory::removeAutosave()

```

**Return type**: void

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1a03430a06338ca51c6f5c45421a47f320"></a>

### Function getVariable2

![](https://img.shields.io/badge/-private-red "private")

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

```

**Parameters**:

- VARIANT **index**

**Return type**: IDispatch \*

<a id="interfacePHXDATAHISTORYLib_1_1__DPHXDataHistory_1aee367d3da3f483f1d9d476e832c7bb9a"></a>

### Function getVariableTempDir

![](https://img.shields.io/badge/-private-red "private")

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

```

**Parameters**:

- VARIANT **index**

**Return type**: BSTR