如何用autolisp提取cad文件中的所有文字样式,并将文字样式名罗列出来?
展开全部
(defun get-textstyle ( )
(if (null vlax-dump-object) (vl-load-com) )
(setq txts (vla-get-textstyles (vla-get-activedocument (vlax-get-acad-object))))
(setq txtl '())
(vlax-for txt txts
(setq txtl (cons (vla-get-name txt) txtl))
)
(reverse txtl)
)
;;函数(get-textstyle)返回的值就是当前图档中包含的所有文字样式的表
(if (null vlax-dump-object) (vl-load-com) )
(setq txts (vla-get-textstyles (vla-get-activedocument (vlax-get-acad-object))))
(setq txtl '())
(vlax-for txt txts
(setq txtl (cons (vla-get-name txt) txtl))
)
(reverse txtl)
)
;;函数(get-textstyle)返回的值就是当前图档中包含的所有文字样式的表
展开全部
;;获取当前图档中所有文字样式的列表
;;(get-style)
(defun get-style ( / list-sty key data-sty name-sty)
(setq list-sty nil)
(setq key T)
(while (setq data-sty (tblnext "style" key))
(setq name-sty (cdr (assoc 2 data-sty)))
(setq list-sty (cons name-sty list-sty))
(setq key nil)
)
(reverse list-sty)
)
;;(get-style)
(defun get-style ( / list-sty key data-sty name-sty)
(setq list-sty nil)
(setq key T)
(while (setq data-sty (tblnext "style" key))
(setq name-sty (cdr (assoc 2 data-sty)))
(setq list-sty (cons name-sty list-sty))
(setq key nil)
)
(reverse list-sty)
)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询