home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 58
/
af058b.adf
/
PV21.lha
/
REXX
/
Origin.pvrx
< prev
next >
Wrap
Text File
|
1991-09-21
|
988b
|
39 lines
/* Origin.pvrx---This macro will get the coordinates of the upper-left
corner of the bounding box of all selected objects, and move those
objects so that the new coordinates for the corner of the bounding
box are 0,0 (usually the upper-left corner of the project window).
This can be useful if the project page is to reDIMENSIONed, etc.
Copyright © 1989 by Taliesin, Inc.
Author: Jeff Blume & Ross Cunniff
Usage: Assign to Ctrl-Key or RX tool
The macro expects to find at least one selected object. */
options results
/* Try to get exclusive lock on project window.
If can't get lock, not polite to interrupt. */
'Lock'
if rc ~= 0 then exit
/* Find Delta's to Origin */
'SelExtent' Ext
if RC ~= 0 then call ERROR "No object selected!"
DX = -Ext.X1; DY = -Ext.Y1
'SelectList' Sel; SelN = Result
'PushUndo'
do i = 0 to SelN-1
'Move' Sel.i DX DY
end
'Repair'
ERROR:
arg ErrTxt
if RC ~= 0 | ErrTxt ~= "" then do
'GetBool ErrTxt "Cancel" "Cancel"'
end
'UnLock'
exit