|
I now have a program in a class module:
Function AutoCADConnect () 'Connect AutoCAD
On Error Resume Next
Set obj_Acad = GetObject (, "autocad.application")
If Err Then
Err.Clear
On Error Resume Next
Set obj_Acad = CreateObject ("autocad.application")
If Err Then
Err.Clear
MsgBox "Cannot run AutoCAD, please check if it is installed!", VbOKCancel, "Warning!"
Exit Function
End If
End If
obj_Acad.Visible = True
Set obj_Doc = obj_Acad.ActiveDocument
Set obj_ModelSpace = obj_Doc.ModelSpace
'MsgBox "End of operation!", VbOKOnly, "Project 1!"
boo = True
End Function
The question for you heroes is how to put the data in the following class modules
obj_Acad
Set obj_Doc
Set obj_ModelSpace
How to achieve the form in VB
debug.print obj_Acad --------> True
debug.print Set obj_Doc --------> True
debug.print Set obj_ModelSpace --------> True |
|