Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Distinguished Contributor
muckmailer
Posts: 125
Registered: ‎05-10-2009
Message 1 of 4 (240 Views)

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

240 Views, 3 Replies
03-06-2014 10:14 AM

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,

Distinguished Mentor
BlackBox_
Posts: 768
Registered: ‎02-25-2013
Message 2 of 4 (230 Views)

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

03-06-2014 11:10 AM 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



"Potential has a shelf life." - Margaret Atwood


Autodesk Exchange Apps ~ Autoloader ~ AutoCAD Security

*Expert Elite*
_gile
Posts: 2,084
Registered: ‎04-29-2006
Message 3 of 4 (207 Views)

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

03-07-2014 03:22 AM 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
Distinguished Mentor
BlackBox_
Posts: 768
Registered: ‎02-25-2013
Message 4 of 4 (198 Views)

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

03-07-2014 06:10 AM 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



"Potential has a shelf life." - Margaret Atwood


Autodesk Exchange Apps ~ Autoloader ~ AutoCAD Security

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

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