;试用以下程序
(defun c:test()
(vl-load-com)
(while (setq ent (car (entsel "\n请选择一个文字:")))
(setq obj (vlax-ename->vla-object ent)
nam (vlax-get-property obj "ObjectName")
)
(if (wcmatch nam "AcDb*Text")
(if (= nam "AcDbText")
(alert "所选取文字为单行文本")
(alert "所选取文字为多行文本")
)
(alert "所选取的图元不是文字")
)
)
)
温馨提示:内容为网友见解,仅供参考