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
- addVariable
- addVariableAt
- addVariableStructs
- centerLinkJobConnector
- centerLinkQueue
- centerLinkRunMatrixID
- centerLinkServer
- createDesignVariable
- createVariable
- dataHistoryToModel
- deleteRun
- deleteVariable
- endRuns
- fromCenterLink
- fromXML
- fromXMLFile
- fromXMLSaveContext
- getCheckpointRunNumber
- getCheckpointValue
- getCompletedRunData
- getCompletedRunIndices
- getDatabaseFile
- getErrorID
- getErrorMessage
- getFailedRunIndexes
- getFormattedValue
- getHighlightedRuns
- getNumCheckpoints
- getNumCompletedRuns
- getNumCustomVars
- getNumDesignVariables
- getNumExpectedRuns
- getNumFailedRuns
- getNumNonEmptyRuns
- getNumRuns
- getNumVariables
- getRunName
- getTradeStudySetup
- getTradeStudyType
- getUniqueID
- getValue
- getVariable
- getVariable2
- getVariableTempDir
- getVariableValues
- highlight
- id
- insertRun
- isHighlighted
- isModified
- isRunComplete
- isRunning
- isValid
- removeAutosave
- setDatabaseFile
- setError
- setFormattedResult
- setHighlightedRuns
- setNumExpectedRuns
- setResult
- setResultAsFile
- setRunName
- setRunValues
- setShortVariableNames
- setTradeStudySetup
- setTradeStudyType
- setUniqueID
- setUsernamePassword
- setVariableValues
- startRuns
- suggestedCountFrom
- suggestedDependentVars
- suggestedIndependantVar
- suggestedIndependentVar
- toCSV
- toCSVFile
- toXML
- toXMLFile
- toXMLSaveContext
- tradeStudyModelFile
- warmStartStudyComplete
Properties
Property suggestedIndependantVar
LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)
Property suggestedIndependentVar
LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)
Property suggestedDependentVars
LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)
Property suggestedCountFrom
LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)
Property id
LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 178)
Property centerLinkServer
LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)
Property centerLinkRunMatrixID
LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)
Property centerLinkJobConnector
LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)
Property centerLinkQueue
LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)
Property dataHistoryToModel
LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)
Property warmStartStudyComplete
LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)
Property tradeStudyModelFile
LIBS/DataExplorer/PHXDataHistory/PHXDataHistory.odl (line 1)
Public functions
Function addVariable
- var: Pass in a filled in IDHVariable object from a previous call to createVariable().
- LPDISPATCH var
Function setNumExpectedRuns
- numRuns: The expected number of runs.
- long numRuns
Function startRuns
Function endRuns
Function getNumFailedRuns
Function getErrorID
- run: The 0 based index to the run to access.
- long run
Function getErrorMessage
- run: The 0 based index to the run to access.
- long run
Function setError
- 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.
- long run
- long errorID
- BSTR message
Function getNumRuns
Function getNumVariables
Function setResult
- 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.
- VARIANT index
- long run
- VARIANT value
- boolean valid
- boolean modified
Function getValue
- 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.
- VARIANT index
- long run
Function isValid
- 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.
- VARIANT index
- long run
Function isModified
- 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.
- VARIANT index
- long run
Function toCSVFile
- 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.
- BSTR fileName
- [optional] VARIANT variablesInRows
- [optional] VARIANT includeFailed
Function toXML
- includeRunData:
- [optional] VARIANT includeRunData
Function toXMLFile
- fileName: The file to write. It will be overwritten if it exists, or created if it doesn’t.
- includeRunData:
- BSTR fileName
- [optional] VARIANT includeRunData
Function fromXML
- 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.
- BSTR xmlStr
- [optional] VARIANT root
Function fromXMLFile
- 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.
- BSTR fileName
- [optional] VARIANT root
Function toCSV
- variablesInRows: If true, variables will be in rows. If false, they will be in columns.
- includeFailed: Whether to include failed runs in the output.
- [optional] VARIANT variablesInRows
- [optional] VARIANT includeFailed
Function getNumNonEmptyRuns
Function getVariable
- index: Either a 0 based index to the Variable, or the name of a Variable.
- VARIANT index
Function createVariable
Function isRunning
Function getNumExpectedRuns
Function getRunName
- runNum: The 0 based index to the run to access.
- long runNum
Function setRunName
- runNum: The 0 based index to the run to access.
- name: The name of the run.
- long runNum
- BSTR name
Function insertRun
- 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.
- long insertBefore
Function deleteRun
- run: The 0 based index to the run to delete.
- long run
Function deleteVariable
- index: Either a 0 based index to the Variable, or the name of a Variable.
- VARIANT index
Function getFormattedValue
- 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.
- VARIANT index
- long run
Function setFormattedResult
- 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.
- VARIANT index
- long run
- BSTR value
- boolean valid
- boolean modified
Function getNumCustomVars
Function getUniqueID
Function getVariableValues
- index: The 0 based index or name of the variable to query.
- VARIANT index
Function createDesignVariable
- index: The 0 based index of the variable to copy.
- VARIANT index
Function addVariableAt
- 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.
- LPDISPATCH var
- long location
Function setVariableValues
- 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.
- VARIANT index
- long run
- VARIANT values
- boolean valid
- boolean modified
Function isHighlighted
- run: Run ID (0-based index).
- long run
Function highlight
- run: Run ID (0-based index).
- highlight: True to highlight, false to remove highlight.
- handleEvent: Handle highlight event in the listener.
- long run
- boolean highlight
- boolean handleEvent
Function getNumDesignVariables
Function setTradeStudySetup
- setup: The XML string to set up the trade study.
- BSTR setup
Function getTradeStudySetup
Function setTradeStudyType
- type: The type of trade study.
- BSTR type
Function getTradeStudyType
Function setShortVariableNames
- shortenVariableNames: True to shorten variable names.
- boolean shortenVariableNames
Function setRunValues
- run: Run ID (0-based index).
- values: Array of values.
- valid: Whether values are valid.
- modified: Whether values should appear as modified.
- long run
- VARIANT values
- BOOL valid
- BOOL modified
Function getFailedRunIndexes
Function toXMLSaveContext
- 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:
- LPDISPATCH saveContext
- [optional] VARIANT includeRunData
Function fromXMLSaveContext
- 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.
- LPDISPATCH saveContext
- [optional] VARIANT root
Function getCompletedRunIndices
Function isRunComplete
- run: Run ID (0-based index).
- long run
Function addCheckpoint
- name: name for the checkpoint
- value: value for the checkpoint
- long runNumber
- BSTR value
Function getNumCheckpoints
Function getCheckpointValue
- checkpointIndex: Checkpoint Index (0-based index)
- long checkpointIndex
Function getCheckpointRunNumber
- checkpointIndex: Checkpoint Index (0-based index)
- long checkpointIndex
Function setUniqueID
- identifier: The unique ID for this DataHistory object.
- long identifier
Function getNumCompletedRuns
Function getCompletedRunData
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
- [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
Function getHighlightedRuns
Function setHighlightedRuns
- 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.
- COM: exception thrown if passed non-numeric types or arrays of non-numeric types.
- VARIANT selectedRunIndices
Function addVariableStructs
- dhVarStructs: SAFEARRAY of DataHistoryVariableStructs to add
- run: The 0 based index to the run to set.
- VARIANT dhVarStructs
- long run
Private functions
Function fromCenterLink
- BSTR serverName
- BSTR runMatrixID
- BSTR userName
- BSTR password
Function setUsernamePassword
- BSTR username
- BSTR password
Function setResultAsFile
- VARIANT index
- long run
- boolean valid
- boolean modified
- BSTR tempFileName
- BSTR tempFileDir
Function getDatabaseFile
Function setDatabaseFile
- BSTR filename
Function removeAutosave
Function getVariable2
- VARIANT index
Function getVariableTempDir
- VARIANT index