.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Starting AutoCAD 2012 on a W7 64bit Machine from VS 2010 Express

23 REPLIES 23
Reply
Message 1 of 24
egcallis
1172 Views, 23 Replies

Starting AutoCAD 2012 on a W7 64bit Machine from VS 2010 Express

Target Platform is W7 64bit running AutoCAD 2012. Development is with VS 2010 Express.

 

We have a VBA routine the we have been using for 5 years to convert DXFs produced by another 3D package into DWGS. Basically, the program cyles through all the *.dxfs in a folder and changers entitties's layers, colors, modifies text widths, and then scales all by a certain factor.

 

So I've created a VS 2010 Express Windows Application to do this from outside of AutoCad (I couldn't get the code to work as a DLL inside of AutoCAD).

 

Questions:

 

1. Can I use VS 2010 Express to create this application?

  a. If yes, how fo I tell VS 2010 Express to compile for 64bit?

  b. What is the Syntax to start an AutoCAD Application?

 

2. If the answer to 1 is no, can I use VS 2005 Professional to create it?

 

Assuming one of the above answers is yes, which Autodesk components do I need to reference in my VS project?

 

Yes, I've searched this forum for help, but AutoCAD 2012 combined with 64 bit has considerably muddied the waters for me.

 

Fianally, I'm sure I can convibce my boss to upgrade my VS 2005 to 2010 if needed, but don't want to unless it would solve most of the issues. I use VS 2005 for other programs and they compile fine on the 64bit machine I'm using.

 

 

23 REPLIES 23
Message 21 of 24
egcallis
in reply to: norman.yuan

This is on my laptop (which is my main computer). I'm an engiineer (structural) but I do all the development for my company.

 

I'm the admin and have full access rights.  AutoCad actually starts (I can see it in Task Manager), but I get the error.

The office IT dude installed AutoCAD 2012 not me. I'll have to get the DVD from them (I'm a remote employee).

 

I checked the ACad.exe.config and it has the line you warned about "supportedRuntime version="v4.0".

 

I do have the AutoCAD 2010 DVD. Since our side of the firm only uses AutoCAD as a utility (we are the 3D group), would it be worth my time to uninstall 2012, install 2010 and try to start a 2010 instance?

Message 22 of 24
egcallis
in reply to: egcallis

Uninstalled 2012, installed 2010 and the simple connect works. I'll get back to the original code now.

 

Thanks Norman as it seems my issue was AutoCAD 2012 (Installation/References) related.

 

Eric

Message 23 of 24
egcallis
in reply to: egcallis

Okay everything is working after some remaining "on error ..." with "try ... " syntax. The code seems sluggish which I belive other posts have commented on several possible causes (using VBA like syntax thru COM).

 

One thing I noticed. When I first installed AutoCAD 2010 and went into the VS 2010 project, after adding the AutoCAD/ObjectDBX Common reference (under the COM tab), the Path would show up as unknown (unable to be found). So I pointed to the file thru Browse but the code would error out when I first tried to use the Common namespace. So I unstalled and reinstalled AutoCAD 2010. Now the AutoCAD/ObjectDBX Common does not show up at all under the Com tab. But when I point to the file thru browse, all works. Weird and troubling.

 

I haven't installed any of the 2010 patches yet. I'll wait till I get the code polished and finished.

 

 

Message 24 of 24
egcallis
in reply to: egcallis

H'm, I'm beginning to think that the phrase "Managed API" should be "Mangled API". After I installed AutoCAD 2010 SP2, couldn't connect to AutoCAD again. So I uninstalled the patch and everything works but it is a slow as molasses. Of course the AutoCAD/ObjectDBX Common is still missing under the COM tab. I think I'll go play some WOW and think about it.

 

In any event, thanks to all who helped. I'll start back next week on looking at speeding things up.

 

Happy New Year Peeps!

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost