我只想使用变量n\u controlvertices和degree作为参数来调用cvrebuild命令。AutoLISP例程将一次遍历一个对象,并使用相同的参数重建它们。
我为代码的出现道歉。显然,AutoLISP不能很好地处理StackOverflow
;; Batch rebuild splines
;;defines command name and variables
;; asks for selection
(提示
“\n选择要重建的样条线。”
;;decides if any splines are selected, and if not selects all
(if(not(setq ss(ssget’((0.“样条”))))))
)
;;sets allowable entry to [2 (only nonzero) + 4 (only positive)]
(initget 6)
;;asks for number of fit points. if nothing is entered, it gives it the default value of 20
(setq n\u控制顶点(getint“\n控制顶点数<20>:”)
(=n\u控制顶点为零)
(setq n_控制顶点20)
(setq n\u控制顶点(固定n\u控制顶点))
)
;;asks for degree of fit points. if nothing is entered, it gives it the default value of 3
(如果
(=零度)
(setq obj (vlax-ename->vla-object (ssname ss (setq n (1- n))))
;;(command cvrebuild)
;;This is the part that I am not sure about
)
(普林斯)
)