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

Convert 2008 code to 2011 code

6 REPLIES 6
Reply
Message 1 of 7
texas1992
323 Views, 6 Replies

Convert 2008 code to 2011 code

I have created a dll initially for use in the AutoCAD 2008 application. It works great. Now I have been asked to convert it to work with 2011.

 

I wrote it in .NET using VS2008 and VB.NET.

 

When I switch the references to the 2011 libraries the code won't run. However, when I switch everything back to 2008 it works fine. Does anyone know what the problem is? I have tried to debug but the breakpoint is never reached. I get the error message on the command line that says: "Unknown command "SCADATACONVERT".  Press F1 for help." Why can't it find this command.

 

Here is the code that I have:

 

Imports Excel = Microsoft.Office.Interop.Excel
Imports Autodesk.AutoCAD
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.ApplicationServices
'Imports Autodesk.AutoCAD.EditorInput
Imports System.Reflection

Public Class scaCommands

    <CommandMethod("scaDataConvert")> _
Public Sub scaDataConvert()

 

Thanks.

6 REPLIES 6
Message 2 of 7
Alfred.NESWADBA
in reply to: texas1992

Hi,

 

if you have updated the references correctly, it should run, at least the command should get started and the breakpoints should interrupt (as long as you are in debug mode). Fine would be also if you set Framework 3.5 (for AutoCAD 2011) as the active Framework for you project.

 

Let's start with the first question: does the command _NETLOAD ahow anything when you load the DLL?

 

- alfred -

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

Yes, NETLOAD brings up the dialog to find the dll but when I type in the command all I get is the error message.

Message 4 of 7
Alfred.NESWADBA
in reply to: texas1992

Hi,

 

just to make sure: after picking the DLL within the filedialog and click on LOAD-button you don't get any message in the command-line? (before you start the command you defined). Try to press <F2> after loading the dll to get more lines visible.

 

- alfred -

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

I changed the framework to 3.5 and now when I run the application I get an error: "The component 'Autodesk.AutoCAD.AcInfoCenterConn.MyAutoCADBalloon' does not have a resource identified y the URI"

 

The 2008 DLL runs in 2011 but I don't understand why the 2011 DLL won't.

Message 6 of 7
Alfred.NESWADBA
in reply to: texas1992

Hi,

 

looks like more people had a problem similar to yours. E.g. look >>>here<<<

And also Google finds a lot for the word "MyAutoCADBalloon", go through the found items.

 

Good luck, - alfred -

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

OK, this is weird but if I try to run the application outside fo the development environment it works fine.

 

Thanks for your help.

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