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.
Return number of opened document windows
Provide access to collection of DMDocument objects. Index range from 0 to DocumentCount-1.
Return DMDocument object for active document window
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).
Return DMNotes object
Display message in status line
Display hint in the hint area of status line
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.
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.
Change visibility of UI controls associated with defined action
Enable or disable UI controls associated with defined action
Check or uncheck UI controls associated with defined action
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.
This method also should be used from experimental program to pass its settings into DM2000. Experimental program settings are remembered in MetaBase.
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:
- wtEqual = $00000000;
- wtRelative = $00000001;
- wtAbsolute = $00000002;
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:
- frOK = $00000000;
- frError = $00000001;
- frFitError = $00000002;
- frBadParams = $00000003;
- frParamConv = $00000004;
- frChiConv = $00000005;
- frMaxIter = $00000006;
See example desktop and VB script files for more information about automating NLSF.
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.
- lfbPoly = $00000000; polynomial fit, any reasonable number of terms
- lbfFourier = $00000001; harmonic, number of terms must be even
- lbfPower = $00000002; power, NumTerms=2
- lbfExponent = $00000003; exponential, NumTerms=2
- lbfLorentz = $00000004; simple lorentzian, NumTerms=3
- lbfSine = $00000005; NumTerms=3