【发布时间】:2018-12-12 12:27:54
【问题描述】:
我正在尝试创建一个 AutoLISP 函数,该函数采用选择集图层并将其存储在变量中。 我想选择multiple objects,它总是在同一层,然后用一些命令改变层。
我已经尝试了以下,基于(setq currentlayer (assoc 8 (entget (car (entsel)) )))
我的代码是:
(defun c:objectslayer()
(setq objects (car (ssget))) ; Need to select multiply objects
(setq currentlayer (entget objects)) ; Need the layer of the objects, in my case, it will allways be in the same layer
(setq cl (assoc 8 currentlayer)) ; Need the layer, for commands to change the layer later
(prompt (strcat "\nThe layer of the objects is: " cl))
(princ)
)
感谢所有的帮助和指导
提前致谢
【问题讨论】:
标签: autolisp