- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi experts,
I developed a .net plugin that works fine both interactively any via a .scr file in a 32 bit environment. It was build in Win7 X64 environment with VS2008 and .net 3.5. But it fails to load the command when run from a script in my x64 environment.
I then built a sample project using the AutoCAD .net Wizard and get the same results using the "mycommand" and "MySessionCmd". It runs the script and commands correctly from VS debug mode with both dlls.
From my searching it appears multiple threads are involved or its a .net 3.5 issue. First error I recieved after reinstalling 2011 was the thread issue that was resolved by adding "CommandFlags:Session"
"Process Explorer" shows the dll loaded twice either interactively or via script run.
See notes below. Any assistance would be much appreciated.
Thanks,
Bob
// Application Session Command with localized name
[
CommandMethod("MyGroup", "MySessionCmd", "MySessionCmdLocal", CommandFlags.Modal | CommandFlags.Session)]
publicvoid MySessionCmd() // This method can have any name
{
String str = "Hello - MySessionCmd";
// Put your command code here
}
script
FILEDIA 0
PICKADD 1
PICKAUTO 0
CMDDIA 0
netload C:\Work\PDF_Batch\PDF_Creator\bin\Debug\PDF_Creator.dll
MySessionCmd delay FILEDIA 1 _QUIT N
C:\Progra~1\Autodesk\ACADM2~1\acad.exe /b "C:\Work\myprg\135788-0-23.scr"
Console Output
Loading Mechanical modules.....
Loading Modeler DLLs.
Loader application completed Regenerating model.
AutoCAD menu utilities loaded. Command: FILEDIA
Enter new value for FILEDIA <0>: 0 Enter BACKSPACE to interrupt script.
Command: PICKADD
Enter new value for PICKADD <1>: 1
Command: PICKAUTO
Enter new value for PICKAUTO <0>: 0
Command: CMDDIA
Enter new value for CMDDIA <0>: 0
Command: netload Assembly file name: C:\Work\PDF_Batch\PDF_Creator\bin\Debug\PDF_Creator.dll
Command: MySessionCmd Unknown command "MYSESSIONCMD". Press F1 for help.
Solved! Go to Solution.