Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
HI
I just started to use the undo command to turn back in one step the Routine.
But how can I after cancelling the Routine in the middle, turn back in one step.
Or how can i include the "command undo end" in the erros message?
Please help...
(defun C:<T-1-50-2mm( / *error* lay cmd) (defun *error* (errmsg) (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break")) (princ (strcat "\nError: " errmsg))) (setvar 'CLAYER lay) (setvar 'CMDECHO cmd) (princ)) (command "_.undo" "_begin")
(setq lay (getvar 'CLAYER) cmd (getvar 'CMDECHO)) (setvar 'CMDECHO 0)
(command "_.-LAYER" "_m" "-I-Text_020" "_co" "2" "-I-Text_020" "") (command "_.style" "simplex7-10" "simplex.shx" "10" "0.7" "0" "_n" "_n" "_n") (command "_.mtext") (princ "\nMtext: erste Fensterecke angeben: ") (command pause) (princ "\nMtext: zweite Fenstrecke angeben: ") (command pause "") (command "_mtedit" "l") (setvar 'CLAYER lay) (setvar 'CMDECHO cmd)
(command "_.undo" "_end")
(prin1) ) ; end of defun
Solved! Go to Solution.