    

 ## On this page

  

 

 # DataCollector

 Last update: 30.07.2026 

public class [DataCollector](index.md) : [PHXCOMObject](./../../com.phoenix_int.ModelCenter.util/-p-h-x-c-o-m-object/index.md)

This is the wrapper class that handles the native COM calls to a Data Collector. The class is used by Java plug-ins to ModelCenter.

#### Author

Woyak, 9-01

## Constructors

[DataCollector](-data-collector.md)constructor(pstrm: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html))  
Connects this Java object to the specified session of ModelCenter## Functions

NameSummary[addCustom](add-custom.md)public [addCustom](add-custom.md)(eqn: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), label: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html))  
adds a custom variable to be displayed in the Data Collector[createEmptyRuns](create-empty-runs.md)public [createEmptyRuns](create-empty-runs.md)(numEmptyRuns: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html))  
For internal use only[disableGC](./../../com.phoenix_int.ModelCenter.util/-p-h-x-c-o-m-object/disable-g-c.md)public [disableGC](./../../com.phoenix_int.ModelCenter.util/-p-h-x-c-o-m-object/disable-g-c.md)(gc: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html))  
If true, prevents releaseObjects from doing anything.[enableCarpetPlotTab](enable-carpet-plot-tab.md)public [enableCarpetPlotTab](enable-carpet-plot-tab.md)(var1: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), var2: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), plotVar: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html))  
public [enableCarpetPlotTab](enable-carpet-plot-tab.md)(id: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html), var1: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), var2: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), plotVar: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html))  
For internal use only[enableGraphTab](enable-graph-tab.md)public [enableGraphTab](enable-graph-tab.md)(flag: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html))  
Enables the Graph tab[enableMainEffectsTab](enable-main-effects-tab.md)public [enableMainEffectsTab](enable-main-effects-tab.md)()  
For internal use only[endRuns](end-runs.md)public [endRuns](end-runs.md)()  
lets the Data Collector know that all runs have completed[exportToCSV](export-to-c-s-v.md)public [exportToCSV](export-to-c-s-v.md)(fileName: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html))  
exports the trade study data to a comma-separated file[fromString](from-string.md)public [fromString](from-string.md)(str: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html))  
Restores a Data Collector setup from a string generated by "toString"[getDataExplorer](get-data-explorer.md)public [getDataExplorer](get-data-explorer.md)(): [DataExplorer](./../-data-explorer/index.md)  
Gets the associated Data Explorer window[getErrorID](get-error-i-d.md)public [getErrorID](get-error-i-d.md)(run: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)): [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)  
get the error id for the specified run[getErrorMessage](get-error-message.md)public [getErrorMessage](get-error-message.md)(run: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)): [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html)  
gets the error message associated with the specified run[getNumFailedRuns](get-num-failed-runs.md)public [getNumFailedRuns](get-num-failed-runs.md)(): [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)  
gets the number of failed runs[getNumRuns](get-num-runs.md)public [getNumRuns](get-num-runs.md)(): [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)  
gets the number of runs stored in the Data Collector[getNumVariables](get-num-variables.md)public [getNumVariables](get-num-variables.md)(): [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)  
gets the number of variables stored in the Data Collector[getValue](get-value.md)public [getValue](get-value.md)(name: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), run: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)): [Variant](./../-variant/index.md)  
public [getValue](get-value.md)(index: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html), run: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)): [Variant](./../-variant/index.md)  
gets the value for a specified variable[getVariableDescription](get-variable-description.md)public [getVariableDescription](get-variable-description.md)(name: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html)): [VariableDescription](./../-variable-description/index.md)  
public [getVariableDescription](get-variable-description.md)(index: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)): [VariableDescription](./../-variable-description/index.md)  
gets a description object for the specified variable[hide](hide.md)public [hide](hide.md)()  
caused the Data Collector to hide[isValid](is-valid.md)public [isValid](is-valid.md)(name: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), run: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)  
public [isValid](is-valid.md)(index: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html), run: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)  
checks to see if a variable value is valid or not[isVisible](is-visible.md)public [isVisible](is-visible.md)(): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)  
Determine if the data collector is visible.[newCustomDesignPoint](new-custom-design-point.md)public [newCustomDesignPoint](new-custom-design-point.md)(): [CustomDesignPoint](./../-custom-design-point/index.md)  
For internal use only[newInstance](new-instance.md)public [newInstance](new-instance.md)(): [DataCollector](index.md)  
creates a new DataCollector object (that is connected to the same ModelCenter session) that is not currently attached to any thread.[release](./../../com.phoenix_int.ModelCenter.util/-p-h-x-c-o-m-object/release.md)public [release](./../../com.phoenix_int.ModelCenter.util/-p-h-x-c-o-m-object/release.md)()  
Releases the COM reference to ModelCenter for this object.[releaseObjects](./../../com.phoenix_int.ModelCenter.util/-p-h-x-c-o-m-object/release-objects.md)public [releaseObjects](./../../com.phoenix_int.ModelCenter.util/-p-h-x-c-o-m-object/release-objects.md)()  
This function attempts to release any COM resources left behind from objects which have been finalized but release() was never called on them.[save](save.md)public [save](save.md)(fileName: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), displayName: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), description: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), author: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), saveModel: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html))  
saves the trade study[selectX](select-x.md)public [selectX](select-x.md)(label: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html))  
selects a variable for the X-axis[selectY](select-y.md)public [selectY](select-y.md)(label: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html))  
selects a variable for the Y-axis[setCustomRun](set-custom-run.md)public [setCustomRun](set-custom-run.md)(index: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html), customDesignPoint: [CustomDesignPoint](./../-custom-design-point/index.md))  
For internal use only[setNumExpectedRuns](set-num-expected-runs.md)public [setNumExpectedRuns](set-num-expected-runs.md)(numRuns: [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html))  
lets the Data Collector how many runs are expected.[setReferenceDebugMode](./../../com.phoenix_int.ModelCenter.util/-p-h-x-c-o-m-object/set-reference-debug-mode.md)public [setReferenceDebugMode](./../../com.phoenix_int.ModelCenter.util/-p-h-x-c-o-m-object/set-reference-debug-mode.md)(on: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html))  
When set to true, the system will keep a list of active COM objects that are allocated but not yet released since this method was invoked.[show](show.md)public [show](show.md)()  
caused the Data Collector to be displayed[startRuns](start-runs.md)public [startRuns](start-runs.md)()  
lets the Data Collector know that it has been setup and runs are beginning[storeCurrentDesignPoint](store-current-design-point.md)public [storeCurrentDesignPoint](store-current-design-point.md)()  
causes the Data Collector to store the current data from ModelCenter[storeCustomDesignPoint](store-custom-design-point.md)public [storeCustomDesignPoint](store-custom-design-point.md)(customDesignPoint: [CustomDesignPoint](./../-custom-design-point/index.md))  
For internal use only[toString](to-string.md)public [toString](to-string.md)(): [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html)  
Converts the Data Collector setup to a string