IDMAxis2 Interface

Version: 2.0
Dispatch interface for DMAxis Object

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

IDMAxis2 interface implemented only for backward compatibility with earlier versions of DM2003. Use IDMAxis3 interface instead.

Members:
Kind Name ID Description
Min 1 Change TAxis.Min
Max 2 Change TAxis.Max
Margins 3 Change TAxis.Margins
AutoScale 4 Change TAxis.AutoScale
Title 5 Change TAxis.Title
Expression 6 Change TAxis.Expression
IsVisible 101 Control axis visibility
GridVisible 102 Change grid lines visibility
LabelVisible 103 Change ticks and labels visibility
MajorTicks 104 Change TAxis.MajorTicks
MinorTicks 105 Change TAxis.MinorTicks
TickStyle 106 Change ticks layout
Color -501 Change axis color
Font -512 Change axis labels font
Format 107 Change labels format
Document 108 Returns owner document object

Syntax:
property Min: Double

Applies to:
DMAxis, DMFloatEdit, DMSerie, DMSpinEdit

For DMAxis, Min define minimal value of the axis range. Note: if you want to fix axis range you have to clear AutoScale flag. Also keep in mind that in DM2003 Min may be greater than Max.

For DMSerie, this property allows you to change minimal limit of the parameter ("cx") for parameterized (or functional) series.

For DMSpinEdit and DMFloatEdit ActiveX controls, it defines minimal possible value of the Value property.

Syntax:
property Max: Double

Applies to:
DMAxis, DMFloatEdit, DMSerie, DMSpinEdit

For DMAxis, Max defines maximal value of the axis range. Note: if you want to fix axis range you have to clear AutoScale flag. Also keep in mind that in DM2003 Min may be greater than Max.

For DMSerie, this property allows you to change maximal limit of the parameter ("cx") for parameterized (or functional) series.

For DMSpinEdit and DMFloatEdit ActiveX controls, it defines maximal possible value of the Value property.

Syntax:
property Margins: Double

Applies to:
DMAxis

Margins defines the distance between axis ranges given by Min, Max values and calculated by series data. Value of 0.1 corresponds to approximately 10% blank space. This property should be used in conjunction with AutoScale.

Syntax:
property AutoScale: Boolean

Applies to:
DMAxis

If this flag set to true, every time when plot will be repainted new axis range will be automatically calculated. All nonempty series take part in autoscaling.

Syntax:
property Title: BSTR

Applies to:
DMAxis

Axis may have a title. If this property is not empty, axis title will be visible. Note that not all fonts are displayed properly in the vertical direction!

Syntax:
property Expression: BSTR

Applies to:
DMAxis, DMFitter, DMWorksheet, LMFitter

For DM2003 plot axis, you may transform all series simultaneously if you assign valid expression to this property. See details about expression syntax and allowed arguments and function names.

For DMFitter ActiveX control, Expression property should be defined before you start fitting. There are several possible situations:


For worksheets, this property is index-based and determine column expressions. These expressions may be used to recalculate dynamically the contents of appropriate column. Notice that you can assign expressions to any column, even those that has no data! The syntax and parameter set for column expressions are the same as for plot series.

Example:

Server.CreateDocument Server.InstallPath & "samples\data_1.dat"
Server.ExecuteCommand "ShowWorksheetAction"
Server.ActiveDocument.Worksheet.Expression(3)="a+b"

Syntax:
property IsVisible: Boolean

Applies to:
CoCPortLib2, CPortLibX2, DMAxis, DMClientSocket, DMComboBox, DMComPort, DMComTerminal, DMDigitizer, DMExpressionComboBox, DMFloatEdit, DMIEEE488Port, DMLabel, DMListBox, DMSerie, DMSpinEdit

IsVisible property determines whether appropriate object is visible on the screen. Note that for ActiveX controls embedded in the HTML page, you can also change Object.style.visibility property. Some controls like DMClientSocket, DMIEEE488Port and DMComPort are invisible by design and don't implement this property.

