------------------------------
From AutoLISP.FAQ (http://xarch.tu-graz.ac.at/autocad/news/faq/autolisp.html#27)
For scripts use this workaround by defining (script-cancel) in lisp, use
(defun SCRIPT-CANCEL ()
(command)
(command "resume")
)
and in a SCRIPT.SCR:
...
[script commands]
(script-cancel)
[more script commands]
...
(my try -aj *to play with .. (command "line" pa "@4,3" "")
(setq num1 20)
(setq num1 (\ 80 2))
(defun SCRIPT-CANCEL ()
(setq num1 ("\nWhat is the value of num1 today?"))
)
line
50,50,0
script-cancel
num1,50,0
;blank line for 2nd Enter to conclude Line command.
!num1
; to view num1 (press Enter to continue..)
-------------------------------
Just type every command you need below each other or just separated by an (the of Terry Rawkins)
eg.
A button does this (between the ***): copy all the selected stuff to the same spot (say):
***
copy \ 0,0,0 @0,0,0
***
(# note \ does not work or me in A2002 ..maybe with
a 'button' but is that autolisp not script? -aj #)
a equiv script would say this..
***
copy
\
0,0,0
@0,0,0
***
above confuses me but I made below work (-aj)
To copy everything inside area 0,0 to 100,100
on top of itself (-aj)
***
copy
0,0,0
@100,100,0
;2nd Enter to conclude selection
0,0,0 ;specify a basepoint or displacement or [Multiple]
;Enter again to accept 0,0,0 above as displacement
;finished
***
To copy everything inside area 0,0 to 100,100
an arbitrary 20 units left and right (say). (-aj)
***
copy
0,0,0
@100,100,0
;2nd Enter to conclude selection
20,20,0 ;specify a basepoint or displacement or [Multiple]
;Enter again to accept 20,20,0 above as displacement
;finished
***
An is the same as "space" so mind the space at the end, this is to
end the command.
"\" is used to insert the amount of object the user wants.
You need to load a script (or just insert it from Explorer).
----------------------------
From adesk uni 2002
Ex #9 defun setvar getpoint, princ
Write a program which draws a line @4,3 from any selected point.
(defun C:DRAWIT ()
(setvar "CMDECHO" 0)
(setq pa (getpoint))
(command "line" pa "@4,3" "")
(princ)
)
               (
geocities.com/wpsmoke/acadscripts)                   (
geocities.com/wpsmoke)