IDMPlot Interface

Version: 1.0
Dispatch interface for DMPlot Object

GUID: {673A9FD3-9A0B-11D4-B2A4-FD6847C75367}

IDMPlot interface implemented only for backward compatibility with DM2000. Use IDMPlot3 interface instead.

Members:
Kind Name ID Description
SerieCount 1 Return Series.Count
SerieIndex 2 Change Plot.SerieIndex
CurrentSerie 3 Return Serie object for current serie
XAxis 4 Return Axis object for X axis
YAxis 5 Return Axis object for Y axis
SelectionTop 6 Change Plot.SelectionTop
SelectionBottom 7 Change Plot.SelectionBottom
SelectionLeft 8 Change Plot.SelectionLeft
SelectionRight 9 Change Plot.SelectionRight
CopyToClipboard 10 Invoke TPlot.CopyToClipboard()
Delete 11 Invoke TPlot.Delete()
Select 12 Set plot selection
AddSerie 13 Create new plot serie
Series 14 Return Serie object for selected serie

Syntax:
r/o property SerieCount: Long

Applies to:
DMPlot

Returns number of series in Series array.

Syntax:
property SerieIndex: Long

Applies to:
DMPlot

Like one of document windows is active, one of plot series is current. Current serie displayed in serie toolbar and most of UI operations act on the current serie. This property allows you to change index of current serie programmatically (series are indexed from 0 to SerieCount-1).

Syntax:
r/o property CurrentSerie: IDispatch

Applies to:
DMPlot

This property returns current serie object; it is equal to Series[SerieIndex]. Note that CurrentSerie may be nil if SerieIndex<0 or SerieCount=0.

Syntax:
r/o property XAxis: IDispatch

Applies to:
DMLabel, DMPlot, DMSerie

For DMPlot, XAxis returns reference to the DMAxis object that represents bottom plot axis.

For DMSerie and DMLabel, XAxis property returns reference to the DMAxis object and allows you to change horizontal axis associated with given label or series (which is used to introduce coordinate system for rendering series points or label object).

Example:

dim Plt
set Plt=Server.ActiveDocument.Plot
Plt.CurrentSerie.XAxis=Plt.XAxis2
Plt.Labels(0).XAxis=Plt.XAxis2

Syntax:
r/o property YAxis: IDispatch

Applies to:
DMLabel, DMPlot, DMSerie

For DMPlot, YAxis returns reference to the DMAxis object that represents left plot axis.

For DMSerie and DMLabel, YAxis property returns reference to the DMAxis object and allows you to change vertical axis associated with given label or series (which is used to introduce coordinate system for rendering series points or label object).

Example:

dim Plt
set Plt=Server.ActiveDocument.Plot
Plt.CurrentSerie.YAxis=Plt.YAxis2
Plt.Labels(0).YAxis=Plt.YAxis2

Syntax:
property SelectionTop: Double

Applies to:
DMPlot, DMWorksheet

For DMPlot, this property is a double-precision coordinate of the top of the plot selection area.

For DMWorksheet, this property is an integer position of the top line in the selected block of cells, or the vertical position of the selected cell.

Syntax:
property SelectionBottom: Double

Applies to:
DMPlot, DMWorksheet

For DMPlot, this property is a double-precision coordinate of the bottom of the plot selection area.

For DMWorksheet, this property is an integer position of the bottom line in the selected block of cells, or the vertical position of the selected cell.

Syntax:
property SelectionLeft: Double

Applies to:
DMPlot, DMWorksheet

For DMPlot, this property is a double-precision coordinate of the left of the plot selection area.

For DMWorksheet, this property is an integer position of the left column in the selected block of cells, or the horizontal position of the selected cell. Note that columns are counted from 1!

Syntax:
property SelectionRight: Double

Applies to:
DMPlot, DMWorksheet

For DMPlot, this property is a double-precision coordinate of the right of the plot selection area.

For DMWorksheet, this property is an integer position of the right column in the selected block of cells, or the horizontal position of the selected cell. Note that columns are counted from 1!

Syntax:
function CopyToClipboard(Mode, UseTabs): VOID

Applies to:
DMLabel, DMNotes, DMPlot, DMSerie, DMWorksheet

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.

Syntax:
function Delete: VOID

Applies to:
DMIniFile, DMLabel, DMNotes, DMPlot, DMRegistry, DMSerie, DMWorksheet

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).

Syntax:
function Select(X1, X2, Y1, Y2): VOID

Applies to:
DMLabel, DMNotes, DMPlot, DMSerie, DMWorksheet

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.

Syntax:
function AddSerie: IDispatch

Applies to:
DMPlot

Adds a new DMSerie object to the end of Series() array and return reference to this object.

Syntax:
r/o property Series[Index]: IDispatch

Applies to:
DMPlot

Read-only array of DMSerie objects. Index parameter ranges from 0 to SerieCount-1. This property gives you "random access" to plot series.

You also may iterate "for each" cycle on DMPlot object as shown in the example below.

Example:

set Plt=Server.ActiveDocument.Plot
for I=0 to Plt.SerieCount-1
  Plt.Series(I).Text="My serie #" & I
next

or

for each Ser in Server.ActiveDocument.Plot
  Ser.Text="My serie"
next