- ;;也是本网站淘的
- ;;; No.1-2 获取图块内的所有非图块对象(含嵌套块中的)名称 函数
- ;;;***********************************************************
- (defun getblkallent ( BLK / xblkname xblkdef entname1 enttype entlist)
- (setq xblkname (cdr (assoc 2 (entget BLK))))
- (setq xblkdef (tblobjname "Block" xblkname))
- (while (setq entname1 (entnext xblkdef))
- (setq enttype (cdr (assoc 0 (entget entname1))))
- (if (= enttype "INSERT")
- (setq entlist (append (getblkallent entname1) entlist))
- (setq entlist (cons entname1 entlist))
- )
- (setq xblkdef entname1)
- )
- entlist
- )
|