home *** CD-ROM | disk | FTP | other *** search
- /* LayerSel.pvrx --- Select all objects in layer */
-
- /*
- call open STDOUT,"RAM:RxOut.txt",W
- call open STDERR,"RAM:RxErr.txt",W
- trace R
- */
-
- /* Try to get exclusive lock on project window.
- If can't get lock, not polite to interrupt. */
- 'Lock Wait'
- if rc ~= 0 then exit
-
- options results
-
- /* Prompt user for layer name */
- 'GetStr "Select Layer: name" "OK" "CANCEL"' /* longest prompt 44 chars */
- LayerName = result
- if rc ~= 0 | LayerName = "" then do
- 'UnLock'
- exit
- end
-
- /*** DOESN'T TEST FOR EXISTENCE OF LAYERS ***/
-
- /* Select all objs in layer */
- 'FirstObj' LayerName; Objs.0 = result
- 'SelectObj' Objs.0
- do i = 1 until rc ~= 0 /* rc~=0 proper test for end of list? */
- j = i - 1
- 'NextObj' Objs.j; Objs.i = result
- 'SelectObj' Objs.i
- end
-
- CLEANUP:
- /* Render the area operated upon, and free the project window
- This sequence is recommended to finish up most macros */
- /* 'Repair' */ /*Shouldn't need repair...? */
- 'UnLock'
- exit
-