.NET

Reply
Distinguished Contributor
311 Posts
0 Kudos
Registered: ‎07-29-2004
Post 11 of 17

Re: Build for multiple Autocad versions

05-19-2005 02:05 PM in reply to: ChrisArps
I tried this yesterday testing a new program, ADT 2006 will not even run after changing the config file.

I have no idea about Autocad2006, but I suspect it will crash as well.
*Laurence Skoropinski
Post 12 of 17

Re: Build for multiple Autocad versions

05-20-2005 12:07 AM in reply to: ChrisArps
Cheers, thanks for the full explanation, will give it a go

Laurence
wrote in message news:4851112@discussion.autodesk.com...
Sure, the first two steps you will have to do manually to setup for your
compiles/builds.

1) Locate the Autodesk .dll files in the GAC. You cannot use windows
explorer for this, you have to use the good old command line with cd and
dir.

CD \winnt\assembly\GAC
xcopy *.* c:\temp\junk /S

This will copy all the subdirs and all dlls in the gac so you can get at
them with explorer.

2) Find the appropriate Autodesk folders and copy the dlls to a nice
location for your builds for ease of use.You will need a folder for each
version.

Now that we have the dotnet dlls you can now setup for builds.

Assuming we are building the 2006 version of the program:

3) Execute the unregister batch file for 2005 (shown below)
cd Assembly
cd ADT45
%Framework%\regasm Autodesk.AEC.Interop.ArchBase.dll /u
%Framework%\regasm Autodesk.AEC.Interop.Base.dll /u
%Framework%\regasm Autodesk.AEC.Interop.UIArchBase.dll /u
%Framework%\regasm Autodesk.AEC.Interop.UIBase.dll /u
%Framework%\regasm Autodesk.AutoCAD.Interop.dll /u
%Framework%\regasm Autodesk.AutoCAD.Interop.Common.dll /u
cd ..
cd ..

if (%1)==(AUTO) goto :EOF
pause

4) Execute the register batch file for 2006 (shown below)
cd Assembly
cd ADT47
%Framework%\regasm Autodesk.AEC.Interop.ArchBase.dll
%Framework%\regasm Autodesk.AEC.Interop.Base.dll
%Framework%\regasm Autodesk.AEC.Interop.UIArchBase.dll
%Framework%\regasm Autodesk.AEC.Interop.UIBase.dll
%Framework%\regasm Autodesk.AutoCAD.Interop.dll
%Framework%\regasm Autodesk.AutoCAD.Interop.Common.dll
cd ..
cd ..

if (%1)==(AUTO) goto :EOF
pause

There are 4 batch files, reg and unreg for 2005, reg and unreg for 2006.
Thist allows a developer to be on 2006 and we can build for both versions
(as long as he doesn't use any 2006 only features).
*Laurence Skoropinski
Post 13 of 17

Re: Build for multiple Autocad versions

05-20-2005 01:32 AM in reply to: ChrisArps
Can you just confirm the version numbers please. I have v16.2.54.0 which I
assume is 2006 and version 16.1.63.0 which I assume is 2005?

Laurence
wrote in message news:4851112@discussion.autodesk.com...
Sure, the first two steps you will have to do manually to setup for your
compiles/builds.

1) Locate the Autodesk .dll files in the GAC. You cannot use windows
explorer for this, you have to use the good old command line with cd and
dir.

CD \winnt\assembly\GAC
xcopy *.* c:\temp\junk /S

This will copy all the subdirs and all dlls in the gac so you can get at
them with explorer.

2) Find the appropriate Autodesk folders and copy the dlls to a nice
location for your builds for ease of use.You will need a folder for each
version.

Now that we have the dotnet dlls you can now setup for builds.

Assuming we are building the 2006 version of the program:

3) Execute the unregister batch file for 2005 (shown below)
cd Assembly
cd ADT45
%Framework%\regasm Autodesk.AEC.Interop.ArchBase.dll /u
%Framework%\regasm Autodesk.AEC.Interop.Base.dll /u
%Framework%\regasm Autodesk.AEC.Interop.UIArchBase.dll /u
%Framework%\regasm Autodesk.AEC.Interop.UIBase.dll /u
%Framework%\regasm Autodesk.AutoCAD.Interop.dll /u
%Framework%\regasm Autodesk.AutoCAD.Interop.Common.dll /u
cd ..
cd ..

if (%1)==(AUTO) goto :EOF
pause

