| | |
| | | using Autodesk.Revit.Attributes; |
| | | using Autodesk.Revit.DB; |
| | | using Autodesk.Revit.UI; |
| | | using HStation.Model; |
| | | using HStation.RevitDev.Model.ModelEnum; |
| | | using HStation.RevitDev.RevitDataExport.Common;
|
| | | using HStation.RevitDev.RevitDataExport.Forms; |
| | | using HStation.RevitDev.RevitDataExport.Utility; |
| | | using System; |
| | | using System.Diagnostics; |
| | | using System.IO; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace HStation.RevitDev.RevitDataExport |
| | | { |
| | | /// <summary>
|
| | | /// 系统分类
|
| | | /// </summary>
|
| | | [Transaction(TransactionMode.Manual)] |
| | | public class Export : IExternalCommand |
| | | public class SystemSelect : IExternalCommand
|
| | | { |
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) |
| | | { |
| | | var form = new Form_SystemSelect(commandData); |
| | | //var revitHandle = Autodesk.Windows.ComponentManager.ApplicationWindow; |
| | | |
| | | //实例WPF窗体 |
| | | var revitHandle = Process.GetCurrentProcess().MainWindowHandle; |
| | | form.Show(new WindowHandle(revitHandle)); |
| | | return Result.Succeeded;
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 族库管理
|
| | | /// </summary>
|
| | | [Transaction(TransactionMode.Manual)]
|
| | | public class FamilyManager : IExternalCommand
|
| | | {
|
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
|
| | | {
|
| | | var form = new Form_FamilyManager(commandData);
|
| | | var revitHandle = Process.GetCurrentProcess().MainWindowHandle;
|
| | | form.Show(new WindowHandle(revitHandle));
|
| | | return Result.Succeeded;
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 构件导入
|
| | | /// </summary>
|
| | | [Transaction(TransactionMode.Manual)]
|
| | | public class AutoClassified : IExternalCommand
|
| | | {
|
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
|
| | | {
|
| | | DocumentUtil.RegistViewEvent(commandData);
|
| | | DocumentUtil.RegistDocumentEvent(commandData);
|
| | | DockablePaneUtils.ShowInstancePanel(commandData);
|
| | | GlobalResource.InstancePanel.UpdateForm();
|
| | | return Result.Succeeded; |
| | | } |
| | | }
|
| | |
| | | { |
| | | var doc = commandData.Application.ActiveUIDocument.Document; |
| | | CacheUtil.HideOrShowModels(commandData.Application.ActiveUIDocument.Document); |
| | | return Result.Succeeded;
|
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 系统检查
|
| | | /// </summary>
|
| | | [Transaction(TransactionMode.Manual)]
|
| | | public class SystemCheck : IExternalCommand
|
| | | {
|
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
|
| | | {
|
| | | var doc = commandData.Application.ActiveUIDocument.Document;
|
| | | SystemCheckUtils.SystemCheck(commandData);
|
| | | return Result.Succeeded; |
| | | } |
| | | } |
| | |
| | | RevitType m_type = RevitType.RFT_Pump; |
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) |
| | | { |
| | | DocumentUtil.RegistDocumentEvent(commandData.Application.Application); |
| | | DocumentUtil.RegistDocumentEvent(commandData);
|
| | | DockablePaneUtils.ShowDockablePanel(commandData, m_type); |
| | | return Result.Succeeded; |
| | | } |
| | |
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) |
| | | { |
| | | Common.GlobalResource.CurrentAddinId = commandData.Application.ActiveAddInId; |
| | | DocumentUtil.RegistDocumentEvent(commandData.Application.Application); |
| | | DocumentUtil.RegistDocumentEvent(commandData);
|
| | | DockablePaneUtils.ShowDockablePanel(commandData, m_type); |
| | | return Result.Succeeded; |
| | | } |
| | |
| | | RevitType m_type = RevitType.RFT_Valve; |
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) |
| | | { |
| | | DocumentUtil.RegistDocumentEvent(commandData.Application.Application); |
| | | DocumentUtil.RegistDocumentEvent(commandData);
|
| | | DockablePaneUtils.ShowDockablePanel(commandData, m_type); |
| | | return Result.Succeeded; |
| | | } |
| | |
| | | RevitType m_type = RevitType.RFT_HeatExchanger; |
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) |
| | | { |
| | | DocumentUtil.RegistDocumentEvent(commandData.Application.Application); |
| | | DocumentUtil.RegistDocumentEvent(commandData);
|
| | | DockablePaneUtils.ShowDockablePanel(commandData, m_type); |
| | | return Result.Succeeded; |
| | | } |
| | |
| | | RevitType m_type = RevitType.RFT_Blocker; |
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) |
| | | { |
| | | DocumentUtil.RegistDocumentEvent(commandData.Application.Application); |
| | | DocumentUtil.RegistDocumentEvent(commandData);
|
| | | DockablePaneUtils.ShowDockablePanel(commandData, m_type); |
| | | return Result.Succeeded; |
| | | } |
| | |
| | | RevitType m_type = RevitType.RFT_Shower; |
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) |
| | | { |
| | | DocumentUtil.RegistDocumentEvent(commandData.Application.Application); |
| | | DocumentUtil.RegistDocumentEvent(commandData);
|
| | | DockablePaneUtils.ShowDockablePanel(commandData, m_type); |
| | | return Result.Succeeded; |
| | | } |
| | |
| | | RevitType m_type = RevitType.RFT_ThreeJoint; |
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) |
| | | { |
| | | DocumentUtil.RegistDocumentEvent(commandData.Application.Application); |
| | | DocumentUtil.RegistDocumentEvent(commandData);
|
| | | DockablePaneUtils.ShowDockablePanel(commandData, m_type); |
| | | return Result.Succeeded; |
| | | } |
| | |
| | | RevitType m_type = RevitType.RFT_FourJoint; |
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) |
| | | { |
| | | DocumentUtil.RegistDocumentEvent(commandData.Application.Application); |
| | | DocumentUtil.RegistDocumentEvent(commandData);
|
| | | DockablePaneUtils.ShowDockablePanel(commandData, m_type); |
| | | return Result.Succeeded; |
| | | } |
| | |
| | | RevitType m_type = RevitType.RFT_WaterMeter; |
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) |
| | | { |
| | | DocumentUtil.RegistDocumentEvent(commandData.Application.Application); |
| | | DocumentUtil.RegistDocumentEvent(commandData);
|
| | | DockablePaneUtils.ShowDockablePanel(commandData, m_type); |
| | | return Result.Succeeded; |
| | | } |
| | |
| | | RevitType m_type = RevitType.RFT_WaterPool; |
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) |
| | | { |
| | | DocumentUtil.RegistDocumentEvent(commandData.Application.Application); |
| | | DocumentUtil.RegistDocumentEvent(commandData);
|
| | | DockablePaneUtils.ShowDockablePanel(commandData, m_type); |
| | | return Result.Succeeded; |
| | | } |
| | |
| | | RevitType m_type = RevitType.RFT_WaterBox; |
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) |
| | | { |
| | | DocumentUtil.RegistDocumentEvent(commandData.Application.Application); |
| | | DocumentUtil.RegistDocumentEvent(commandData);
|
| | | DockablePaneUtils.ShowDockablePanel(commandData, m_type); |
| | | return Result.Succeeded; |
| | | } |
| | |
| | | RevitType m_type = RevitType.RFT_Elbow; |
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) |
| | | { |
| | | DocumentUtil.RegistDocumentEvent(commandData.Application.Application); |
| | | DocumentUtil.RegistDocumentEvent(commandData);
|
| | | DockablePaneUtils.ShowDockablePanel(commandData, m_type); |
| | | return Result.Succeeded; |
| | | } |
| | |
| | | RevitType m_type = RevitType.RFT_FireHydrant; |
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) |
| | | { |
| | | DocumentUtil.RegistDocumentEvent(commandData.Application.Application); |
| | | DocumentUtil.RegistDocumentEvent(commandData);
|
| | | DockablePaneUtils.ShowDockablePanel(commandData, m_type); |
| | | return Result.Succeeded; |
| | | } |
| | |
| | | [Transaction(TransactionMode.Manual)] |
| | | public class ReducingSystem : IExternalCommand |
| | | { |
| | | RevitType m_type = RevitType.RFT_Reducing; |
| | | RevitType m_type = RevitType.RFT_Converter;
|
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) |
| | | { |
| | | DocumentUtil.RegistDocumentEvent(commandData.Application.Application); |
| | | DocumentUtil.RegistDocumentEvent(commandData);
|
| | | DockablePaneUtils.ShowDockablePanel(commandData, m_type); |
| | | return Result.Succeeded; |
| | | } |