DIAdem Help

Object: 2DTableColumnDrawingContext

  • Updated2024-09-12
  • 2 minute(s) read

Object: 2DTableColumnDrawingContext

The 2DTableColumnDrawingContext object provides information about the 2D table and the worksheet into which DIAdem REPORT is plotting the table column. The object corresponds with the first parameter of the user command, which you assigned to the property Report.Events.OnCurveTransformation.

Note  To test the example script, you must first save the script and register it as a user command in the dialog box that opens when you select Settings»Extensions»User Commands.

When a column is plotted in a 2D table, the following example executes the user command MyOnDrawing2DTableColumn. The user command changes the format of the column being plotted for the first table on the first worksheet. The user command receives two parameters. The first parameter corresponds to a 2DTableColumnDrawingContext object and provides information about the 2D table and the worksheet into which DIAdem is plotting the curve. The second parameter corresponds to a 2DTableColumn object and provides information about the table column DIAdem is plotting:

Report.Events.Drawing.OnTable2DColumn = "MyOnDrawing2DTableColumn"

Sub MyOnDrawing2DTableColumn(Context, Column)
  Dim oMyTable, oMyColumn, sOutput
  Set oMyTable = Context.Table
  Set oMyColumn = Column
  If Context.Sheet.Index = 1 AND oMyTable.Index = 1 then
    Select Case oMyColumn.Type
      Case e2DTableColumnChannel
        oMyColumn.Settings.Format = "d.d"
      Case e2DTableColumnVariable
      Case e2DTableColumnExpression
      Case e2DTableColumnText
    End Select
  End If
End Sub

Properties

Sheet | Table