明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 757|回复: 0

[提问] undo的问题

[复制链接]
发表于 2015-12-9 17:06 | 显示全部楼层 |阅读模式
  1. (defun c:cn(/ sg gp11 gp12 sg1 gp21 gp22 sg2 gp31 gp32)
  2.   
  3.   (while (null sg)
  4.     (setq sg(ssget))
  5.   )
  6.   
  7.   (command "_undo" "be")

  8.   (initget 1)
  9.   (setq gp11(getpoint "\n指定第一个源点:"))
  10.   (initget 1)
  11.   (setq gp12(getpoint "\n指定第一个目标点:" gp11))
  12.   (command "line" gp11 gp12 "")
  13.   (setq sg1 (ssget "l"))
  14.   (command "chprop" sg1 "" "c" 7 "")
  15.   
  16.   (initget 1)
  17.   (setq gp21(getpoint "\n指定第二个源点:"))
  18.   (initget 1)
  19.   (setq gp22(getpoint "\n指定第二个目标点:" gp21))
  20.   (command "line" gp21 gp22 "")
  21.   (setq sg2 (ssget "l"))
  22.   (command "chprop" sg2 "" "c" 7 "")
  23.   
  24.   (if(setq gp31(getpoint "\n指定第三个源点:"))
  25.     (progn
  26.       (setq gp32(getpoint "\n指定第三个目标点:" gp31))
  27.       (command "copy" sg "" "0,0" "" "align" sg "" gp11 gp12 gp21 gp22 gp31 gp32 )
  28.     )
  29.     (progn
  30.       (setq gp32 1)
  31.       (command "copy" sg "" "0,0" "" "align" sg "" gp11 gp12 gp21 gp22 "" "n")
  32.     )  
  33.   )

  34.   (command "_erase" sg1 sg2 "")
  35.   
  36.   (command "_undo" "e")
  37.   (princ)
  38. )
命令运行完成后,我用U命令并不能返回到(command "_undo" "be"),这是为什么?

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-4-27 15:54 , Processed in 0.253443 second(s), 29 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表