看起来我所缺少的只是一个“cdr”
- (defun c:wscale (/ i ss ent eLst)
- (setq wgScale (getvar "DIMSCALE"))
-
- (if (setq i -1 ;if this = T
- ss (ssget "_:L"))
- (while ;Then do this
- (setq ent
- (ssname ss
- (setq i (1+ i))))
-
- (setq eLst (entget ent))
-
- (setq ePT [color=Red](cdr[/color] (assoc 10 eLst))[color=Red])[/color]
- (vl-cmdf "_.scale" ent "" ePT wgScale)
- )
- );end if
- (princ))
我想(assoc…)将返回x,y,z,但它返回(10 x,y,z),这使命令行失败。
我将为这个问题添加第二部分。我想键入命令,让LISP选择图形中的所有块,其块名包含单词“PART”。
与此同时,我正在四处寻找答案。我想我必须过滤(0。“INSERT”)和(2。”*part“)不要认为我可以在那里使用星号,但你可以看到我的逻辑。 |