4) Execute the register batch file for 2006 (shown below)
cd Assembly
cd ADT47
%Framework%\regasm Autodesk.AEC.Interop.ArchBase.dll
%Framework%\regasm Autodesk.AEC.Interop.Base.dll
%Framework%\regasm Autodesk.AEC.Interop.UIArchBase.dll
%Framework%\regasm Autodesk.AEC.Interop.UIBase.dll
%Framework%\regasm Autodesk.AutoCAD.Interop.dll
%Framework%\regasm Autodesk.AutoCAD.Interop.Common.dll
cd ..
cd ..

if (%1)==(AUTO) goto :EOF
pause

There are 4 batch files, reg and unreg for 2005, reg and unreg for 2006.
Thist allows a developer to be on 2006 and we can build for both versions
(as long as he doesn't use any 2006 only features).
*Laurence Skoropinski
Post 14 of 17

Re: Build for multiple Autocad versions

05-20-2005 02:59 AM in reply to: ChrisArps
My fault, test PC has 2006 so uninstalled and tried, failed, so repaired
2005 installation, worked.

Batch files - Great solution CArps

Laurence
"Laurence Skoropinski" wrote in message
news:4851451@discussion.autodesk.com...
Can you just confirm the version numbers please. I have v16.2.54.0 which I
assume is 2006 and version 16.1.63.0 which I assume is 2005?

Laurence
wrote in message news:4851112@discussion.autodesk.com...
Sure, the first two steps you will have to do manually to setup for your
compiles/builds.

1) Locate the Autodesk .dll files in the GAC. You cannot use windows
explorer for this, you have to use the good old command line with cd and
dir.

CD \winnt\assembly\GAC
xcopy *.* c:\temp\junk /S

This will copy all the subdirs and all dlls in the gac so you can get at
them with explorer.

2) Find the appropriate Autodesk folders and copy the dlls to a nice
location for your builds for ease of use.You will need a folder for each
version.

Now that we have the dotnet dlls you can now setup for builds.

Assuming we are building the 2006 version of the program:

3) Execute the unregister batch file for 2005 (shown below)
cd Assembly
cd ADT45
%Framework%\regasm Autodesk.AEC.Interop.ArchBase.dll /u
%Framework%\regasm Autodesk.AEC.Interop.Base.dll /u
%Framework%\regasm Autodesk.AEC.Interop.UIArchBase.dll /u
%Framework%\regasm Autodesk.AEC.Interop.UIBase.dll /u
%Framework%\regasm Autodesk.AutoCAD.Interop.dll /u
%Framework%\regasm Autodesk.AutoCAD.Interop.Common.dll /u
cd ..
cd ..

if (%1)==(AUTO) goto :EOF
pause

4) Execute the register batch file for 2006 (shown below)
cd Assembly
cd ADT47
%Framework%\regasm Autodesk.AEC.Interop.ArchBase.dll
%Framework%\regasm Autodesk.AEC.Interop.Base.dll
%Framework%\regasm Autodesk.AEC.Interop.UIArchBase.dll
%Framework%\regasm Autodesk.AEC.Interop.UIBase.dll
%Framework%\regasm Autodesk.AutoCAD.Interop.dll
%Framework%\regasm Autodesk.AutoCAD.Interop.Common.dll
cd ..
cd ..

if (%1)==(AUTO) goto :EOF
pause

There are 4 batch files, reg and unreg for 2005, reg and unreg for 2006.
Thist allows a developer to be on 2006 and we can build for both versions
(as long as he doesn't use any 2006 only features).
Distinguished Contributor
311 Posts
0 Kudos
Registered: ‎07-29-2004
Post 15 of 17

Re: Build for multiple Autocad versions

05-20-2005 05:26 AM in reply to: ChrisArps
I tried that out and it will work, but I lose the AcGe library in 2005,2006 code. I will just stick to the batch trick as it only affects the build machine and does not impact development environments.
Contributor
13 Posts
0 Kudos
Registered: ‎02-27-2002
Post 16 of 17

Re: Build for multiple Autocad versions

06-15-2005 02:07 PM in reply to: ChrisArps
I too am trying to build for 2 versions, vanilla ACAD 2005 & 2006. I am also learning vb.net. I tried the batch trick you described below but it didn't work. regasm told me that all registers and unregisters were successfull. I am still getting errors for ALL of my Imports such as this:

Namespace or type 'ApplicationServices' for the Imports 'Autodesk.AutoCAD.ApplicationServices' cannot be found.

Anybody know what I am doing wrong? I have correctly referenced the right AutoCAD DLL's.
Valued Contributor
50 Posts
0 Kudos
Registered: ‎07-12-2004
Post 17 of 17

Re: Build for multiple Autocad versions

08-22-2006 07:22 AM in reply to: ChrisArps
CArps, this is a really great work! I will try this too. Message was edited by: cadprog
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!