IDMDocument

DM2000 is a standard MDI application, like other popular desktop applications: it consists of main window (MDI frame) and a number of child windows (document, or data windows). Thus, while IDMApplication interface represents main application window and has a collection of document windows, IDMDocument interface provides access to document windows. Every document window, in turn, has three child objects: invisible data container and two visible "interiors": worksheet and plot, both used to display container's data. Note that all appropriate coclasses except DMApplication are hidden - you cannot explicitly create instances of DMDocument, DMContainer, DMWorksheet and so on, but you have access to these objects via properties of another objects.

Property property WindowCaption: bstr

Change window caption. Don't mix window caption and file name, associated with data container object! To modify file name you should change appropriate property of DMContainer. This property may be changed from UI by Window|Rename command and implicitly by File|Save As command.

Property property WindowState: enum

This property controls window view. It can have one of the following values:

Setting this property is equal to appropriate UI commands from View menu.

Read/only property r/o property Container: IDispatch

Return reference to DMContainer object.

Read/only property r/o property Worksheet: IDispatch

Return reference to DMWorksheet object.

Read/only property r/o property Plot: IDispatch

Return reference to DMPlot object.

Property property IsRecording: boolean

As long as DM2000 is MDI application, one needs a way to select document window for recording data from experimental program. Moreover, although you can write data to any number of windows simultaneously, user wishes to have a visual feedback - "recording" window usually must looks differently. To solve this problem you can set window's IsRecording property. In addition, this property used by IDMApplication.RecordPoint() method.

Method method Activate

Only one of MDI child windows may be active, that is, has input focus. This procedure makes document window active. Note that activation can change index of document in IDMApplication.Documents[] property.

Method method Close

This procedure closes document window. It is similar to File|Close menu command.

Method method SaveUndoInfo

This method simply copies contents of data container into another container - Undo Buffer. It is recommended that you will call SaveUndoInfo before any data changes, especially if you modify a range of lines simultaneously. Note that if container has many lines this operation takes a time, and it displays its progress in status line.