[求助] Presscad 图形加工说明问题
请问各位,Presscad 里面的图形不是块,但它们又可以像块一样 附带 属性,以便提取里面的加工说明。<br/>这是怎样做到的?怎么样才可以提取及写入??<br/> <p>是用了扩展数据</p><p><br/> (entget (car (entsel)) '("*")) 可以取出扩展数据</p><p>;;;给图元附上扩展数据</p><p>;;;用法(jx_set_xdata (car (entsel)) "test" (list(cons 1000 "test")))</p><p>(defun jx_set_xdata (en rname xd_list / old all elist)<br/> (setq elist (entget en '("*"))<br/> rname (strcase rname)<br/> )<br/> (regapp rname)<br/> (setq xd_list (cons rname xd_list)<br/> old (assoc -3 elist)<br/> )<br/> (cond<br/> ((and old (assoc rname (cdr old)))<br/> (setq all (cons -3 (subst xd_list (assoc rname (cdr old)) (cdr old)))<br/> elist (subst all (assoc -3 elist) elist)<br/> )<br/> (entmod elist)<br/> )<br/> ((and old (not (member rname (cdr old))))</p><p> (setq all (append old (list xd_list))<br/> elist (subst all (assoc -3 elist) elist)<br/> )<br/> (entmod elist)<br/> )<br/> ((not old)<br/> (setq xd_list (list -3 xd_list)<br/> elist (append elist (list xd_list))<br/> )<br/> (entmod elist)<br/> )<br/> )<br/>)</p> 非常感谢。确实是这样 非常感谢。了解了
页:
[1]