undo的问题
(defun c:cn(/ sg gp11 gp12 sg1 gp21 gp22 sg2 gp31 gp32)(while (null sg)
(setq sg(ssget))
)
(command "_undo" "be")
(initget 1)
(setq gp11(getpoint "\n指定第一个源点:"))
(initget 1)
(setq gp12(getpoint "\n指定第一个目标点:" gp11))
(command "line" gp11 gp12 "")
(setq sg1 (ssget "l"))
(command "chprop" sg1 "" "c" 7 "")
(initget 1)
(setq gp21(getpoint "\n指定第二个源点:"))
(initget 1)
(setq gp22(getpoint "\n指定第二个目标点:" gp21))
(command "line" gp21 gp22 "")
(setq sg2 (ssget "l"))
(command "chprop" sg2 "" "c" 7 "")
(if(setq gp31(getpoint "\n指定第三个源点:"))
(progn
(setq gp32(getpoint "\n指定第三个目标点:" gp31))
(command "copy" sg "" "0,0" "" "align" sg "" gp11 gp12 gp21 gp22 gp31 gp32 )
)
(progn
(setq gp32 1)
(command "copy" sg "" "0,0" "" "align" sg "" gp11 gp12 gp21 gp22 "" "n")
)
)
(command "_erase" sg1 sg2 "")
(command "_undo" "e")
(princ)
) 命令运行完成后,我用U命令并不能返回到(command "_undo" "be"),这是为什么?
页:
[1]