Property
Document.DragRectangle (Variant)
Syntax
Document.DragRectangle [ = variant ]
Remarks
DragRectangle returns an array of four values which report the upper left and lower right corners of the current drag rectangle. The order of the data in the array is X1, Y1, X2, Y2.
If New Window has been used to create multiple windows for the document, DragRectangle examines them in order by the number after the colon in each window's title bar and returns the first rectangle found. If no drag rectangle exists in any image window associated with this document, DragRectangle throws an exception.
Although DragRectangle is inherently an array, it is not possible to subscript it directly from Visual Basic or scripting environments. Instead, you must assign it to a local variable first, and access the individual coordinates from the copy. This procedure prevents the script or plug-in from retrieving inconsistent data if the drag rectangle is being adjusted at the time of access.
DragRectangle can also be assigned to, causing the drag rectangle to be created or resized/repositioned on the image window. If the Information window is open in Area mode, its contents will be updated to reflect the statistics of the new rectangle.