试试这个:
- (defun Elstr (blkN / ent eLst)
- (setq ent (entnext (tblobjname "BLOCK" blkN)))
- (while ent
- (setq eLst (cons (cdar (entget ent)) eLst) ent (entnext ent)))
- (reverse eLst))
- (defun c:bvis (/ bNme enLst)
- (if (and (setq bNme (getstring "\nSpecify Block Name to Make Visible: "))
- (tblsearch "BLOCK" bNme))
- (progn
- (setq enLst (mapcar 'entget (Elstr bNme)))
- (foreach e enLst
- (if (assoc 60 e)
- (entmod (subst (cons 60 0) (assoc 60 e) e))
- (entmod (append e (list (cons 60 0)))))))
- (princ "\n<!> Block Not Found <!>"))
- (command "_regenall")
- (princ))
键入“bvis”运行。 |