|
为什么用vb打开cad会出两个cad,并且会出现cad帮助Private Sub Command1_Click()
Shell "E:\CAD2005\acad.exe", vbMaximizedFocus '(打开cad )
SendKeys "{enter}", True
SendKeys "appload", True '(加载lisp程序)
SendKeys "{enter}", True
SendKeys "\aa.lsp", True '(调用lisp程序)
SendKeys "{enter}", True
SendKeys "{esc}", True
SendKeys "aa", True
SendKeys "{enter}", True
SendKeys "200,200", True '(数据输入 )
SendKeys "{enter}", True
SendKeys "100,100", True
SendKeys "{enter}", True
End Sub
大家帮看看这段有什么问题啊! 为什么会打开好几个cad啊
aa.lisp:
(defun c:aa()
(setq p1 (getpoint"点1:"))
(setq p2 (getpoint"点2:"))
(command "line" p0 p1 "")
)
怎么看都觉的没什么问题啊!
大家帮帮忙啊看出问题的,我请吃饭啊! |
|