cad2014中netload dll时弹出windows
The pop windows when netload dll in cad2014
当我在CAD2014中加载一个dll文件时,它总是弹出一个window让我确认。我想在没有提示的情况下网络加载一个 dll 文件 window。怎么做?请评论帮助me.It 太棒了,如果有人能给我一个例子。
我在网上搜索过,没有用。
如果有人能解决我的问题,我将不胜感激。
我找到了一个为 CAD 添加信任路径的解决方案:
public void gettrust()
{
string str_TR = (string)Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("TRUSTEDPATHS");
string C_Paths = str_TR.ToLower();
List<string> Old_Path_Ary = new List<string>();
Old_Path_Ary = new List<string>(C_Paths.Split(new char[] { ';' }));
String curfile = System.Reflection.Assembly.GetExecutingAssembly().Location;
String curDirectory = System.IO.Path.GetDirectoryName(curfile); //the directory need to add.
if (!Old_Path_Ary.Contains(curDirectory))
{
Old_Path_Ary.Add(curDirectory);
}
Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("TRUSTEDPATHS", string.Join(";", Old_Path_Ary.ToArray()));
}
当我在CAD2014中加载一个dll文件时,它总是弹出一个window让我确认。我想在没有提示的情况下网络加载一个 dll 文件 window。怎么做?请评论帮助me.It 太棒了,如果有人能给我一个例子。
我在网上搜索过,没有用。
如果有人能解决我的问题,我将不胜感激。
我找到了一个为 CAD 添加信任路径的解决方案:
public void gettrust()
{
string str_TR = (string)Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("TRUSTEDPATHS");
string C_Paths = str_TR.ToLower();
List<string> Old_Path_Ary = new List<string>();
Old_Path_Ary = new List<string>(C_Paths.Split(new char[] { ';' }));
String curfile = System.Reflection.Assembly.GetExecutingAssembly().Location;
String curDirectory = System.IO.Path.GetDirectoryName(curfile); //the directory need to add.
if (!Old_Path_Ary.Contains(curDirectory))
{
Old_Path_Ary.Add(curDirectory);
}
Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("TRUSTEDPATHS", string.Join(";", Old_Path_Ary.ToArray()));
}