块参照编辑:锁定不在工作集的对象lisp中怎么写?是调整变量吗。。。求教
- (defun C:GG(/ KM dx)
- (if (= (setq KM (getvar "refeditname")) "")
- (if(= (setq dx(ssget "X" '((0 . "insert")))) nil)
- (progn
- (COMMAND "_.BCLOSE" "s")
- (command "-refedit" name "O" "A" "Y")
- )
- (if (setq dx(cadr (ssgetfirst)))
- (progn
- (command "-refedit" "O" "A" "Y")
- )
- (progn
- (setq name (cadr (entsel"\n 请选择块:")))
- (command "-refedit" name "O" "A" "Y")
- )
- )
- )
- (progn
- (COMMAND "_.REFCLOSE" "s")
- (command "_.bedit" KM)
- )
- )
- (princ)
- )
[/code]
|