home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format 58 / af058b.adf / PV21.lha / REXX / ChangeSelWeights.pvrx < prev    next >
Text File  |  1991-08-08  |  805b  |  42 lines

  1. /* ChangeSelWeights.pvrx---Change line weights of selected
  2.     objects to specified weight.
  3.  
  4.     Copyright © 1991 by Stylus, Inc.
  5.     Author:  Jeff Blume
  6. */
  7.  
  8. options results
  9.  
  10. /* Try to get exclusive lock on project window.
  11.     If can't get lock, not polite to interrupt. */
  12. 'Lock'
  13. if rc ~= 0 then exit
  14.  
  15. 'SelectList' Sel; SelN = Result
  16. if SelN = 0 then call Error "No objects selected!"
  17.  
  18. /* Prompt user for minimum line weight */
  19. 'GetStr "New Line Weight (in inches)?" "OK" "CANCEL"'
  20. LW = result
  21. if rc ~= 0 then call CleanUp
  22. if LW = "" then call Error "Must Specify Line Weight"
  23.  
  24. 'Prompt "Working..."'
  25. 'PushUndo'
  26.  
  27. do i = 0 to SelN-1
  28.     'SaveUndo' Sel.i
  29.     'ChangeEdgeWidth' Sel.i LW
  30. end
  31.  
  32. 'EndPrompt'
  33. 'Repair'
  34.  
  35. ERROR:
  36.     arg ErrTxt
  37.     if RC ~= 0 | ErrTxt ~= "" then 'GetBool ErrTxt "Cancel" "Cancel"'
  38.  
  39. CLEANUP:
  40.     'UnLock'
  41.     exit
  42.