这是代码;
(setq Tobjs (vla-Explode Tvlaobj))
(setq ObjectsAsList (vlax-safearray->list (vlax-variant-value Tobjs ) ) )
(foreach % ObjectsAsList
(setq TSublayerNew (vla-get-layer %))
(cond ((eq TSublayerNew TLaynemeShort)
(command "_.AREA" "_O" %)
(setq Teee (getvar 'area))
(setq Ttvm (+ Ttvm Teee))
(princ (strcat (rtos Teee 2 0) " | "))
(setq Tcntr (+ Tcntr 1))
)
)
)
(setq TNumF Ttvm)
(princ (strcat (rtos TNumF 2 2)))
我想将块中所有区域和实体(Tobjs)的总面积转换为变量 TNumF,如果它符合条件,
它给出一个错误:错误的参数值:AutoCAD 命令:#
请帮忙
提前致谢