Author Topic: Compiling code for C3D-2007 after C3D-2008 is installed  (Read 3431 times)

0 Members and 1 Guest are viewing this topic.

sinc

  • Guest
Compiling code for C3D-2007 after C3D-2008 is installed
« on: May 06, 2007, 10:04:31 PM »
I'm having an issue I haven't been able to resolve.

Since installing Civil-3D 2008, all DLLs I create for C3D-2007 will only work if C3D-2008 is also installed on the same system.  It seems to have something to do with the Interop libraries, but I'm not entirely sure what is going on.  I made no changes to the references in my 2007 project - all I did was install C3D 2008, and now I can't create DLLs for people who have only 2007.  2008 must also be installed, or the DLLs crash at runtime.

This might be a simple issue for someone who is familiar with .NET assemblies and how Microsoft has them working.  I'm still pretty new to this whole .NET world, so I'm not entirely sure how to resolve the issue.  It could even be an issue created by Autodesk, which only they can resolve.  I'm not entirely sure.  And I'm hampered by the fact that I do not have easy access to a 2007-only test machine.  If anyone thinks they can figure this out, I'd appreciate the help.  The complete source code project is available at:

http://www.ejsurveying.com/sincpacc3d.htm

sinc

  • Guest
Re: Compiling code for C3D-2007 after C3D-2008 is installed
« Reply #1 on: May 06, 2007, 10:07:45 PM »
Alternatively, if someone who has only Civil-3D 2007 installed can download and compile the source, then get the DLL back to me, I'd appreciate that, too.  Then I could at least post a working DLL on our website.

Glenn R

  • Guest
Re: Compiling code for C3D-2007 after C3D-2008 is installed
« Reply #2 on: May 06, 2007, 10:20:01 PM »
It sounds you're referencing the Interop libraries from 8 explicitly and whne it's tried to run on 7 it chokes.
I haven't found a neat way to get around the interop library thing as of yet, so you should keep 2 versions and reference the appropriate libraries for each.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Compiling code for C3D-2007 after C3D-2008 is installed
« Reply #3 on: May 06, 2007, 11:15:37 PM »
Hi Glenn.
How would you go about doing that? Both 2007 & 2008 install "acax17enu.tlb" in the Autodesk Shared folder, so once 2008 is on the machine the only one available to reference is the 2008 version.

TonyT

  • Guest
Re: Compiling code for C3D-2007 after C3D-2008 is installed
« Reply #4 on: May 07, 2007, 12:46:54 PM »
The AutoCAD ActiveX assemblies are in the GAC, so the
libraries from the newest release will be used by default.

That means that once someone with a working copy
of your app targeting '07 installs '08, the '07 version
may no longer work on '07.

You may have heard how installing a trial version of a
newer release of AutoCAD often corrupts installed
applications that work in an installed earlier release.

The only way to address that, is to copy your entire
Common Files\Autodesk Shared folder before you install
a newer release, to a different name. Then, when you
run the earlier release, rename the two copies of the
that folder so the one that was installed by the release
you're going to run is named 'Autodesk Shared'.

Autodesk shouldn't have given this folder the name
'Autodesk Shared'.

'Autodesk Sabatoge' would be more appropriate.

Hi Glenn.
How would you go about doing that? Both 2007 & 2008 install "acax17enu.tlb" in the Autodesk Shared folder, so once 2008 is on the machine the only one available to reference is the 2008 version.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Compiling code for C3D-2007 after C3D-2008 is installed
« Reply #5 on: May 07, 2007, 03:14:17 PM »
Autodesk shouldn't have given this folder the name
'Autodesk Shared'.

'Autodesk Sabatoge' would be more appropriate.
Thanks, Tony. I had thought about trying the dual folders, but I was hoping there was a "better" way.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Compiling code for C3D-2007 after C3D-2008 is installed
« Reply #6 on: May 07, 2007, 03:22:30 PM »
Reflecting a bit more on the Shared Folder.....

It's funny that Adesk decided to place the TLB files in this shared folder, so that all same-version products will use it (Vanilla, ADT, LDT, C3D, etc.). Yet they insist on installing separate, identical, Material libraries for each and every one of them.

sinc

  • Guest
Re: Compiling code for C3D-2007 after C3D-2008 is installed
« Reply #7 on: May 07, 2007, 04:05:20 PM »
It sounds like I may have to just chalk this one up to an Autodesk blunder, and tell everyone that they have to move to C3D 2008 to keep using the SincpacC3D.  Or download the source project and compile it themselves if they want to run it in 2007.

I don't think I'm going to spend the time uninstalling and reinstalling software, and then deal with constantly renaming directories, just to get around this issue.  (After all, I'm posting the SincpacC3D as a public service, and I'm not getting paid for it...  :-))  There are still tons of problems in C3D 2008, including some that weren't there before, but overall C3D 2008 is so much better than 2007 SP3 that hopefully most people will be dropping 2007 pretty quickly.