cadman6735 发表于 2022-7-6 10:46:45

好啊
我几乎是装腔作势,这就是我做这件事的方式。我的代码有什么问题?
 
 
 

(defun C:CleanPlot ()
(vl-load-com)

    (setq
      acadObject       (vlax-get-acad-object)
      acadActiveDocument    (vla-get-ActiveDocument acadObject)
      acadLayers(vla-get-Layers acadActiveDocument)
    )

(vlax-for Layer acadLayers
   (if
   (and
       (eq (vla-get-PlotStyleName Layer) "Normal")
(eq (vla-get-PlotStyleName Layer) "Full Saturation")
   )
       (vla-put-PlotStyleName Layer "As Drawn")
   )
)

(princ)
)

Lee Mac 发表于 2022-7-6 10:52:42

一件事怎么能同时等于两件事?
 
提示:不是一个就是另一个。

cadman6735 发表于 2022-7-6 10:55:39

我永远也想不到,我还有很长的路要走。
 
 
我现在开始工作了。
 
 
谢谢

Lee Mac 发表于 2022-7-6 11:02:31

 
我发现它更容易“通读”,因此“如果它是这个或那个”;类似地,“如果它是这个和那个”等等,那么就把你说的翻译成代码表达式
页: 1 [2]
查看完整版本: 写这篇文章的捷径?