DIAdem Help

Object: Cursor

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

Object: Cursor

The Cursor object provides a cursor in DIAdem VIEW. You use the Cursor object to specify the cursor position, the cursor type, and the cursor mode. You can set the Cursor object separately for each worksheet.

The following example positions a frame cursor and displays the width of the frame:

VBScriptPython

 

Dim oMySheet, oMyChart
Call Data.Root.Clear()
Call DataFileLoad("Example.tdm")
Call View.Sheets.RemoveAll()
Call View.NewLayout()
Set oMySheet = View.ActiveSheet
oMySheet.ActiveArea.DisplayObjType = "CurveChart2D"
Set oMyChart = oMySheet.ActiveArea.DisplayObj
Call oMyChart.Curves2D.Add("[1]/[1]","[1]/[2]")
oMySheet.Cursor.Type = "Frame"
oMySheet.Cursor.X1 = 10
oMySheet.Cursor.Y1 = 20
oMySheet.Cursor.X2 = 30
oMySheet.Cursor.Y2 = 40
Call LogFileWrite("Dx position: " & View.ActiveSheet.Cursor.Dx & vbCrLf & "Dy position: " & View.ActiveSheet.Cursor.Dy)

Returned From

CoordinateWnd.Cursor | Sheet.Cursor