| | |
| | | using Autodesk.Revit.DB; |
| | | using Autodesk.Revit.UI; |
| | | using HStation.RevitDev.RevitDataExport.Forms; |
| | | using Spire.AI.Api; |
| | | using System; |
| | | using System.Diagnostics; |
| | | using System.Drawing.Drawing2D; |
| | | using System.Windows.Controls; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace HStation.RevitDev.RevitDataExport |
| | |
| | | var revitHandle = Process.GetCurrentProcess().MainWindowHandle; |
| | | form.Show(new WindowHandle(revitHandle)); |
| | | |
| | | //测试代码 |
| | | UIApplication uiapp = commandData.Application; |
| | | Guid guid = new Guid(Common.GlobalResource.Guid_FamilyPanel); |
| | | DockablePaneId paneId = new DockablePaneId(guid); |
| | | DockablePane pane = uiapp.GetDockablePane(paneId); |
| | | pane.Hide(); |
| | | |
| | | return Result.Succeeded; |
| | | } |
| | | } |
| | | |
| | | [Transaction(TransactionMode.Manual)] |
| | | public class PumpSystemAnalysis : IExternalCommand |
| | | { |
| | | public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) |
| | | { |
| | | TaskDialog.Show("提示","泵系统分析命令调用成功!"); |
| | | UIApplication uiapp = commandData.Application; |
| | | Wpf_FamilyPanel page = new Wpf_FamilyPanel(); |
| | | Guid guid = Guid.Empty; |
| | | guid = new Guid(Common.GlobalResource.Guid_FamilyPanel); |
| | | DockablePaneId paneId = new DockablePaneId(guid); |
| | | DockablePane pane = uiapp.GetDockablePane(paneId); |
| | | pane.Show(); |
| | | return Result.Succeeded; |
| | | } |
| | | } |
| | | |
| | | |
| | | public class WindowHandle : IWin32Window |
| | | { |
| | | private IntPtr _handle; |