TheSwamp

Code Red => .NET => Topic started by: TR on August 10, 2006, 05:17:57 PM

Title: Favor Request (test assembly):
Post by: TR on August 10, 2006, 05:17:57 PM
I'm looking for people with AutoCAD 2005, 2006 or 2007 and .NET 2.0 installed to test the PyAcadDotNet.dll in the attached zip file. To run netload PyAcadDotNet.dll into AutoCAD and issue "pyfile" at the command line. Once the Open File Dialog box is displayed select the test2.py file and click ok.

If anyone is so kind as to test this for me please reply with:

1) what was displayed to the commandline after running the .py file.
2) what version of AutoCAD you're using.
Title: Re: Favor Request (test assembly):
Post by: Kerry on August 10, 2006, 05:56:43 PM
Ac2007:
Command: netload
Command: pyfile
Unknown command "PYFILE".  Press F1 for help.


ac2006

Command: netload
Cannot load assembly. Error details: System.IO.FileNotFoundException: Could not
load file or assembly 'acdbmgd, Version=16.1.84.0, Culture=neutral,
PublicKeyToken=7208edf2a10162b1' or one of its dependencies. The system cannot
find the file specified.
File name: 'acdbmgd, Version=16.1.84.0, Culture=neutral,
PublicKeyToken=7208edf2a10162b1'
   at System.Reflection.Assembly.GetExportedTypes()
   at Autodesk.AutoCAD.Runtime.ExtensionLoader.ProcessAssembly(Assembly
assembly)
   at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
   at loadmgd()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure
logging.
To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].

Command: pyfile
Unknown command "PYFILE".  Press F1 for help.


Didn't bother with ac2005 ..
Title: Re: Favor Request (test assembly):
Post by: Jeff_M on August 10, 2006, 06:50:04 PM
AC2007, ditto Kerry's results.
Don't have 2006 running at the moment.
Title: Re: Favor Request (test assembly):
Post by: MickD on August 10, 2006, 07:50:26 PM
Sorry Tim, don't have .net 2.0.
Title: Re: Favor Request (test assembly):
Post by: TR on August 11, 2006, 08:25:30 AM
That confirms what I though but didn't want to hear. I was hoping that I could write .NET dll's against 2005 and have them run in later versions of AutoCAD.
Title: Re: Favor Request (test assembly):
Post by: TR on August 11, 2006, 08:42:00 AM
Since I failed miserably with my previous attempt would anyone be willing to attempt to build this against their AutoCAD version? It's a SharpDevelop2 project but I believe the sln is compatible with vs2003.

The only items you have to change are the references to acmgd and acdbmgd and possibly "CommandLinePrompts.Message" on lines 159 and 171 in pyacaddotnet.cs.

Please forgive the horrid looking code. This is something I'm working on from time to time and to be honest with you I'm not very good at C#.