This interface provides access to the document window properties. In particular, it includes references to the data container, worksheet and plot objects. Use its members to display and manipulate data.
|Activate||7||Activate window and restore if minimized|
|SaveUndoInfo||9||Save Undo Information|
|CanUndo||102||True if undo is possible|
|Undo||103||Undo last operation|
|Clone||104||Make a copy of the data window|
|SaveUndo||105||Save undo information and operation name|
|property WindowCaption: BSTR|
Changes window title (or caption). Don't mix window caption and the file name, associated with data container object!
|property WindowState: User_Defined|
This property controls window view. It can have one of the values listed in the WindowStates enumeration. Do not mix this property with WindowSize that reflects "size" state!
|r/o property Container: IDispatch|
For DMDocument and DMSerie objects, Container property returns reference to the associated DMContainer object. Notice that for DMSerie object, this property is read/write, that is, you can assign to it container of any document.
For DMDigitizer, this property returns reference to the DMDigitizerContainer object, which is used only to store points coordinates.
|r/o property Worksheet: IDispatch|
Returns reference to the DMWorksheet object.
|property IsRecording: Boolean|
For DMDocument, this property indicates whether appropriate data window is in the "recording" state, that is, used for recording data from the measurement system (or for another real-time data streaming). Such window has a thick colored frame. Besides, "recording" data window is not only a visual feedback - it doesn't refresh plot when you set Container.Modified=true, and doesn't refresh Series Manager when you set Container.Modified=false (although worksheet updates its size). This feature should be used to eliminate flickers and significantly increase data streaming rates (and reduce CPU load). In addition, value of this property analyzed in the IDMApplication.RecordPoint() method.
For DMSerie, this property reflects the fact that this series is used to display accumulated data. When it is set to True, a little cross is displayed at the last point. Set IsRecording property to indicate that you are adding points into this series.
|function Activate: VOID|
Only one of MDI child windows may be active, that is, has input focus. For DMDocument, this procedure
makes document window active. Note that activation can change index of document in the Documents property.
For DMSerie object, Activate just makes this series active, or current, by changing IDMPlot.SerieIndex property. Of course, its position in the Series array does not change.
' DMDocument: dim Doc set Doc=Server.Documents(1) Doc.Activate ' DMSerie: Server.ActiveDocument.Plot.Series(2).Activate
|function Close: VOID|
For DMDocument, this procedure closes document window. It is similar to Window|Close menu command.
For DMIEEE488Port, DMClientSocket, DMComPort and DMComTerminal, Close method closes the appropriate communication port.
DMDLLHelper.Close unloads DLL so that all subsequent API calls become impossible. DMAppHelper.Close also clears internal reference to DM2003 DOM. It is recommended to close these objects after use.
DMApplication.Close should be invoked to terminate DM2003. Unlike executing ExitAction, it does not display COM server warning for external (out of process) servers. For example, you may place following code in the HTML page loaded into the separate instance of MSIE browser:
sub Btn_onclick dim app set app=CreateObject("DM.DMApplication") ' do something useful... . . . . . ' wrong - does not avoid COM warning message: 'app.ExecuteCommand "ExitAction" ' right - nothing displayed if no unsaved data: app.Close set app=Nothing end sub
|function SaveUndoInfo: VOID|
This method implemented only for backward compatibility with DM2000. Use SaveUndo() method instead, since it allows you to indicate which operation have modified data.
|property WindowSize: User_Defined|
This property controls window size. It can have one of the values listed in the WindowSizes enumeration. Do not mix this property with WindowState that reflects "view" state!
|function CanUndo: Boolean|
This method returns True if Undo operation for given object is possible. Use it to monitor controls associated with the "Undo" command.
|function Undo: VOID|
Performs Undo operation for the given object, that is, restore data to the previous state.
For DMDocument object, you should explicitly copy undo information using the SaveUndo() method before you start to change data in the container. Keep in mind that this method restores only data, so that, series ranges may change if you, for example, delete some lines.
|function Clone(Data): IDispatch|
Makes a copy of the selected data window and returns reference to its DMDocument object. If Data parameter is false, Container's data will not be copied into new window.
|function SaveUndo(Operation): VOID|
This method simply copies contents of data container into another container - Undo Buffer. It is recommended that you will call SaveUndo before any data changes, especially if you modify a range of lines simultaneously. Operation parameter will be displayed in the statusline hint for the "Undo" command.