mengxiangge 6 年之前
父節點
當前提交
c171548947
共有 4 個文件被更改,包括 121 次插入9 次删除
  1. 67 0
      MBI/Menu/MBITool.xml
  2. 6 4
      MBI/SAGA.GplotDrawData/Common/WebGplotSettings.cs
  3. 17 1
      MBI/SAGA.MBI/Common/MBIConst.cs
  4. 31 4
      MBI/SAGA.MBI/TestCommand.cs

+ 67 - 0
MBI/Menu/MBITool.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Menus>
+  <App>
+    <AppIndex>1</AppIndex>
+    <AppName>SAGA</AppName>
+  </App>
+  <Tab TabName="工具">
+    <MenuTab>MBITool_W</MenuTab>
+    <Modules>MBITool</Modules>
+  </Tab>
+  <Panel PanelName="工具" GroupFlag="True" GroupImage="" RevitVer="R14,R15,R16,R17"  ButtonStyles="Large">
+    
+    <Button ButtonStyles="Large">
+      <ButtonName>SAGA.MBI.ExportEquipNotInSpaceCommand</ButtonName>
+      <ButtonText>没有在空间的设备</ButtonText>
+      <ImageName>1、打开楼层模型</ImageName>
+      <DllName>..\OutputDll\SAGA.MBI.exe</DllName>
+      <ClassName>SAGA.MBI.ExportEquipNotInSpaceCommand</ClassName>
+      <ToolTip>导出没有在空间的设备。</ToolTip>
+      <LongDescription>导出没有在空间的设备。</LongDescription>
+      <ToolTipImage></ToolTipImage>
+      <MenuTab>MBITool_W</MenuTab>
+      <Modules>MBITool</Modules>
+    </Button>
+
+    <Button ButtonStyles="Large">
+      <ButtonName>SAGA.MBI.CheckCloudAndLocalFamilyCommand</ButtonName>
+      <ButtonText>同步族类型</ButtonText>
+      <ImageName>1、打开楼层模型</ImageName>
+      <DllName>..\OutputDll\SAGA.MBI.exe</DllName>
+      <ClassName>SAGA.MBI.CheckCloudAndLocalFamilyCommand</ClassName>
+      <ToolTip>处理云平台和物理世界族类型不同步的问题。</ToolTip>
+      <LongDescription>处理云平台和物理世界族类型不同步的问题。</LongDescription>
+      <ToolTipImage></ToolTipImage>
+      <MenuTab>MBITool_W</MenuTab>
+      <Modules>MBITool</Modules>
+    </Button>
+
+    <Button ButtonStyles="Large">
+      <ButtonName>SAGA.MBI.CheckEquipinFloorCommand</ButtonName>
+      <ButtonText>更新设备所在楼层关系</ButtonText>
+      <ImageName>1、打开楼层模型</ImageName>
+      <DllName>..\OutputDll\SAGA.MBI.exe</DllName>
+      <ClassName>SAGA.MBI.CheckEquipinFloorCommand</ClassName>
+      <ToolTip>更新设备所在楼层关系。</ToolTip>
+      <LongDescription>更新设备所在楼层关系。</LongDescription>
+      <ToolTipImage></ToolTipImage>
+      <MenuTab>MBITool_W</MenuTab>
+      <Modules>MBITool</Modules>
+    </Button>
+     <Button ButtonStyles="Large">
+      <ButtonName>SAGA.MBI.UpdatePipeSystemCommand</ButtonName>
+      <ButtonText>连接未连接点</ButtonText>
+      <ImageName>1、打开楼层模型</ImageName>
+      <DllName>..\OutputDll\SAGA.MBI.exe</DllName>
+      <ClassName>SAGA.MBI.UpdatePipeSystemCommand</ClassName>
+      <ToolTip>连接未连接点。</ToolTip>
+      <LongDescription>连接未连接点。</LongDescription>
+      <ToolTipImage></ToolTipImage>
+      <MenuTab>MBITool_W</MenuTab>
+      <Modules>MBITool</Modules>
+    </Button>
+
+  </Panel>
+</Menus>
+<!--名称里面换行-->
+<!-- <ButtonText>扫楼App&#x000A;用户管理</ButtonText>-->

