API判断本机安装的Revit版本信息
start
url:http://greatverve.cnblogs.com/p/RevitAddInUtility.html
[Transaction(TransactionMode.Manual)]
[Regeneration(RegenerationOption.Manual)]
public class cmdRevitVersion : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
UIDocument uiDoc = commandData.Application.ActiveUIDocument;
Autodesk.Revit.ApplicationServices.Application app = commandData.Application.Application;
Selection sel = uiDoc.Selection;
Transaction ts = new Transaction(uiDoc.Document, "http://revit.5d6d.com");
ts.Start();
string strInfo = "";
foreach (RevitProduct revitPro in RevitProductUtility.GetAllInstalledRevitProducts())
{
strInfo += revitPro.Name + "," + revitPro.InstallLocation + "\n";
}
ts.Commit();
WinFormTools.MsgBox(strInfo);
return Result.Succeeded;
}
}
[Regeneration(RegenerationOption.Manual)]
public class cmdRevitVersion : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
UIDocument uiDoc = commandData.Application.ActiveUIDocument;
Autodesk.Revit.ApplicationServices.Application app = commandData.Application.Application;
Selection sel = uiDoc.Selection;
Transaction ts = new Transaction(uiDoc.Document, "http://revit.5d6d.com");
ts.Start();
string strInfo = "";
foreach (RevitProduct revitPro in RevitProductUtility.GetAllInstalledRevitProducts())
{
strInfo += revitPro.Name + "," + revitPro.InstallLocation + "\n";
}
ts.Commit();
WinFormTools.MsgBox(strInfo);
return Result.Succeeded;
}
}
我这个博客废弃不用了,今天想寻找外链的时候,突然想到这个博客权重很高。
有需要免费外链的,留言即可,我准备把这个博客变成免费的友情链接站点。