[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;
}
}