Syntax:
property GridVisible: Boolean

Applies to:
DMAxis

Syntax:
property LabelVisible: Boolean

Applies to:
DMAxis

Syntax:
property MajorTicks: Long

Applies to:
DMAxis

Syntax:
property MinorTicks: Long

Applies to:
DMAxis

Syntax:
property TickStyle: User_Defined

Applies to:
DMAxis

TickStyle property determines axis major ticks positions. Possible values of this property listed in the AxisTicksType enumeration.

Syntax:
property Color: User_Defined

Applies to:
DMAxis, DMComboBox, DMDigitizer, DMExpressionComboBox, DMFloatEdit, DMLabel, DMListBox, DMPlot, DMSerie, DMSpinEdit, DMWorksheet

This property should be used to change color of the selected object.

Syntax:
property Font: PTR

Applies to:
DMAxis, DMComboBox, DMExpressionComboBox, DMFloatEdit, DMLabel, DMListBox, DMSpinEdit, DMWorksheet

This property should be used to change font of the selected object. It returns reference to the special IFontDisp interface pointer. See Microsoft OLE documentation for more details.

Example:

 
Server.ActiveDocument.Worksheet.Font.Name
Server.ActiveDocument.Worksheet.Font.Size
Server.ActiveDocument.Worksheet.Font.Bold
Server.ActiveDocument.Worksheet.Font.Italic
Server.ActiveDocument.Worksheet.Font.Underline
Server.ActiveDocument.Worksheet.Font.Strikethrough
Server.ActiveDocument.Worksheet.Font.Weight
Server.ActiveDocument.Worksheet.Font.Charset
Server.ActiveDocument.Worksheet.Font.Color 'absent!

Syntax:
property Format: BSTR

Applies to:
DMAxis, DMFloatEdit, DMSpinEdit, DMWorksheet

This property allows you to change numeric format. Possible values are: XX.Yt, where XX - total number of digits, Y - number of digits after decimal point, t - one of the following characters:

Another type of strings used for Date and Time format feature. If format specifier value enclosed in the curly brackets, it is treated as date/time.

Syntax:
r/o property Document: IDispatch

Applies to:
DMAxis, DMContainer, DMLabel, DMPlot, DMSerie, DMWorksheet

Document property returns DMDocument object which is an owner of the given object. So that, you don't need to cycle through the object collections to determine the object's owner. Keep in mind that in DM, VCL objects may be destroyed while appropriate COM objects still alive since their lifecycle is governed by reference counting mechanism. Such COM objects with killed VCL owner become a "zombie" - they have no actual data, their methods do nothing and properties return empty data.

Examples:

sub TestSerie
dim Serie
  if Server.ActiveDocument is Nothing then
    MsgBox "NULL document"
  else
    set Serie=Server.ActiveDocument.Plot.CurrentSerie
    MsgBox Serie.Document.WindowCaption  
  end if
end sub

sub TestAxis
dim Axis
  set Axis=Server.ActiveDocument.Plot.XAxis2
  MsgBox Axis.Document.WindowCaption
end sub

sub TestContainer
dim Container
  set Container=Server.ActiveDocument.Container
  MsgBox Container.Document.WindowCaption
end sub

sub TestPlot
dim Plot
  set Plot=Server.ActiveDocument.Plot
  MsgBox Plot.Document.WindowCaption
end sub

sub TestWorksheet
dim Worksheet
  set Worksheet=Server.ActiveDocument.Worksheet
  MsgBox Worksheet.Document.WindowCaption
end sub

dim Worksheet1
set Worksheet1=Server.ActiveDocument.Worksheet

sub TestWorksheet1
  MsgBox Worksheet1.Document.WindowCaption
end sub

dim Serie1
set Serie1=Server.ActiveDocument.Plot.CurrentSerie

sub TestSerie1
  if Serie1.Document is Nothing then
    MsgBox "NULL document"
  else
    MsgBox Serie1.Document.WindowCaption  
  end if
end sub