Author Topic: Compile Versions  (Read 1473 times)

0 Members and 1 Guest are viewing this topic.

squirreldip

  • Newt
  • Posts: 114
Compile Versions
« on: December 12, 2011, 02:26:54 PM »
Can versions compiled using newer versions be loaded with older versions (or visa-versa)?

I have a fairly large library of routines (LISP) that have been created over many years and for the vast majority they 'keep on ticking'.  As time continues I see that LISP is going to be handicapped and to access new features I'm going to need to dive into .NET.

I originally started with LISP in the late 80's creating routines to assist with my design work - I'm an Transportation Engineer by trade (not a programmer but have some Computer Science background).  I started creating some fairly complex routines to assist with light rapid transit in the mid-90's but found due to the limitations of LISP (speed mostly) I was forced to work in Watcom C.  This stuff worked fantastically up until AutoCAD moved from DOS to Windows - it was fairly frustrating as everything I had was going to have to be rewritten.

Lucky for me AutoCAD made some drastic improvements with how LISP was implemented and speed wasn't as big an issue.  So I made the decision to revert back to LISP.  The main reason for going back was that AutoCAD was making hefty changes with each version where LISP only required minor revisions (and these revisions were generally compatible with previous versions).  I have some simple routines that were created, originally, as far back as pre-90 that are still working today.

My fear with stepping away from LISP is with the need to continuously have to update routines or even completely change them.  At the same time I am finding a number of LISP limitations (my latest is not being able to access superelevations in the C3D database).  Hopefully, .NET has matured enough to help keeping some stability.

So - back on subject...

The programming needs to work in multiple versions of Civil 3D (and likely vanilla AutoCAD).  Currently, our office is still using Civil 3D 2010 32 bit but others are using 2011 (32 and 64) and we'll all be eventually moving to 2012 (32 and 64).

I will obviously need to keep the AutoCAD and Civil 3D programming separate and can easily check via LISP as to which ones to load (or not to load).  But, do I need to compile for different versions?  Do I need to compile separately for 32 and 64 bit?

I've written a bit of code testing the getsymbol and putsymbol (using help I've found here) and compiled referencing the 64 bit version of C3D 2012 and the .dll loads and executes in the 32 bit 2010.

gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: Compile Versions
« Reply #1 on: December 12, 2011, 02:47:13 PM »
Hi, welcome to TheSwamp.

While you're not using the COM API (which is version and platform dependant) you should only have very few compatibility issues with the NET API.
A NET dll compiled against the A2007 SDK (Framework 2.0) should work with AutoCAD later versions even 32 or 64 bits.
But each version of AutoCAD (and Framework) brings new features sometimes very intersting.
Speaking English as a French Frog

squirreldip

  • Newt
  • Posts: 114
Re: Compile Versions
« Reply #2 on: December 12, 2011, 07:17:11 PM »
Thanks for the welcome!

So as long as I do not use features not included/supported by older versions there should not be any problem loading, and using, the NET .dll in those older (different) versions?


gile

  • Gator
  • Posts: 2507
  • Marseille, France
Re: Compile Versions
« Reply #3 on: December 13, 2011, 01:25:58 AM »
By my side, I had the habit to target A2007 and Framework 2.0 for the routines I published here and I encontered only one issue with the Autodesk.AutoCAD.Drawable abstract class implementation which changed with 2010 (see here).
Speaking English as a French Frog