Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Resetting AutoCAD VB.NET Plug In for the next version of Autocad.

3 REPLIES 3
Reply
Message 1 of 4
muckmailer
525 Views, 3 Replies

Resetting AutoCAD VB.NET Plug In for the next version of Autocad.

I have both AutoCAD 2012 and 1213 on my machine. When I set up VB.net for AutoCAD
 it only had AutoCAD 2012 on it. Now they installed AutoCAD 2013 on my machine and did not
 remove AutoCAD 2013. Both versions are on a network license. How do I get VB.net 2010
 to work with AutoCAD 2013 and not 2012?

 

 Would I have change the reference paths for AutoCAD 2013 and make sure
 vb.net wizard for 2013 is present? What do I need to change to get VB.net to
 work with AutoCAD 2013?

 

 If I build a *.dll with my VS that is linked to AutoCAD 2012 then use netload
 to load it into AutoCAD 2013 the program will not load it. If I go back to AutoCAD
 2012 and use netload 2012 will load it.

 

 If I plan to use VB.net with AutoCAD I will need to know how to use net programs
 with various versions of CAD in the future and I will need to know how to move
 and store my programs on portable drives. So how do I deal with the VB.net AutoCAD
 file mapping/reference problem?

 

 AutoCAD VBA I did not have this problem because my code was in one file.
 With VB.net it is one problem after another.

 

 Thank you,

3 REPLIES 3
Message 2 of 4
BlackBox_
in reply to: muckmailer

Firstly, I suspect that you accidentally posted this thread to the LISP forum, instead of the .NET forum?

 

Autodesk broke the API between 2012 and 2013, which provided the AcCoreMgd.dll assembly reference requirement. In order to have your plug-in support both versions, simply duplicate your existing solution, add the core console reference to your new solution, and proceed to evanluate any other code changes for 2013 API, and recompile.

 

You might also benefit from the Autoloader mechanism to simplify the automagic loading of the correct assembly in the applicable version.

 

HTH



"How we think determines what we do, and what we do determines what we get."

Message 3 of 4
_gile
in reply to: BlackBox_

Hi,

 

You do not need to build a new solution. You can create a new project in the same solution and share the already written code between the two projetcs.

 

In your solution,

- create a new project (class library) targeting the Framework 4, add the required references (acmgd.dll, acdbmgd.dll, accoremgd.dll from ObjectARX 2013 \inc (prefered) or AutoCAD 2013 installation folder) ;

- Remove the 'Class1' file

- Right clic the 2013 project > Add > Existing element..., browse to the 2010 project, select the .cs or .vb files, choose 'Add as link' in the 'Add' button popup menu.

- Compile

 

Doing this, the code maintenance will be easier: the modification to the code will affect the both projects.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 4 of 4
BlackBox_
in reply to: _gile


@_gile wrote:

 

You do not need to build a new solution. You can create a new project in the same solution....


Good catch, Gile - 

 

I completely mistyped "solution" in lieu of "project"... Adding multiple projects to a single solution is how all of my plug-ins are setup, to include my Exchange Apps.

 

Sorry to the OP for any confusion.

 

Cheers



"How we think determines what we do, and what we do determines what we get."

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

Post to forums  

Autodesk Design & Make Report

”Boost