Last modified: December 2013

URL: https://cxc.cfa.harvard.edu/chips/ahelp/set_current.html
Jump to: Description · Examples · Bugs · See Also


AHELP for CIAO 4.11 ChIPS v1

set_current

Context: utilities

Synopsis

Set the specified object as current.

Syntax

set_current(object_type, object_name)
set_current(object_type, object_id)

Description

The function arguments.

Argument Description
object_type What type of object to modify, such as chips_window or chips_curve; see the Object Type section of "ahelp chipsopt".
object_name The name of the object to be made current.
object_id A ChipsId structure indicating which object should be made current.

The set_current command sets the object indicated by the argument as the current window; see "ahelp currency" for general information on currency.

There is also a "set_current" command for each ChIPS object:

Use the info_current command to retrieve a list of all the current items in the ChIPS session, as shown in Example 1.


Examples

Example 1

chips> add_plot()
chips> add_plot(.2, .2, .7, .7)
chips> set_current(chips_plot, "plot1")

Create two plots; the second one is current by default. Set plot1 to be current, so that we now have:

chips> print(info_current())
Window [win1]
  Frame [frm1]
    Plot [plot1]
    Coord Sys [Plot Normalized]

Example 2

chips> set_current(chips_window, "Fig3")

Set the window with the id "Fig3" to be current.


Bugs

See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.

See Also

concepts
chipsid, currency, setget