|
@@ -16,42 +16,42 @@ using Autodesk.Revit.UI;
|
|
|
|
|
|
namespace RevitToJBim
|
|
namespace RevitToJBim
|
|
{
|
|
{
|
|
- /// <summary>
|
|
|
|
- /// 提取数据
|
|
|
|
- /// </summary>
|
|
|
|
- [Transaction(TransactionMode.Manual)]
|
|
|
|
- [Regeneration(RegenerationOption.Manual)]
|
|
|
|
- public class MbiExportCommand : IExternalCommand, IExternalCommandAvailability
|
|
|
|
- {
|
|
|
|
|
|
+ ///// <summary>
|
|
|
|
+ ///// 提取数据
|
|
|
|
+ ///// </summary>
|
|
|
|
+ //[Transaction(TransactionMode.Manual)]
|
|
|
|
+ //[Regeneration(RegenerationOption.Manual)]
|
|
|
|
+ //public class MbiExportCommand : IExternalCommand, IExternalCommandAvailability
|
|
|
|
+ //{
|
|
|
|
|
|
- public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
|
|
|
|
- {
|
|
|
|
- try
|
|
|
|
- {
|
|
|
|
- var document = commandData.Application.ActiveUIDocument.Document;
|
|
|
|
- MbiExport.Export(document);
|
|
|
|
- TaskDialog dialog = new TaskDialog("导出");
|
|
|
|
- dialog.MainInstruction = "导出成功";
|
|
|
|
- dialog.Show();
|
|
|
|
- }
|
|
|
|
- catch (Exception e)
|
|
|
|
- {
|
|
|
|
- TaskDialog dialog = new TaskDialog("导出");
|
|
|
|
- dialog.MainInstruction = e.Message + "\n\t" + e.StackTrace.ToString();
|
|
|
|
- dialog.Show();
|
|
|
|
- return Result.Cancelled;
|
|
|
|
- }
|
|
|
|
- return Result.Succeeded;
|
|
|
|
- }
|
|
|
|
|
|
+ // public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
|
|
|
|
+ // {
|
|
|
|
+ // try
|
|
|
|
+ // {
|
|
|
|
+ // var document = commandData.Application.ActiveUIDocument.Document;
|
|
|
|
+ // MbiExport.Export(document);
|
|
|
|
+ // TaskDialog dialog = new TaskDialog("导出");
|
|
|
|
+ // dialog.MainInstruction = "导出成功";
|
|
|
|
+ // dialog.Show();
|
|
|
|
+ // }
|
|
|
|
+ // catch (Exception e)
|
|
|
|
+ // {
|
|
|
|
+ // TaskDialog dialog = new TaskDialog("导出");
|
|
|
|
+ // dialog.MainInstruction = e.Message + "\n\t" + e.StackTrace.ToString();
|
|
|
|
+ // dialog.Show();
|
|
|
|
+ // return Result.Cancelled;
|
|
|
|
+ // }
|
|
|
|
+ // return Result.Succeeded;
|
|
|
|
+ // }
|
|
|
|
|
|
|
|
|
|
- /// <summary>
|
|
|
|
- /// Onlys show the dialog when a document is open, as Dockable dialogs are only available
|
|
|
|
- /// when a document is open.
|
|
|
|
- /// </summary>
|
|
|
|
- public bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories)
|
|
|
|
- {
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ // /// <summary>
|
|
|
|
+ // /// Onlys show the dialog when a document is open, as Dockable dialogs are only available
|
|
|
|
+ // /// when a document is open.
|
|
|
|
+ // /// </summary>
|
|
|
|
+ // public bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories)
|
|
|
|
+ // {
|
|
|
|
+ // return false;
|
|
|
|
+ // }
|
|
|
|
+ //}
|
|
}
|
|
}
|