在用VS2008开发AutoCAD2008 的过程中,程序写好了但加载太麻烦,经过研究给出以下两个方案:
   1、修改ACAD2008.LSP文件,加入以下内容:
    (setvar "filedia" 0)
    (command "netload" "SmartSoft.ACADTools.dll")
    (setvar "filedia" 1)
   实现ACAD启动时自动加载,但必须设置加载程序的搜索路径,以使ACAD在启动时能找到并加载。
   2、通过修改注册表加载:建立以下键值  [HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AutoCAD\R17.1\ACAD-6001:804\Applications\SmartSoft],“SmartSoft”是你自己的键值,在此键值下建立你自己的项:
   "DESCRIPTION"="SmartSoft ACADTools"--程序描述
   "LOADER"="E:\\SmartSoft\\SmartSoft.Application\\Release\\bin\\SmartSoft.ACADTools.dll"--要加载的DLL程序
   "LOADCTRLS"=dword:00000002
   "MANAGED"=dword:00000001
   在你刚才建立的键下建立一个新的键:Commands,在此键下建立你的命令项:命令名=命名空间.类.方法,如("SmExplorer"="SmartSoft.ACADTools.Workbench.SmExplorer"
   下面给出一个完整的注册表导出内容:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AutoCAD\R17.1\ACAD-6001:804\Applications\SmartSoft]
"DESCRIPTION"="SmartSoft ACADTools"
"LOADER"="E:\\SmartSoft\\SmartSoft.Application\\Release\\bin\\SmartSoft.ACADTools.dll"
"LOADCTRLS"=dword:00000002
"MANAGED"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AutoCAD\R17.1\ACAD-6001:804\Applications\SmartSoft\commands]
"SmExplorer"="SmartSoft.ACADTools.Workbench.SmExplorer"

源文: http://discussion.autodesk.com/thread.jspa?messageID=4531456

相关文章:

  • 2022-01-14
  • 2021-10-24
  • 2021-04-08
  • 2021-12-31
  • 2021-11-30
  • 2021-05-17
  • 2021-05-23
猜你喜欢
  • 2022-12-23
  • 2021-08-23
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-06-10
相关资源
相似解决方案