The IDL_IDLBridge::SetVar function copies the value of a variable from the parent IDL process to the $MAIN$ level of the child process under the given name. IDL_IDLBridge::SetVar is subject to the following limitations:
Note: It is not possible to call GetVar or SetVar when a child process is actively executing a command (when IDL_IDLBridge::Status equals 1).
Note: This method is disabled in IDL Virtual Machine mode.
Obj->[IDL_IDLBridge::]SetVar, Name, Value
A string containing the name of the variable to be set in the child process.
A scalar or array variable of string or numeric type containing the data to be copied to the child process.
None
The following example accesses image data from a JPEG file and passes it to a child process using SetVar.
mriFile= FILEPATH('pdthorax124.jpg', $
SUBDIRECTORY = ['examples', 'data'])
READ_JPEG, mriFile, mriImg
; Create an IDL_IDLBridge object. Pass the image data (mriImg) to
; the child process in a variable named "image." Display the
; image data in a child process.
oBridge = OBJ_NEW("IDL_IDLBridge")
oBridge->SetVar, "image", mriImg
oBridge->Execute, "TVSCL, image"
Note: See Examples for additional examples.
6.3 |
Introduced |