Documentation for Visual Basic API

Documentation for Visual Basic API

Anonymous
Not applicable
529 Views
3 Replies
Message 1 of 4

Documentation for Visual Basic API

Anonymous
Not applicable
Hi,

Can anybody share some kind of pdf/doc which has some
documentation on how to use VB code ?

Regards,
Deepti
0 Likes
530 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
I don't have any documentation in either format other than the help files that comes with AutoCAD and Microsoft Office, but highly recommend a printed book "VB & VBA in a NUTSHELL" by Paul Lomax published by O'Reilly.
0 Likes
Message 3 of 4

Anonymous
Not applicable
This should get you started.

Public Sub Main()
On Error Resume Next
'attempt to get last version of AutoCAD opened
Set oApp = GetObject(, "AutoCAD.Application")

If Err Then
Err.Clear
'attempt to create instantiation of last version of AutoCAD opened
Set oApp = CreateObject("AutoCAD.Application")
'no AutoCAD is available
If Err Then
MsgBox "Cannot start AutoCAD ... sorry!", vbExclamation, "Error
starting AutoCAD"
Unload Me
End If
End If

oApp.Visible = True

Set ThisDrawing = oApp.ActiveDocument
End Sub

Joe ...


wrote in message news:[email protected]...
Hi,

Can anybody share some kind of pdf/doc which has some
documentation on how to use VB code ?

Regards,
Deepti
0 Likes
Message 4 of 4

Anonymous
Not applicable
Help files! , that's how I learned and was self-taught that way. Trial and error dude , or just go buy a book
0 Likes