VB progs for use with Multiple ACAD versions

VB progs for use with Multiple ACAD versions

Anonymous
Not applicable
231 Views
2 Replies
Message 1 of 3

VB progs for use with Multiple ACAD versions

Anonymous
Not applicable
Hi all:
Will this code work reliably when setting myApp object on machines with
R14.01 and 2002 installed?
I am just curious (still looking for a machine with R14.01 and 2002
installed) if this is a correct/good technique.
Thanx, Gary

.
.
.
On Error Resume Next
Set myApp = GetObject(, "AutoCAD.Application")

If err Then
err.Clear
MsgBox "AutoCAD® is not currently running... ", vbInformation
End
End If

pstrVersion = myApp.Version
Select Case True
Case InStr(pstrVersion, "14.") > 0
Set myApp = Nothing: Set myApp = GetObject(,
"AutoCAD.Application.14")
Case InStr(pstrVersion, "15") > 0
Set myApp = Nothing: Set myApp = GetObject(,
"AutoCAD.Application.15")
Case Else
MsgBox "Error starting AutoCAD®" , vbCritical: End
End Select
.
.
.
0 Likes
232 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Gary Riggs had this to say:

> Hi all:
> Will this code work reliably when setting myApp object on machines
> with R14.01 and 2002 installed?
> I am just curious (still looking for a machine with R14.01 and 2002
> installed) if this is a correct/good technique.

For a reliable and easy-to-use method of ensuring you get the version and
profile you need, visit the following link:

http://code.acadx.com/downloads/001.htm

--
"If you want to be somebody else change your mind"
http://www.acadx.com
http://vbxtender.sourceforge.net
0 Likes
Message 3 of 3

Anonymous
Not applicable
I have been running AutoCAD Map2004 and my VBA routines have run OK. Today I loaded AutoCAD 2000 on my computer to let me save files in R14 format. Now some of my VBA routines don't work. I tried going to the site http://code.acadx.com/downloads/001.htm without success
(Apparently the website has changed in the last 4 years). Can anybody tell me where I need to go to access the reliable and easy-to-use method Frank was referring to?
0 Likes