CPlotView:AttachFromList


The AttachFromList method creates a new CPlotView object attached to a plot window on the Mira desktop. The script can then collect data from the plot window and change its contents. This function requires the user to select the target window from a list of all plot windows on the desktop. This function does not use an existing CPlotView object. Also see the equivalent non-class function attachlist_plotview.

The related Attach method attaches the top-most plot window.

Syntax

CPlotView_obj = attachlist_plotview()

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

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

Remarks

This function collects all plot windows on the Mira desktop into a list, then displays them in a window where the target plot window is selected. The selected plot window is returned as a new CPlotView object.

Example

Assume that several image windows are displayed on the Mira desktop along with other windows. The following script attaches one of the image windows to the script:

V = CPlotView:AttachFromList()

-- select the target plot window

if V == nil then Exit() end

-- if not successful, exit the script

Printf("Attached plot view %s\n")

-- print the title of the attached window

Related Topics

CPlotView class, new, attachlist_plotview


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