Visual Basic Customization

Visual Basic Customization

Reply
Mentor
GVDB
Posts: 215
Registered: ‎01-16-2006
Message 1 of 5 (754 Views)

Createobject problem to AcadM 2011

754 Views, 4 Replies
07-04-2010 11:54 PM

Hello,

 

I've a program written in VB6 which starts Autocad:

 

Public oAcadApp As AcadApplication

Set oAcadApp = CreateObject("AutoCAD.Application.18.1")

 

on a PC with XP 32 bit there is no problem but on a PC with XP 64 bit -> oAcadApp stays Nothing, while Autocad does start up properly.

 

Do I miss something? Is there a difference between 32 bit and 64 bit for VB6?

 

Regards,

 

Geert

 

 

Valued Contributor
jsurpless
Posts: 83
Registered: ‎08-12-2008
Message 2 of 5 (701 Views)

Re: Createobject problem to AcadM 2011

10-20-2010 04:57 AM in reply to: GVDB

I've got a similar problem...

 

I'm using 'AutoCAD_Instance = CreateObject("AutoCAD.Application")' to open AutoCAD... I'm not including the version because my company upgrades every year and I don't want to have to re-issue the app each time...

 

On WinXP, one user has both 2011 and 2010 installed... it works perfectly, opening the last version opened (same as double-clicking on a dwg file in Windows)... but in Vista, I get the error you mentioned...

 

Any thoughts?

Mentor
GVDB
Posts: 215
Registered: ‎01-16-2006
Message 3 of 5 (688 Views)

Re: Createobject problem to AcadM 2011

10-21-2010 04:51 AM in reply to: jsurpless

hi, my solution was to declare:

 

Public oAcadApp As Object -> instead of AcadApplication

 

Good luck,

 

Kind regards,

 

Geert

Valued Contributor
jsurpless
Posts: 83
Registered: ‎08-12-2008
Message 4 of 5 (683 Views)

Re: Createobject problem to AcadM 2011

10-21-2010 09:41 AM in reply to: GVDB

Yeah, I've got that done - works fine with XP (and apparently Windows 7) but not Vista...

Mentor
GVDB
Posts: 215
Registered: ‎01-16-2006
Message 5 of 5 (678 Views)

Re: Createobject problem to AcadM 2011

10-21-2010 11:09 PM in reply to: jsurpless

We only use XP - 32 bit and Win7 - 64 bit so with Vista I can't help you.

On Win7 - 64 bit it works with Object, but it's a workaround at the problem and isn't a nice solution.

But it works for me.

 

Geert

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.