参考 dwg 文件报错:cannot find a dll or other file that it needs


参考dwg文件失败,且出现了下面的报错:

cannot find a dll or other file that it needs

查看报错的log文件,发现是程序加载了“c:\program files\autodesk\civil 3d 2025 object enabler\”  这个路径下的很多 DLL 文件,导致参考 dwg 文件失败。

之所以会加载这些 DLL,原因是安装 Civil 3D 的时候把这个文件夹的路径写入到了Windows 环境变量 Path 里(Path=c:\program files\autodesk\civil 3d 2025 object enabler\),而 ORD 配置变量 MS_LIBRARY_PATH 会引用环境变量 Path 中的值。

解决方法:

找到这个文件夹(c:\program files\autodesk\civil 3d 2025 object enabler\),在文件夹名称后加“_”以重命名文件夹。

请注意重命名 object enabler 文件夹并不会影响 Civil 3D 的使用。见 Autodesk Civil 3D Help | Using the Autodesk Civil 3D Object Enabler | Autodesk 。