Make your own free website on


IDMApplication interface implemented by DMApplication object. You can create instances of this object externally by its ProgID: "DM.DMApplication". Note that DM2000 uses single-instance automation class type, thus causing a new copy of the application to be run each time an OLE Automation controller asks for an instance of appropriate coclass. Some members of this interface may be examined with AppDemo online sample program.

Read/only property r/o property DocumentCount: long

Return number of opened document windows

Read/only property r/o property Documents[index: long]: IDispatch

Provide access to collection of DMDocument objects. Index range from 0 to DocumentCount-1.

Read/only property r/o property ActiveDocument: IDispatch

Return DMDocument object for active document window

Method method CreateDocument(filename: bstr): IDispatch

Create new document window. If filename is empty, this method is equal to "File|New" command. If you specify non-empty file name, you can load appropriate data file or create window from template (if filename extension is *.dmw).

Read/only property r/o property Notes: IDispatch

Return DMNotes object

Method method DisplayMessage(msg: bstr)

Display message in status line

Method method DisplayHint(hint: bstr)

Display hint in the hint area of status line

Method method ShowProgress(progress: long)

Display progress of time-consuming operations in the progress bar. Available only from in-process scripting (script window). Progress must vary from 0 to 100.

Method method ExecuteCommand(name: bstr)

Almost any action invoked from UI controls (menu or toolbar) may be performed programmatically by its name. See the list of action names for more details.

Property property IsCommandVisible[name: bstr]: boolean

Change visibility of UI controls associated with defined action

Property property IsCommandEnabled[name: bstr]: boolean

Enable or disable UI controls associated with defined action

Property property IsCommandChecked[name: bstr]: boolean

Check or uncheck UI controls associated with defined action

Method method RecordPoint(Labels,Values: variant)

This method allows experimental program to record data point into first document window whose IsRecording property is set to true. It also automatically update worksheet column labels, scroll worksheet to end line and plot new point. Labels and Values may be strings or arrays. Instead of RecordPoint() you may decide to use DMDocument properties directly for full control of visualization process.

Method method SetExpSettings(settings: bstr)

This method also should be used from experimental program to pass its settings into DM2000. Experimental program settings are remembered in MetaBase.

Method method LMFit(X,Y,W: variant; WType: WeightType; Expression, Params,Sigma,NIter: variant; out ChiSqr, ResultCode: variant)

DM2000 NLSF fitter allows you to create extremely powerful automatic data processing routines. This method performs up to NIter Levenberg-Marquardt iterations, actual number of iterations returned in this parameter. X,Y - variant arrays with curve to be fitted; W - point weights. Weight type can be one of:

Expression must have the same syntax as in appropriate dialog box, parameters are named P1, P2, etc. Initial parameter values passed in Params array, and any parameter may be fixed if you set corresponding Sigma[] value to -1, otherwise Sigma[] must be 0. After all iterations are completed, you should read parameters from Params array, their deviations from Sigma array, Chi-Sqr and result code from appropriate parameters. Result codes listed below:

See example desktop and VB script files for more information about automating NLSF.

Method method LinearFit(X, Y: variant; NumTerms: Integer; BasisType: LinearBasisType; out Solution, Deviation, ResultCode: variant)

Linear fitter not so interesting as LM one described above, but in some cases it may be more suitable. One of its main advantages is speed: linear fitting does not require iterative calculations. X,Y arrays are curve to be fitted, NumTerms and BasisType define fitting expression, parameter values returned in Solution array.