+ 6 - 4
MBI/SAGA.GplotDrawData/Common/WebGplotSettings.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using SAGA.MBI.Common;
 
 namespace SAGA.GplotDrawData
 {
@@ -10,10 +11,11 @@ namespace SAGA.GplotDrawData
     {
         static WebGplotSettings()
         {
-            GplotUrl = "http://172.16.2.189:8091/#/gplot";
-            MindMapUrl = "http://172.16.2.189:8091/#/mindMap";
-            VPipeUrl = "http://172.16.2.189:8091/#/conduitGraphy";
-            VSpaceUrl = "http://172.16.2.189:8091/#/spaceGraphy";
+            GplotUrl =MBIConst.GplotViewHost+"gplot";
+            MindMapUrl =MBIConst.GplotViewHost+"mindMap";
+            VPipeUrl=MBIConst.GplotViewHost+"conduitGraphy";
+            VSpaceUrl = MBIConst.GplotViewHost+"spaceGraphy";
+            
         }
         /// <summary>
         /// 拓扑图地址

+ 17 - 1
MBI/SAGA.MBI/Common/MBIConst.cs

@@ -141,7 +141,23 @@ namespace SAGA.MBI.Common
                 return url;
             }
         }
-
+        /// <summary>
+        /// 拓扑视图地址
+        /// </summary>
+        public static string GplotViewHost
+        {
+            get
+            {
+                string key = nameof(GplotViewHost);
+                string url = ProjectDirOperate.GetConfigureInfo(key);
+                if (url.IsNullOrEmpty())
+                {
+                    url = "http://172.16.0.181:8888/#/";
+                    ProjectDirOperate.SaveConfigureInfo(key, url);
+                }
+                return url;
+            }
+        }
         public static readonly string ProjectManageSecret = "A123456";
         public static readonly string ProjectSecret = MBIControl.ProjectCur.Password;
 

+ 31 - 4
MBI/SAGA.MBI/TestCommand.cs

@@ -20,6 +20,7 @@ using SAGA.MBI.WinView.Login;
 using SAGA.MBI.WinView.Upload;
 using SAGA.RevitUtils;
 using SAGA.RevitUtils.Extends;
+using SAGA.RevitUtils.MEP;
 using WPfPointInfo;
 
 namespace SAGA.MBI
@@ -92,13 +93,39 @@ namespace SAGA.MBI
             try
             {
 
-                var pickElements=ExternalDataWrapper.Current.UiApp.PickElements("请选择水管", new PipeFilter());
-                if (pickElements == null)
+                var pickElement=ExternalDataWrapper.Current.UiApp.PickElement("请选择水管", new PipeFilter());
+
+
+
+                if (pickElement == null)
                 {
                        return Result.Succeeded;
                 }
-                var pipes = pickElements.OfType<Pipe>();
-                
+
+                using (Transaction tran = new Transaction(ExternalDataWrapper.Current.Doc,"连接"))
+                 
+                {
+                    try
+                    {
+                        tran.Start();
+                        var equioment = ExternalDataWrapper.Current.UiApp.PickElement("选择设备");
+                        var pipeConnector = pickElement.GetConnectors(Domain.DomainPiping).FirstOrDefault(c => !c.IsConnected);
+                        var equipmentConnector = equioment.GetConnectors(Domain.DomainPiping).FirstOrDefault(c => !c.IsConnected);
+
+                        if (pipeConnector != null && equipmentConnector != null)
+                        {
+                            pipeConnector.ConnectTo(equipmentConnector);
+                        }
+                        tran.Commit();
+                    }
+                    catch (Exception ex)
+                    {
+                        MessageShow.Show(ex);
+                        tran.RollBack();
+                    }
+                }
+               
+
 
 
             }