This interface provides access to the DM2003 Notes window. Use its members to load and save text files and manipulate data in the Notes editor.
It should be specially mentioned that DMNotes object is also a collection of editor's lines.
|AddLine||3||Add new line at the end of Lines|
|InsertLine||4||Insert new line|
|DeleteLine||5||Delete selected line|
|Clear||6||Clear all lines|
|Load||7||Load lines from text file|
|Save||8||Save lines to text file|
|CanPaste||101||True if clipboard has text|
|SelectionStart||102||Change selection start position|
|SelectionLength||103||Change selection length|
|CopyToClipboard||105||Copy selection to the clipboard|
|PasteFromClipboard||106||Paste selection from the clipboard|
|Cut||108||Cut selection and place it on the clipboard|
|Undo||109||Undo last operation|
|CanUndo||110||True if undo is possible|
|SelectAll||111||Select all text|
|Modified||112||Change Modified flag|
|_NewEnum||-4||Return Notes lines enumerator object|
|r/o property LineCount: Long|
Returns number of lines in Notes editor.
|property Lines[Index]: BSTR|
Use this array property to change selected line in the Notes editor. Index ranges from 0 to LineCount-1. You also can iterate Notes lines in the "for..each" cycle as shown in the example:
Ss="" for each S in Server.Notes Ss=Ss & S & vbCr next MsgBox Ss
|function AddLine(Line): VOID|
Adds line to the end of editor's text.
|function InsertLine(Position, Line): VOID|
Inserts line at specified position (0..LineCount-1).
|function DeleteLine(Position): VOID|
Deletes selected line.
|function Clear: VOID|
For DMContainer and DMDigitizerContainer objects, Clear method empties the container and set Modified property to True.
For DMDigitizer, this method clears digitizer picture.
For DMListItems, DMNotes and DMStrings Clear also empties the contents of the appropriate Items (or Lines) arrays.
For HP4191X, B740X and E712X this method initialize appropriate device into some predefined state.
For DMLabels, this method deletes all plot labels.
|function Load(FileName): VOID|
Load method allows you to load data from the disk file into the object. For DMContainer, text-type (ASCII) file must contain values separated by commas, tabstops or spaces. For DMDigitizerContainer, however, this method not supported. As of build #415, compressed data format (binary) was added.
DMDigitizer.Load should be used to load picture into the digitizer. DMNotes.Load just loads text into the Notes editor. DMLabel uses Load() member to copy images in various formats (ico, bmp, jpg, gif, png) into the metafile.
For DMContainer, DMLabel and DMNotes objects, this method also can handle HTTP and FTP URLs, so that you can download files located on the Internet/Intranet.
|function Save(FileName): VOID|
Saves object's data to the selected disk file.
For DMContainer, values are separated by spaces, each item take a separate line. Modified property automatically cleared. In the DMDigitizerContainer object this method not implemented. As of build #415, compressed data format (binary) may be used - it depends on CompressDataFiles application option.
DMNotes object just writes editor's text to the disk. DMPlot object saves itself as a metafile picture.
|property Text: BSTR|
For DMForms ActiveX controls (DMComboBox, DMExpressionComboBox, DMListBox, DMFloatEdit, DMSpinEdit) this property changes the text in the appropriate control.
For collection objects (DMListItems, DMStrings), this property represents the contents of the collection as a single block of text. Lines are separated by standard CRLF characters.
For DMNotes, this property also operates with the editor's data as a whole.
For DMSerie and DMLabel objects, Text is just a label.
For device driver ActiveX controls (HP4191X, B740X and E712X) this property should be used to read and write data from/to the device.
|function CanPaste: Boolean|
CanPaste method returns True if clipboard has valid data for PasteFromClipboard method. Use it to monitor controls associated with "Paste" command. Notice: for IDMApplication3 interface, this method has a parameter whose value allows to test whether desirable clipboard format is available.
|property SelectionStart: Long|
|property SelectionLength: Long|
|function Select(SelStart, SelEnd): VOID|
For DMNotes object, this method should be used to select text in the editor. SelStart and SelEnd parameters are first and last character positions.
For DMPlot object, Select() changes numeric (double precision) coordinates of the plot selection area. This area may be visualized using SelectionVisible property and affects on some plot editing commands.
For DMWorksheet, this method defines integer coordinates of the worksheet selection. Left and Right ranges are (1..26), Top and Bottom are (0..Container.ItemCount-1).
For DMSerie, Select() has almost the same meaning as for DMWorksheet. Columns are ranged from 1 to 26, lines - from 0 to Container.ItemCount-1. However, XCol and YCol must represent valid data, that is, all items in the selected data range must have appropriate number of columns.
For DMLabel, this method allows you programmatically select label object. Notice that Select() has no effect until IDMPlot2.MouseMode<>pmmLabelEdit.
|function CopyToClipboard: VOID|
For DMNotes, this method copies selected text on the clipboard as in any text editor.
For DMPlot, CopyToClipboard has a parameters. Mode parameter determine what data will be copied; possible values listed in the PlotCopyModes enumeration. UseTabs parameter defines what character will be used as separator between values: some programs can correctly paste values only if they are separated by tabstop character. Keep in mind that CopyToClipboard acts only on the data in the current plot serie, and only points whose coordinates are within the selection area are copied. If plot selection is not visible, all points or data elements are copied.
For both DMSerie and DMLabel, properties of the object are copied in the special binary format.
For DMWorksheet, it copies selected worksheet cells to the clipboard as a simple text block. UseTabs parameter also defines what character will be used as separator between values. It also puts selection data range as a serie object.
You can use system Clipboard Viewer utility to investigate what data formats are used at every case.
|function PasteFromClipboard: VOID|
For DMDigitizer, this method inserts into the digitizer control the picture from the clipboard.
For DMNotes, PasteFromClipboard operates like in any text editor.
For DMSerie, PasteFromClipboard has a parameter. If DataOnly=True, visual attributes like colors, point size etc. are not assigned. Keep in mind that this method can correctly paste only series copied from the same instance of DM, because it performs search to assign Container.
For DMLabel, this method is just a pair for CopyToClipboard. In addition, Rectangle - type label can paste (and display) metafiles (and bitmaps).
For DMPlot, PasteFromClipboard has Mode parameter that determines what data will be pasted; possible values defined in the PlotCopyModes enumeration. Certainly, only series and labels (or both) may be pasted; new objects are created and initialized by data from the clipboard.
For DMWorksheet, this method also has a parameters. Text in the clipboard must contain lines of values separated by spaces, commas or tabstops. Data is pasted from topleft selected cell. If InsertLines is true, new lines will be added, else existing lines will be modified according to second parameter. If Overwrite mode specified, cell contents are replaced else data from clipboard will be inserted at selected position.
For all objects, this method does nothing if there's no suitable data on the clipboard. Use CanPaste method to determine whether clipboard has appropriate data formats.
|function Delete: VOID|
For DMRegistry and DMINIFile, Delete method deletes selected Value (or INI file section). Name parameter is either name or index in the Items collection. If object was opened in the Read-Only mode, Delete call will have no effect.
For DMNotes, DMPlot and DMWorksheet objects Delete method has no parameters and should be used to delete selected data range in the appropriate objects: selected text, worksheet cells or "selected" points (points whose coordinates belong to selected plot area) in the current plot serie. Note that for DMPlot, if selection is not visible, all points from the current plot serie will be deleted.
For DMSerie and DMLabel, this method just deletes the object. It acts as the appropriate method of owner collection (DMPlot or DMLabels).
|function Cut: VOID|
|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 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 SelectAll: VOID|
This method selects all data range in the appropriate object.
|property Modified: Boolean|
This property used to track data modifications.
For DMContainer, when data implicitly modified by some method or you directly set this property, object fires internal event which will correctly update all worksheets and plots referenced this container. It takes a lot of calculations and painting job so don't change this property too frequently.
Notice: when you set Modified=true, and appropriate document window is in "recording" state, plot is not forced to refresh. This feature allows you to refresh worksheet (actually you must set Modified in order to update number of lines in the worksheet!) without repainting whole plot.
You can additionally reduce painting if you set Modified=false while Document.IsRecordind=true. In this case, only worksheet size will be updated. This mode can significantly increase the rate of data streaming.
For DMNotes, this property indicates whether editor text is modified or not. For DMDigitizerContainer this property is not implemented.
|r/o property FileName: BSTR|
Returns full name of loaded file. Note that Load() and Save() methods implicitly modify this property. If file still not loaded, this property returns empty string.
MsgBox Server.Notes.FileName MsgBox Server.ActiveDocument.Container.FileName
|r/o property _NewEnum: Unknown|
This property returns so-called Enumerator Object. Do not use it explicitly. It is used internally in the "for each [item] in [object]" cycles. Every object that has this property may be enumerated in such a cycles. This is for your convenience.
function EnumDocuments dim S S="" for each Doc in Server S=S & Doc.WindowCaption & vbCrLf next EnumDocuments=S end function function EnumNotes dim S S="" for each Ss in Server.Notes S=S & Ss & vbCrLf next EnumNotes=S end function function EnumSeries dim S S="" for each Ser in Server.ActiveDocument.Plot S=S & Ser.Text & vbCrLf next EnumSeries=S end function function EnumItems dim S S="" for each D in Server.ActiveDocument.Container S=S & D(0) & vbCrLf next EnumItems=S end function