.NET

Reply
Distinguished Contributor
junoj
Posts: 116
Registered: ‎02-26-2009
Message 1 of 4 (139 Views)

Acdbmgd versions compatibility issues

139 Views, 3 Replies
08-30-2013 08:38 AM

In one my codes I am using a property of an Editor [ ActiveViewportId ] and I am able to compile that when I reference the (acdbmgd, acmgd) from 2011 without any problems.

 

When I try to do the same for the 2008, I get an error stating that [ ‘ActiveViewportId’ is not a member of ‘Autodesk.AutoCAD.EditorInput.Editor’ ]

 

Do we as .net programmers have a remedy for situations like the one above? Can we import objects from one class library to another? I am just trying to find the best way on how someone would go about trying to make their code compatible across several versions of AutoCAD.

Thank you,

 

-J

*Expert Elite*
dgorsman
Posts: 5,372
Registered: ‎10-12-2006
Message 2 of 4 (129 Views)

Re: Acdbmgd versions compatibility issues

08-30-2013 10:21 AM in reply to: junoj

Thats a pretty big jump between versions.  Later versions frequently include things which are not available in older versions, and there is nothing to be done about it aside from coding based on the most restrictive environment (forward compatibility is always easier).  Otherwise, you need to code specifically for the quirks and limitations of each version.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
Adopt. Adapt. Overcome. Or be overcome.
A good question will be halfway to a good answer.


Distinguished Contributor
junoj
Posts: 116
Registered: ‎02-26-2009
Message 3 of 4 (116 Views)

Re: Acdbmgd versions compatibility issues

08-30-2013 12:33 PM in reply to: junoj

So with .NET one has to “compile their code” overtime a new version of CAD is issued. Because it appears that it’s not only backward incompatible but it’s also forward incompatible too.

 

I tried running my 2008 code in 2013 and it does not work.

 

I ask this because files like lisp and vba have been running on multi versions of CAD without any issues, and with .NET it’s less than 5 and the code needs amendments.

 

So how would one go about keeping track with their .NET code? Procedures, best practices; I would like to learn and adapt good habits. Any advice on this topic would be appreciated.

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

Re: Acdbmgd versions compatibility issues

08-31-2013 12:57 AM in reply to: junoj

Hi,

 

There're very few forward compatibility issues with the .NET API, except the 2013 "big split".

 

I have many programs targeting the A2007 SDK (Framework 2.0) which work from A2007 to A2012 without any changes in the code nor need to new compilation, and which only needed a new compilation referencing A2013 assemblies to work with A2013-2014.

 

By my side, the only forward compatibility problem I encountered before 2013 was with abstract method Drawable.ViewportDraw() which changed to Drawable.SubViewportDraw() with A2010 (see here).

Gilles Chanteau
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.