不知道什么是属性块制作的"表单"?是用属性提示值填写到插入块的属性中吗?试试这个能行不 - (defun c:ttt( / ss ent blk en blk_en blk_ent blk_list blk_ent_2 blk_ent_3 pt);用属性提示值插入块
- (if (setq ss (ssget ":S" '((0 . "insert") (66 . 1) )))
- (progn
- (setq ent (entget (setq en (ssname ss 0))))
- (setq blk (cdr (assoc 2 ent)))
- (setq blk_en (cdr (assoc -2 (tblsearch "block" blk))) blk_list '())
- (while blk_en
- (setq blk_ent (entget blk_en))
- (if (= (cdr (assoc 0 blk_ent)) "ATTDEF")
- (progn
- (setq blk_ent_3 (cdr (assoc 3 blk_ent)))
- (setq blk_ent_2 (cdr (assoc 2 blk_ent)))
- (setq blk_list (cons (list blk_ent_2 blk_ent_3) blk_list))
- )
- )
- (setq blk_en (entnext blk_en))
- )
- )
- )
- (setq blk_list (reverse blk_list))
- (setq pt (getpoint "\n请输入图块插入点"))
- (command "_insert" blk pt 1 "" 0)
- (mapcar '(lambda(x) (command (cadr x))) blk_list)
- (princ)
- )
|