Property: Table for 2DTableDropContext

DIAdem 2018 Help

Edition Date: June 2018
Part Number: 370858P-01
View Product Info

DOWNLOAD (Windows Only)

DIAdem 2012 Help
DIAdem 2014 Help
DIAdem 2015 Help
DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help

Specifies the 2D table onto which you dragged and dropped an object.

Set o2DTable = Object.Table
Object with this property
Returned object
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.

The following example executes the user command MyOnDrop2DTableEvent when channels are dragged and dropped into a 3D table. The user command displays the names of the channels that you dragged onto an object. The user command also displays information about the objects you dragged into the channels. The user command receives two parameters. The first parameter corresponds to a 2DTableDropContext object and provides information about the 2D table onto which you dragged and dropped an object. The second parameter corresponds to a DropInformation object and provides information about the object which you dragged and dropped onto another object:

Report.Events.OnDrop2DTable = "MyOnDrop2DTableEvent"

Sub MyOnDrop2DTableEvent(Context, DropContext)
  Dim oMyDropElement, sOutput, oMyTable
  sOutput = "Names of dropped channels:"
  For Each oMyDropElement in DropContext.DiademElements
    sOutput = sOutput & VBCrLf & oMyDropElement.Name
  Call Msgbox(sOutput)
  Set oMyTable = Context.Table
  If Context.ColumnIndex>0 Then
    Call MsgBox(Context.Sheet.Name & VBCrLf & oMyTable.Name & VBCrLf & oMyTable.Columns.Item(Context.ColumnIndex).Type)
    Call MsgBox(Context.Sheet.Name & VBCrLf & oMyTable.Name)
  End If  
  Context.DoProceed = TRUE
End Sub


Not Helpful