CGridView:Class Description attachlist_gridview

attach_gridview


The attach_gridview function is a non-class function that creates a new CGridView object attached to a Grid Window on the Mira desktop. The script can then collect data from the grid and change its contents. This method selects the top-most grid window of all windows on the desktop. This function does not use an existing CGridView object. Also see the equivalent class method CGridView:Attach.

The related attachlist_gridview function attaches the grid window selected from a list of all open grid windows.

Syntax

CGridView_obj = attach_gridview()

bullet.gif    On success, a new CGridView class object is returned.

bullet.gif    On failure, nil is returned. This usually means no grid window is shown on the Mira desktop.

Example

Assume that several grid windows are displayed on the Mira desktop, and the window of interest, such as a table of measurements, is top-most of all grid windows. The following script attaches that window to the script:

G = attach_gridview()

-- attach the top-most grid window

if G == nil then Exit() end

-- if not successful, exit the script

Printf("Attached grid %s\n")

-- print the title of the attached window

Related Topics

CGridView class

new

Attach


Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.