Visual Basic Customization

Reply
Active Member
skelow
Posts: 9
Registered: ‎06-09-2009
Message 1 of 8 (407 Views)

Old VB6 Application Not working in Acad 2012

407 Views, 7 Replies
08-17-2011 07:38 AM

We have and old VB6 application that I tried to convert to .net but it had a ton of errors so I want to wait if I can.  In 2005 it works fine.  But we recently just upgraded to 2012.  I cannot get it to find my running acad 2012.  I use this currently. 

 

Set acApp = GetObject(, "AutoCAD.Application")

 

Should this work in 2012 or will I need to change it?

 

Steven

*Expert Elite*
Alfred.NESWADBA
Posts: 8,880
Registered: ‎06-29-2007
Message 2 of 8 (356 Views)

Betreff: Old VB6 Application Not working in Acad 2012

09-04-2011 07:15 AM in reply to: skelow

Hi,

 

>> Set acApp = GetObject(, "AutoCAD.Application")

>> Should this work in 2012 or will I need to change it?

Yes, in principle it should work.

First please look into your VB-project-references and verify that you have changed the AutoCAD-specific references from 2005 to 2012 (to 18.2). If that is the problem, that could be changed within seconds.

But what could be much more problem, would be differences between 32bit and 64bit, are you running now 64bit-AutoCAD? If so, you have no chance (imho) to get it running, because your EXE also has to be 64bit and with VB6 you cannot compile to 64bit. In that case your next step would be to upgrade your code from VB6 to VB.NET.

 

HTH, - alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Board Manager
StephenPreston
Posts: 366
Registered: ‎05-22-2006
Message 3 of 8 (342 Views)

Betreff: Old VB6 Application Not working in Acad 2012

09-06-2011 10:37 PM in reply to: Alfred.NESWADBA

There shouldn't be a problem automating a 64-bit executable from a 32-bit executable (and vice versa). That's only a problem if your COM server is a DLL you're loading into your executable's process space. But the AutoCAD 32- and 64- bit Type Libraries are different, and so you do need to reference the correct one, depending on which AutoCAD you're automating.

.

Cheers,

Stephen Preston
Autodesk Developer Network
Contributor
doc_x
Posts: 14
Registered: ‎02-19-2012
Message 4 of 8 (234 Views)

Betreff: Old VB6 Application Not working in Acad 2012

02-19-2012 09:41 AM in reply to: StephenPreston

Ok! But if my cad version support 32bits, my vb6 applications 'll work well. There's 2011 and 2012 32 bits.

*Expert Elite*
Alfred.NESWADBA
Posts: 8,880
Registered: ‎06-29-2007
Message 5 of 8 (229 Views)

Betreff: Old VB6 Application Not working in Acad 2012

02-19-2012 10:00 AM in reply to: doc_x

Hi,

 

doc_x ==> are you skelow (thread opener)? Or is this a new issue?

 

So show your code you have (at least the snippet where the problem occurs and give us as info the line and the message of the error.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Contributor
doc_x
Posts: 14
Registered: ‎02-19-2012
Message 6 of 8 (226 Views)

Betreff: Old VB6 Application Not working in Acad 2012

02-19-2012 10:25 AM in reply to: Alfred.NESWADBA

So Sorry!

*Expert Elite*
Alfred.NESWADBA
Posts: 8,880
Registered: ‎06-29-2007
Message 7 of 8 (224 Views)

Betreff: Old VB6 Application Not working in Acad 2012

02-19-2012 10:28 AM in reply to: doc_x

Hi,

 

>> So Sorry!

nothing to worry about, at least I did not mean anything that should have to be appologized.

It's just to make it clear for us as the thread had paused for 5 months now.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Contributor
doc_x
Posts: 14
Registered: ‎02-19-2012
Message 8 of 8 (193 Views)

Betreff: Old VB6 Application Not working in Acad 2012

02-20-2012 04:32 PM in reply to: Alfred.NESWADBA

Hi Alfred !

I understand that the old vb6 application does not work in AutoCAD 2012. But building an activex (. Dll) in vb6, it works perfectly in versions 2011 and 2012, once it is in 32bit. In 64-bit will also work, however, performance falls a bit In the 2010 version works fine.

 

I hope I have clarified,

 

Doc_x

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community