Object: DropEventContext
- Updated2024-09-12
- 2 minute(s) read
DIAdem VIEW > Objects > View > Object: DropEventContext
Object: DropEventContext
The DropEventContext object provides information on an area in DIAdem VIEW.
| 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 only lets you drop data if you drag a channel or a group of channels from the Data Portal onto a 2D axis system in DIAdem VIEW. The drop method is not valid for any other display type. If dropping is permitted, the example outputs the name of the first selected channel.
| VBScript | Python |
Call AddUserCommandToEvent("View.Events.OnDropAllowed", "MyOnDropAllowed") Call AddUserCommandToEvent("View.Events.OnDrop", "MyOnDrop") Sub MyOnDropAllowed(Context, DropInformation, ByRef DropEffect) If Context.Area.DisplayObjType = "CurveChart2D" Then DropEffect = eDropEffectCopy Else DropEffect = eDropEffectNone End If End Sub Sub MyOnDrop(Context, DropInformation, ByRef DoProceed) Call MsgBoxDisp(DropInformation.DIAdemElements(1).Name) DoProceed = TRUE End Sub
Properties
See Also
Examples
Alignment Functions in DIAdem VIEW | Automatic Display of Harmonic Frequencies | Bird's Eye View Display | Calculating a Tangent to a Curve | Contour Display in DIAdem VIEW | Creating and Viewing Long Data Channels | Dynamic Display of Statistical Characteristic Values in DIAdem VIEW | Overlaying Objects in Videos | Planetary Motion | Synchronizing Videos and Data | Synchronizing Videos and Waveform Data | User Dialog Box in VIEW for the Calculation of the FFT and Harmonic Frequencies | Using a User Command to Calculate the Difference between the Y-Values | Various Display Modes in DIAdem VIEW | Vibration Data Analysis with Parallel Processing | Viewing and Automatically Analyzing Data