Make your own free website on Tripod.com

File Operations

DM2000 application can handle many file types, but unlike "office applications" these files, in general, are not "documents". That's why DM2000 does not support object embedding, although you can easily export data (text and pictures) into any Windows application.

Data Files. Most important file type is data files. Data files may have any extension, default one is *.dat. These files contain only numbers separated by spaces and actually are simple ASCII texts. Lines below is an example of such file:

2655 1.0001 0.0054 100 298 
2656 1.0001 0.0054 100 300 
2657.6633 1.0002 0.0045775531 100 296 
2663.0703 1.0002024 0.0050046856 100 294 
2668.2281 1.0002 0.0054910084 100 292 
2673.244 1.0002419 0.0060325396 100 290 
2678.1813 1.0003001 0.0064681307 100 288 
2683.0256 1.0002382 0.0067814124 100 286 

Values also may be separated by commas and tabstops. Decimal point character always assumed to be period (.) independent on system locales, otherwise fractional part will be interpreted as separate value. Note that CSV file format may be interpreted incorrectly because CSV file may contain several adjacent commas.

Data files are loaded into data windows with File|Open menu command, or you can just drop files from file manager into DM2000 main window area. Another way to open data files is to create file associations and open files directly from file manager. Keep in mind that File|Open command from main menu loads files with *.htm or *.html extension into Minibrowser, files with *.js or *.vbs extension into Script Window, files with *.txt extension into Notes window and treats files with *.dmw extension as Desktop files.

Desktop files. Desktop file (*.dmw) is a binary copy of memory allocated for internal DM2000 objects. Although the mechanisms DM2000 uses to read/write such files are the same as used in Delphi to process forms (*.dfm), desktops are not form files. Every version of Data Master has its own format of desktop file, and in future versions of DM2000 it will probably be changed. I don't recommend to store data only in desktop files - always make *.dat copies in ASCII format. Use File|Open and File|Save Desktop menu commands to load/save desktop files to disk.

Desktop files also may be used to make window templates: create new data window, change colors, fonts, worksheet and plot attributes and save desktop (it must contain exactly one empty data window). If you specify this file as template (see Application Properties) every time when you create new window or open data file all window settings will be read from this template.

Script files. Script files are ASCII text files with script program and should be loaded into Script Window. Note that Script Window is available only if you properly install Microsoft Scripting Control OCX as described in DM2000 installation instruction. See DM2000 Programmer's Guide for more information about scripts and DM2000 programming. Script Window has its own controls for loading/saving files, and you also can use drag&drop operations (only if this window is floating). Default extensions for VB Scripts is *.vbs, for JavaScripts is *.js.

Notes. DM2000 has Notes Window available from Options menu. This is actually simple text editor like notepad but its contents are saved in desktop files and exposed via OLE Automation. Notes may be used to keep description of desktop file or as "console" window to trace script execution. Like in Script Window you may load or save Notes to disk file. For Windows 9.x platforms size of Notes is limited to 64kB (like any text editing control).

Hypertext documents. Minibrowser window (Options|Browser) is based on Microsoft WebBrowser ActiveX control and should be used to open web pages or disk files specially designed for DM2000. However, actually it is regular Internet Explorer and you may browse any file or web site as usual.