bgator220 发表于 2022-7-6 11:11:23

谢谢你的帮助。让它按我想要的方式工作。有人知道如何仍然使用nentsel命令,但将其与getkwds结合使用吗?在命令行上有话要说
 
“选择弧,或(进给率/Gcode)”。其中关键字F或G将把它们从nentsel命令中删除。

Lee Mac 发表于 2022-7-6 11:16:08

我可能会这样编码,我不喜欢使用快照,给错误留下了太多的空间:wink:
 

(defun c:test ( / input )

(while
   (progn (initget "Feedrate Gcode")
   (setq input (entsel "\nSelect Arc or <Exit> : "))

   (cond
       ( (and (listp input) (eq 'ENAME (type (car input))))

         (if (eq "ARC" (cdr (assoc 0 (entget (car input)))))
         (princ (strcat "\n:: Radius = " (rtos (cdr (assoc 40 (entget (car input))))) " ::"))
         (princ "\n** Object is not an Arc **")
         )
       )
       ( (eq "Feedrate" input)

         (princ "\nYou have Selected Feedrate")
       )
       ( (eq "Gcode" input)

         (princ "\nYou have Selected Gcode")
       )
   )
   )
)

(princ)
)

bgator220 发表于 2022-7-6 11:20:05

谢谢我想怎么做就怎么做。

Lee Mac 发表于 2022-7-6 11:26:41

不客气
页: 1 [2]
查看完整版本: 过滤输出用户输入