求助vb简单问题
我想在vb中直接控制画图,请问我该如何把vb与cad连接上呢??? Use the Help files....In 2004
The following code example uses the Clear and Description properties of Err. If your coding environment does not support these properties, you will need to modify the example appropriately:
Sub Ch2_ConnectToAcad() Dim acadApp As AcadApplication On Error Resume Next Set acadApp = GetObject(, "AutoCAD.Application.16") If Err Then Err.Clear Set acadApp = CreateObject("AutoCAD.Application.16") If Err Then MsgBox Err.Description Exit Sub End If End If MsgBox "Now running " + acadApp.Name + _ " version " + acadApp.VersionEnd Sub
Next, set the document variable to the Document object in the AutoCAD application. The Document object is returned by the ActiveDocument property of the Application object.
Dim acadDoc as AcadDocumentSet acadDoc = acadApp.ActiveDocument
From this point on, use the acadDoc variable to reference the current AutoCAD drawing.
thankyou 我需要VB打开AutoCAD的详细程序
已经很详细了
页:
[1]