用VBA对AutoCAD进行二次开发的程序怎么运行呢
2个回答
追问
那能否弄成独立软件来调用cad画图呢
追答
当然可以,在vb中建立工程,用如下代码,实现自动开启AutoCAD软件, 并新建dwg文档
process.Hide
Dim acadApp As Object
Dim acadDoc As Object
Dim acadline As Object
Dim adoc As Object
On Error Resume Next
Set acadApp = GetObject(, "AutoCAD.Application")
If Err Then
Err.Clear
Set acadApp = CreateObject("AutoCAD.Application")
If Err Then End
End If
acadApp.Visible = True
Set adoc = acadApp.Documents.Add
Set acadDoc = acadApp.ActiveDocument
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询