在 accoreconsole.exe 中加载自定义 .net dll
Load custom .net dll inside accoreconsole.exe
我正在尝试使用 netload 命令在 accoreconsole.exe (AutoCAD 2016) 中加载我的自定义 .net dll,但它无法加载 dll。
下面是 accoreconsole.exe 的输出:
Redirect stdout (file: C:\Users\amitp\AppData\Local\Temp\accc37242).
AutoCAD Core Engine Console - Copyright Autodesk, Inc 2009-2013.
Usage:
AcCoreConsole.exe [/i <input dwg>] /s <script>[/product <product>] [/l <language
>] [/isolate <userid> <userDataFolder>] [/readonly] [/p[rofile] <profile>]
Example:
AcCoreConsole.exe /i 8th_floor.dwg /s test.scr /l en-US
Regenerating model.
**** System Variable Changed ****
1 of the monitored system variables has changed from the preferred value. Use SY
1 of the monitored system variables has changed from the preferred value. Use SY
SVARMONITOR command to view changes.
Command:
Command:
Command:
Command: netload
Command: netload
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
dDwgReaderTest\DwgTextExtracter\bin\Debug\DwgTextExtracter.dll"
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoc
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
dDwgReaderTest\DwgTextExtracter\bin\Debug\DwgTextExtracter.dll"
Unable to load C:\Users\amitp\Documents\Visual Studio 2012\Projects\AutocadDwgRe
Unable to load C:\Users\amitp\Documents\Visual Studio 2012\Projects\AutocadDwgRe
Unable to load C:\Users\amitp\Documents\Visual Studio 2012\Projects\AutocadDwgRe
Unable to load C:\Users\amitp\Documents\Visual Studio 2012\Projects\AutocadDwgRe
Unable to load C:\Users\amitp\Documents\Visual Studio 2012\Projects\AutocadDwgRe
aderTest\DwgTextExtracter\bin\Debug\DwgTextExtracter.dll assembly.
Command:
在加载 dll 之前我还需要做些什么吗?
注意:此 dll 未签名。
谢谢
检查 2 件事:
- 确保您仅使用 AcCoreMgd.dll 和 AcDbMgd.dll 引用
- 将 DLL 放在受信任的位置,例如 AutoCAD (acad.exe) 文件夹或 Program Files 文件夹下。
这不回答未加载(Augusto 回答)...您看到的奇怪输出是由于核心控制台在 v2015 中引入的错误。 http://forums.autodesk.com/t5/net/accoreconsole-exe-in-2015-doesn-t-do-system-console-writeline/m-p/5539352#M43603
讨论了原因和解决方法
I found an easier workaround, in the console window that opens, click
the top-left icon of the window => "Defaults"=> , Layout tab, set the
screen buffer size width and windows size widths to something silly
like 150, it still does the telex-machine thing but at least it
doesn't repeat itself.
注意 - Autodesk 非常喜欢断开指向他们的东西的链接,所以 post 在这里发表评论,我会打破它,我会修复它。
我正在尝试使用 netload 命令在 accoreconsole.exe (AutoCAD 2016) 中加载我的自定义 .net dll,但它无法加载 dll。
下面是 accoreconsole.exe 的输出:
Redirect stdout (file: C:\Users\amitp\AppData\Local\Temp\accc37242).
AutoCAD Core Engine Console - Copyright Autodesk, Inc 2009-2013.
Usage:
AcCoreConsole.exe [/i <input dwg>] /s <script>[/product <product>] [/l <language
>] [/isolate <userid> <userDataFolder>] [/readonly] [/p[rofile] <profile>]
Example:
AcCoreConsole.exe /i 8th_floor.dwg /s test.scr /l en-US
Regenerating model.
**** System Variable Changed ****
1 of the monitored system variables has changed from the preferred value. Use SY
1 of the monitored system variables has changed from the preferred value. Use SY
SVARMONITOR command to view changes.
Command:
Command:
Command:
Command: netload
Command: netload
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
dDwgReaderTest\DwgTextExtracter\bin\Debug\DwgTextExtracter.dll"
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoc
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
Assembly file name: "C:\Users\amitp\Documents\Visual Studio 2012\Projects\Autoca
dDwgReaderTest\DwgTextExtracter\bin\Debug\DwgTextExtracter.dll"
Unable to load C:\Users\amitp\Documents\Visual Studio 2012\Projects\AutocadDwgRe
Unable to load C:\Users\amitp\Documents\Visual Studio 2012\Projects\AutocadDwgRe
Unable to load C:\Users\amitp\Documents\Visual Studio 2012\Projects\AutocadDwgRe
Unable to load C:\Users\amitp\Documents\Visual Studio 2012\Projects\AutocadDwgRe
Unable to load C:\Users\amitp\Documents\Visual Studio 2012\Projects\AutocadDwgRe
aderTest\DwgTextExtracter\bin\Debug\DwgTextExtracter.dll assembly.
Command:
在加载 dll 之前我还需要做些什么吗?
注意:此 dll 未签名。
谢谢
检查 2 件事:
- 确保您仅使用 AcCoreMgd.dll 和 AcDbMgd.dll 引用
- 将 DLL 放在受信任的位置,例如 AutoCAD (acad.exe) 文件夹或 Program Files 文件夹下。
这不回答未加载(Augusto 回答)...您看到的奇怪输出是由于核心控制台在 v2015 中引入的错误。 http://forums.autodesk.com/t5/net/accoreconsole-exe-in-2015-doesn-t-do-system-console-writeline/m-p/5539352#M43603
讨论了原因和解决方法I found an easier workaround, in the console window that opens, click the top-left icon of the window => "Defaults"=> , Layout tab, set the screen buffer size width and windows size widths to something silly like 150, it still does the telex-machine thing but at least it doesn't repeat itself.
注意 - Autodesk 非常喜欢断开指向他们的东西的链接,所以 post 在这里发表评论,我会打破它,我会修复它。