[爱学习]必须的 18:13:42
(command "rotate" po "" p3 "180" )麻烦问一下,旋转180度,在这里边180应该怎样改?
[pzweng][pzweng]路人 18:16:11
(command "rotate" po "" p3 "180" "")
[爱学习]必须的 18:16:53
哦,这样呀,我试一下。
[爱学习]必须的 18:19:05
路人,不行呀提示未知命令180
[pzweng][pzweng]路人 18:20:12
(command "rotate" po "" p3 180 "")
[pzweng][pzweng]路人 18:21:34
(command "rotate" (ssget) "" (getpoint) 180)
(command "rotate" po "" p3 180 )
[pzweng][pzweng]路人 18:22:47
没错呀。搞不,我这里正常
搞不懂
[爱学习]必须的 18:23:16
哦,那您帮我看一下我的程序哪里有问题好吗?
[爱学习]必须的 18:23:46
(defun c:csc()
(prompt "
画线")
(setq p1 (getpoint "
选择起点"))
(setq p2 (getpoint p1 "
选择终点"))
(setq mm (getstring "
输入距离:"))
(command "pline" p1 p2 "")
(setvar "osmode" 0)
(setq ss (distance p1 p2 ))
(setq ang (angle p1 p2))
(setq p3 (polar p1 ang (* 0.5 ss)))
(setq p4 (polar p3 (+ ang (* 0.5 pi)) 2))
(setq qq (/(* ang 180) pi))
(command "text" "s" "ML" "j" "m" p4 2.0 qq mm )
(setq po (entnext))
(setq ang1 (/(* pi 180) pi))
(initget 1 "y n")
(setq kk (getkword "
方向是否正确"))
(if (= kk "n")
(command "rotate" po "" p3 180 )
)
(setvar "osmode" 5)
)
[爱学习]必须的 18:27:27
(command "text" "s" "ML" "j" "m" p4 2.0 qq mm )如果不能运行的话,您吧"s" "ML"删除试一下,谢谢您了
[pzweng][pzweng]路人 18:32:17
你要旋转文字还是线?
[爱学习]必须的 18:33:04
文字
有时候文字方向不对,要旋转180度
[pzweng][pzweng]路人 18:35:07
(defun c:test()
(prompt "
画线")
(setq p1 (getpoint "
选择起点"))
(setq p2 (getpoint p1 "
选择终点"))
(setq mm (getstring "
输入距离:"))
(command "pline" p1 p2 "")
(setvar "osmode" 0)
(setq ss (distance p1 p2 ))
(setq ang (angle p1 p2))
(setq p3 (polar p1 ang (* 0.5 ss)))
(setq p4 (polar p3 (+ ang (* 0.5 pi)) 2))
(setq qq (/(* ang 180) pi))
(command "text" "j" "m" p4 2.0 qq mm )
(setq po (entlast))
(setq ang1 (/(* pi 180) pi))
(initget 1 "y n")
(setq kk (getkword "
方向是否正确"))
(if (= kk "n")
(command "rotate" po "" p3 180 )
)
(setvar "osmode" 5)
)
[爱学习]必须的 18:38:29
您这个好像跟我发的一样
[pzweng][pzweng]路人 18:39:17
你试试看
[爱学习]必须的 18:40:10
哦,我现在下班了,明天试一下,谢谢您了
[pzweng][pzweng]路人 18:40:24
好
[爱学习]必须的 18:40:44
加您个好友吧。
[爱学习]必须的 18:45:15
您这个加不了。那谢谢您了 |