【发布时间】:2021-08-23 10:34:46
【问题描述】:
我正在 AutoCAD 中编写我的简单脚本来选择一个表并检索表中的一些数据并在控制台中打印它。
(defun C:test (/)
(vl-load-com)
(setvar "CTAB" "Model")
(princ "\n*** Pick a table ***")
(if (setq ss (ssget "_:S:E:L" '((0 . "ACAD_TABLE"))))
(setq table (vlax-ename->vla-object (ssname ss 0)))
)
(setq table_rows (vla-get-rows table)
table_width (vla-get-width table)
)
(prinс (strcat "Num of rows is" table_rows ", table width is " table_width))
)
运行此脚本并在 Autocad 中选择一个包含 57 行的表后,它返回一个错误:
参数类型错误:stringp 57
我该如何解决?
【问题讨论】:
标签: autolisp