嗯,公平地说,我怀疑这是OP的预期目标。英雄联盟
然而,我认为这两个线程有一个共同的缺陷,即试图自动化一个已经很简单的任务。
开发者犯规#176。。。自动化是为了自动化,而不是效率。 我倾向于同意——但只是部分同意。
例如,假设你在一家绘制大量管道的公司工作,你可以创建中心线,然后用针对不同管道直径的特定偏移量编程按钮,这样可以避免你查找它们,或者错误地输入它们。。。
只是一个想法
李,这值得一想。
然而,OP的宏不包括此类智能,而是10个单位的基本预定义偏移量。
诚然,我有用于类似目的的功能(而不是按钮),这些功能是根据我所在州的DOT排水管道标准(圆形、椭圆形等)量身定制的,其中考虑了管道壁厚、最小和最大坡度等因素。。
使用Land Desktop(pre Civil 3D conflict check),我开发了几个生产工具,用于确定公用设施调整交叉高程(上/下)、指定位置的反转高程、场地放坡公用设施以及公用设施管道横截面自动化。
... 但同样,这些工具是为了提高效率而开发的。 (defun offsetCreate (low high)
;; Alan J. Thompson, 11.01.10
(if (apply (function and) (mapcar (function (lambda (x) (eq (type x) 'INT))) (list low high)))
((lambda (i)
(while (<= low (setq i (1+ i)) high)
(eval (list 'defun
(read (strcat "c:" (itoa i)))
nil
(list 'command "_.offset" i)
'(princ)
)
)
)
)
(1- low)
)
)
)
(defun MakeOffsets ( _min _max _inc )
(repeat (1+ (fix (/ (- _max _min) _inc)))
(eval
(list 'defun (read (strcat "C:" (vl-string-translate "." "," (vl-princ-to-string _min)))) nil
(list 'command "_.offset" _min)
(list 'princ)
)
)
(setq _min (+ _min _inc))
)
(princ)
) 我想您可以只提供整个数字列表(无论是实数还是整数)。
(MakeOffsets 3 6 0.5)
顺便说一句,李,我会在逗号上用连字符,因为它位于数字键盘上。
大概取决于他们想要创造多少。。。 哦,我知道,但这都是理论上的废话。 更多隐喻素材。。。
(defun offsetCreate (numberList)
(foreach x numberList
(eval (list 'defun
(read (strcat "c:" (vl-string-translate "." "-" (vl-princ-to-string x))))
nil
(list 'command "_.offset" x)
'(princ)
)
)
)
) 哈哈,我希望他们选择有效的对象,只希望它们偏移到透视图右侧。
页:
1
[2]