My lisp is not waiting for my command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I have made a script that makes a block of my drawings, save the file vith new name and place, then it rotate and move objects to new coordinates and finaly explode the block and save the file again.
I have made a lisp for the rotate and move, like this:
(defun C:MO (/ MOT NOT ANG)
(setq ANG (getreal "\n Ange vinkel, 0.0 i grader: ")) ; Frågar efter vinkel
(setq MOT (getpoint "\n Ange nollpunkt, eg 0,0,0: ")) ; Frågar efter koordinater från (0,0,0) i mm
(setq NOT (getpoint "\n Ange ny punkt, eg 0,0,0: ")) ; Frågar efter koordinater till (x,y,z) i mm
(princ)
(command "_.rotate" "all" "" MOT ANG) ; Kör kommandot rotera
(princ)
(command "_.move" "all" "" MOT NOT) ; Kör kommandot flytta
(princ)
(setq MAGN 2000)
(command "_ZOOM" "_E" NOT MAGN) ; Kör kommandot zoom och förstoring 2000
(princ)
)
It works when I run it all alone, but togheter with my script it not wait for my input and therefore take my next command i my script and I have the "can't reenter lisp" "error". Then it runs my lisp correct but my next commands in my script does not run after this.
I have som error in my lisp, i think, but here I need some help to guide me in the right direction.