所以若你们给正值,尺寸应该和Y轴一致,若给负值,尺寸应该和Y轴相反。
试试看,如果您需要有关代码的任何帮助,请告诉我:
(defun c:holedim(/ bs p1 nd no vl ang dis gap p)
(if
(and (setq bs (getpoint "\npick left endpoint : "))
(setq p1 (getpoint "\npick point of the first hole :" bs))
(setq nd (getpoint "\npick point of the last hole :" bs))
(setq no (getint "\nEnter number of holes :"))
(setq vl (getreal "\nEnter dimspacing value :"))
)
(progn
(setq ang (angle bs nd)
dis (distance bs nd)
gap (/ (- dis (distance bs p1)) (1- no))
)
(command "_.dimlinear" "_non" bs "_non" p1 (setq p (polar bs (+ ang (* pi 0.5)) vl)))
(repeat (1- no)
(command "_.dimlinear" "_non" p1 "_non" (setq p1 (polar p1 ang gap)) "_non" p)
)
)
)
(princ)
) 实际上,我发现我的问题可以通过在dimstyle中微调下打开“手动放置文本”来解决。
我的问题是,有没有快捷方式或代码可以在我的功能期间暂时打开它。我想在编写代码时启用“手动放置文本”,但在代码完成后将其关闭。
编辑:Nvm,我找到了,命令“dimupt”
页:
1
[2]