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

Help Help Connecting VB.net to AutoCAD 2012. It's allmost impossable

25 REPLIES 25
Reply
Message 1 of 26
muckmailer
1354 Views, 25 Replies

Help Help Connecting VB.net to AutoCAD 2012. It's allmost impossable

I have been trying to connect to AutoCAD 2012 64 bit without any luck. for some time.

 

I have tryed Jerry Winters templates for autoCAD 2010 64 bit. No luck because it can't

find the working directory.  If I try to correct that problem I come up with other errors.

 

I have trying installing AutoCAD 2012 wizzard and I have no luck to get it working When I install

It says "Visual Studio Express 2008 or 2010 not installed "when I have VS 2008 allready installed on

my machine. Unblocking the file does not change anything.  Is a another dead end.

 

I have VS 2008 express install on my AutoCAD 2012 machine 64 bit. Can some give

a suggestion to make a VB.net connection to AutoCAD. Maybe a working sample program

works on AutoCAD 2012 (64 bit) would help. Maybe a 2012 template for AutoCAD 2012 (64bit)

to see if a can get some kind of AutoCAD connection.

 

Any suggestions, I am about to give up on this VB.net thing.

 

Thank you,

 

25 REPLIES 25
Message 2 of 26

Hi,

 

>> Maybe a working sample programworks on AutoCAD 2012 (64 bit) would help

At least you have samples within the ObjectARX-kit, there are samples for C++ and also for C# and VB.NET, look and download it from >>>here<<< ... it's free, but you have to register for it.

The only things you may have to change in these samples is the folder of the files referenced.

 

>> I have VS 2008 express install on my AutoCAD 2012 machine 64 bit

As AutoCAD 2012-libraries are based on Framework 4 you should follow the recomendations and you VisualStudio 2010 instead. Of course there are workarounds to get your code running and to be able to debug with Framework 3.5, but it's not designed for that.

 

Good luck, - alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 26
muckmailer
in reply to: muckmailer

Ok I downloaded the AutoCAD object ARX in the above link and installed it. I find a lot of *.dg files.

under the samples folder. Where are the VB.net sample files. When I create a new vb.net project

I usually use *.vbproj to start a project?  Please walk me through this? 

 

Also, If I install VS 2010 express. Is there an expiration date on it.  I think there is not a expiration date

on VS2008?

 

Thank you, 

Message 4 of 26
muckmailer
in reply to: muckmailer

Ok so they are _dg folders but it looks like there are *.vbcprog files in them I guess those are

Net c files. Where are the vb.net project files?

Thank you,

Message 5 of 26

Hi,

 

>> Where are the vb.net project files?

search for *.VBPROJ ... that brings you to all subfolder from samples\dotNet

 

- alfred -

 

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 6 of 26
muckmailer
in reply to: muckmailer

I went into Dot Net folder and opened Helloworld project in VS 2008 and all I got was build errors.

I tryed Selectionset.vpproj with the same results. These programs form AutoDesk are not working.

So what is the next step?

Thank you,

Message 7 of 26

Hi,

 

>> These programs form AutoDesk are not working.

>> So what is the next step?

As the readme's tell you, have you updated the references?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 8 of 26
muckmailer
in reply to: muckmailer

Which readme file?

I looked in the Helloworld readme file in dot net folderl

It did not mention anything about referance files. It only talked about netloading.

So is there another readme file I should look at?

Thank you,

Message 9 of 26
muckmailer
in reply to: muckmailer

Here is a print screen of the Hello World program referances.

see file attachment.

Thank you,

 

Message 10 of 26

Hi,

 

what I see is that you are running VS in normal mode (it has not started AutoCAD for debugging purposes) and in parallel you have startet AutoCAD. So if now you have your DLL loaded into this AutoCAD-instance you would not be able to compile as the DLL is currently locked/is in-use by AutoCAD.

 

I also see that your VS-project shows 1 error and 1 warning (lower left corner of your VS-AppWindow). As long as you have errors the usage of this project is useless.

 

>> So is there another readme file I should look at?

I think parallel to every single sample is a readme, start Windows-Explorer and go to the samples\dotNET\HelloWorld- directory:

 

 

If you have a problem getting VS-Express into AutoCAD-debugging-mode than look to >>>this blog<<<.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 11 of 26

Note, The Hello World program that I have is a AutoCAD ARX download.

I have not made any code changes that I know of so it should be usable

with my version of AutoCAD if I can get it correctly setup. 

Still working on that problem.

Thank you,

Message 12 of 26

so I must close AutoCAD before starting the VB.net 2008 express?
Then load the VB hello world into the VB.net editor?
Then run the Hello world program in the VB.net editor and it should start AutoCAD?
Then use Netload the Autocad Dll in AutoCAD?
Is that the corrrect proceedure?

 

Thank you,

Message 13 of 26

Hi,

 

>> Then run the Hello world program in the VB.net editor and it should start AutoCAD?
>> Then use Netload the Autocad Dll in AutoCAD?

That's the way debugging of dotNET-DLL's in AutoCAD works 😉

Didn't you look to the link to Keyn Wamlsley's site?

 

Also start your personal searcher (Google) for video's to that, there are a lot! E.g. >>>my first plug-in Training<<< will be found (lesson 4 is for debugging).

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 14 of 26

Could you give me the link to the Keyn Wamlsley's website and I will take a look at it.

I look at Kean Walsley Web site called "Through the Interface" It talked about making

a file in the project folder to start AutoCAD.exe in a express project. I need to take a closer look

at it yet.

Thank you,

Message 15 of 26

Hi,

 

look within this thread to message 10, there I have placed a hyperlink within my last sentence called >>>this blog<<<, just click it!

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 16 of 26
muckmailer
in reply to: muckmailer

So do I have to make a file with the following informaiton in it and put it in the project folder?

 

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">  

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">     <StartAction>Program</StartAction>    

<StartProgram>C:\Program Files\AutoCAD 2007\acad.exe</StartProgram>  

</PropertyGroup> </Project>

 

and follow the instruction in that webpage to get Hello world to work?

Thank you,

Message 17 of 26

Hi,

 

>> So do I have to make a file with the following informaiton in it and put it in the project folder?

Not "create a file" as you already have a VBPROJ-file, you just have to modify this section within your existing VBPROJ-file of your project.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 18 of 26
muckmailer
in reply to: muckmailer

The webpage talks about  a called file "MyProjectName.vbproj.user". It says it shoulld be in the same folder as the file "ClassLibrary1.vbproj.user". I don't see a file called Helloworld.vbproj.user or  "ClassLibrary1.vbproj.user.

So in our Autodesk Sample Helloworld. What file to I place the above code in. Do I use a text editor like word to

do this? For visual express 2008. should the first line have a 2003 in it or a 2008?

 

 

Thank you,

Message 19 of 26

Hi,

 

sorry, I don't use the Express-version so I never had to play with that workarounds.

And YES, you have to modify the .VBPROJ.USER file (not as I mentioned above the .VBPROJ-file).

 

If the .VBPROJ.USER file does not exist (then this may be one of the differences between the express and the prof. version) you have to create it.

 

Sorry for my mistake in the previous post!

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 20 of 26
muckmailer
in reply to: muckmailer

So create a file called Helloworld.vbproj.user with notepad and place

the above code  (message 16) in it then

put that file in the project folder?

Then follow the proceedure in message 12?

 

Thank you,

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