A method for quickly creating a piping system based on modeling software
By importing CAD drawings in the Revit software and using secondary development plug-ins and databases to match pipeline system attributes, the cumbersome problem of pipeline system creation in the Revit software is solved, and rapid and intelligent pipeline system creation is achieved, adapting to the needs of different construction formats and improving modeling efficiency.
Patent Information
- Application Number
- CN202210802761.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-07
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-07-07
AI Technical Summary
When creating a professional pipeline system for electromechanical and electrical systems in Revit software, the existing technology has problems such as cumbersome operation, repeated labor, and low modeling efficiency. It is impossible to form a general project template file, making it difficult to adapt to the needs of different construction formats.
By importing CAD drawings into Revit, using the secondary development plug-in to read the pipeline system, generate Excel files, use cloud platform or offline database to automatically match the pipeline system attributes, and automatically generate the pipeline system in Revit, label the systems that cannot be matched, manually change the attributes, and complete the creation of the pipeline system.
It realizes the rapid and intelligent creation of pipeline systems in Revit software, improves modeling efficiency, reduces repetitive labor, and adapts to the needs of different construction formats.
Smart Images

Figure CN115130186B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of building information models, and in particular to a method for quickly creating a pipeline system based on modeling software. Background Art
[0002] Revit is one of the BIM modeling software. In the process of creating BIM models of various building disciplines through Revit software, the creation of pipeline systems in mechanical and electrical disciplines often takes a lot of time because of the creation of various contents such as professional classification, naming, abbreviations, materials, line types, colors, etc. of pipeline systems. In the existing mechanical and electrical disciplines, various requirements for naming and classification of various disciplines and pipeline systems under different building formats have been clearly stipulated in standard drawings such as the "HVAC Drawing Standard". In Revit software, for BIM modeling projects, pipeline systems are created in project files every time. In the case of many pipeline systems, the operation is cumbersome, a lot of repetitive work is done, and the modeling efficiency is affected. At the same time, if all pipeline systems of building mechanical and electrical disciplines are placed in the Revit project template file, there will be too many pipeline systems in the file, which requires a lot of modification work; due to the large differences in the requirements for pipeline systems under various building formats, it is impossible to form a general Revit project template file containing various pipeline systems of building mechanical and electrical disciplines.
[0003] Therefore, in order to realize the rapid and intelligent creation of building design piping systems, reduce the repetitive work of front-line designers, and reduce the errors of designers, a new method is proposed for the rapid creation of piping systems, which can improve the efficiency of BIM modeling and provide good support for the application of rapid and intelligent modeling. Summary of the invention
[0004] In view of the above-mentioned shortcomings of the prior art, the first object of the present invention is to provide a method for quickly creating a pipeline system based on modeling software to solve the problems in the above-mentioned background technology.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A method for quickly creating a piping system based on modeling software comprises the following steps:
[0007] S1. Import CAD drawings into Revit, and use the secondary development plug-in to retrieve the piping system in the CAD drawings in Revit;
[0008] S2. Generate an Excel file of piping system abbreviations and piping system names in Revit using secondary development plug-ins;
[0009] S3. Obtain the abbreviation and name of the piping system to be created in Revit software;
[0010] S4, using the secondary development plug-in Revit software to automatically search for the corresponding piping system that needs to be created in S3 in the cloud platform or offline database;
[0011] S5. According to the result of automatic search for a match in S4, a matching piping system is automatically generated in Revit using the data in the cloud platform or the offline database, and the properties of the corresponding piping system are generated;
[0012] S6. Based on the results of automatic search and matching in S4, the secondary development plug-in is used to automatically mark out the piping system whose properties cannot be matched in S5 in Revit;
[0013] S7. Based on the marking results in S6, use the secondary development plug-in in Revit to manually change the piping system that cannot be matched to the piping system attributes, and manually change the piping system that needs to modify the matching data;
[0014] S8. Based on the results in S7, the secondary development plug-in is used to automatically complete the creation of the piping system in the CAD drawing in Revit.
[0015] Preferably, the specific steps in step S1 are:
[0016] S1.1. Manually read the piping system in the CAD drawing;
[0017] S1.2. Write the piping system in the CAD drawing into an Excel spreadsheet file;
[0018] S1.3. Import the Excel spreadsheet file written in S1-2 into Revit using the secondary development plug-in to read the piping system in the CAD drawing.
[0019] Preferably, in the steps S2, S4 and S5, the Revit secondary development platform building includes:
[0020] The tools used include Visual Studio 2017, Revit 2019SDK, AddinManager, and RevitLookup; the RevitAPI implements software function expansion operations through the external command interface. There is only one abstract function Execute in the interface, which is overloaded to implement external commands.
[0021] Preferably, in step S8, creating a pipeline system and its pipeline system property plug-in includes:
[0022] The piping system creation plug-in is a way to extend the function through external commands (ExternalCommand). On the Visual Studio2017 platform, the Revit interface definition files RevitAPI.dll and RevitAPIUI.dll are referenced, and the plug-in development is implemented using the C# language. It is started from within the Revit software through the addin file;
[0023] Create a new class library in Visual Studio 2017, reference the Revit interface definition files RevitAPI.DLL and RevitAPIUI.DLL (the files are in the Revit installation directory), and copy Set the Local (copy to local) property to False; reference the namespace in the program header, create a transaction, and submit a series of operations that modify the Revit model to the document object; set the transaction start mode, create a new command class, derive from IExternalCommand, and overload the Execute() method; compile the main code and write the main functional code for creating the pipeline system mentioned above; create a plug-in button, first add an embedded panel, then call the PushButton class to add a button control, and finally call the Uri class to import the corresponding icon into the button; register and run the extension module, and after the button is made, write the addin file as the internal startup file, and put the addin file in the corresponding revit version folder under the C: / programdata / Autodesk / revit / addin / path so that the button can be imported into the Revit software; write the path of the .dll file generated by the above-mentioned program to create the pipeline system plug-in function, the namespace and class name of the plug-in into the file, open the Revit software to get the "system management" plug-in, and click the button to create the pipeline system and its system properties.
[0024] Preferably, step S4 also includes an offline database, which is a database established by storing pipeline system information data collected offline, and is configured to perform further retrieval and matching when the cloud platform cannot be used for automatic search and matching in step S4 or the corresponding pipeline system cannot be found and matched in the cloud platform.
[0025] By adopting the above technical solution: by matching the pipeline system accordingly, the time for re-modeling can be saved, and the modeling time can be accelerated by matching the past pipeline system.
[0026] Preferably, the attributes of the corresponding pipeline system generated in step S5 include the pipeline system type name, abbreviation, material, line type, line width and color.
[0027] By adopting the above technical solution, the corresponding pipeline system can be quickly matched through step S4, and then the modeling operation can be quickly performed on the properties of the pipeline system.
[0028] Preferably, the specific method of acquiring the offline database data in step S4 is as follows:
[0029] S4.1. Collect the data information of the historical pipeline system offline, classify and sort the collected data information, and then perform similarity matching. After the data information with complete matching similarity is clear, the remaining data information is used to jointly establish an offline database;
[0030] S4.2, after the matching in step S7, the pipeline system that is confirmed to be unsuccessful in matching is transmitted to the offline database after manual modification to improve the database.
[0031] Adopting the above technical solution: the design of the offline database enables the method to be operated offline, avoiding the inability to create the pipeline system due to the inability to connect to the cloud platform.
[0032] Beneficial Effects
[0033] Compared with the known public technology, the technical solution provided by the present invention has the following beneficial effects:
[0034] The present invention is easy to operate. Users only need to use the method for quickly creating a piping system to realize the creation of piping systems in BIM modeling files using Revit software under different building formats, and realize rapid matching of the naming, materials, classification and other contents of various disciplines and piping systems, thereby effectively improving the efficiency of Revit duct connections. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A schematic diagram of a pipeline system process for quickly creating a pipeline system according to the present invention;
[0036] Figure 2 Demonstration of secondary development plug-in for rapid creation of pipeline system of the present invention;
[0037] Figure 3 A demonstration of a completed piping system created for the quick creation of a piping system of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] The present invention will be further described below in conjunction with the embodiments.
[0040] Example
[0041] A method for quickly creating a piping system based on modeling software comprises the following steps:
[0042] S1. Reading of piping systems in CAD drawings: One way is to import CAD drawings into Revit (modeling software), and use secondary development plug-ins to retrieve and read the piping systems in CAD drawings in Revit; another way is to manually read the piping systems in CAD drawings, write the piping systems in CAD drawings into Excel spreadsheet files (spreadsheet files), and then use secondary development plug-ins to import the written Excel spreadsheet files into Revit to read the piping systems in CAD drawings;
[0043] ① Import CAD drawings into Revit and use the secondary development plug-in to retrieve the piping system in the CAD drawings in Revit. The core code is as follows:
[0044]
[0045]
[0046] ② After manually reading the piping system in the CAD drawing, write the piping system in the CAD drawing into an Excel spreadsheet file, and then import the written Excel spreadsheet file into Revit using the secondary development plug-in to read the piping system in the CAD drawing. The core code is as follows:
[0047]
[0048]
[0049] S2. Generate an Excel file of the abbreviation and name of the piping system in Revit using the secondary development plug-in: The Revit API (modeling software application program interface) implements the software function expansion operation through the external command interface. There is only one abstract function Execute in the interface. Overload this function to implement the extended command (IexternalCommand);
[0050]
[0051] The tools used for Revit secondary development plug-ins include Visual Studio 2017, Revit 2019SDK, AddinManager, and Revit Lookup;
[0052] S3. Obtain the abbreviation and name of the piping system to be created in the Revit software: The piping system read from the CAD drawing can be converted into a corresponding table file through the Revit software, which can be output for other purposes by project modelers.
[0053] S4, Revit software uses the cloud platform or offline database to automatically search for matching piping systems: Use the secondary development plug-in Revit software to automatically search for matching piping systems that need to be created in S3 on the cloud platform or offline database;
[0054]
[0055]
[0056]
[0057] S5. After determining that the cloud platform or offline database contains the pipeline system to be created, the Revit project file automatically generates the corresponding attributes of the matching pipeline system: including the pipeline system type name, abbreviation, material, line type, line width, color and other contents;
[0058] 1) Based on the selected pipeline system name and pipeline system abbreviation, determine whether it belongs to the data in the cloud platform or offline database: The core code is as follows:
[0059]
[0060]
[0061] 2) Obtain the attribute data of the pipeline system in the cloud platform or offline database; the core code is as follows:
[0062]
[0063]
[0064] S6. Revit automatically marks out the piping systems that cannot be matched: Based on the results of automatic search and matching, use the secondary development plug-in to automatically mark out the piping systems that cannot be matched to the piping system properties in Revit.
[0065] a) Based on the selected pipeline system name and pipeline system abbreviation, determine whether it belongs to the data in the cloud platform or offline database, and mark the unmatched content in the secondary development plug-in platform; the core code is as follows:
[0066]
[0067] S7. Manually change the piping system and its attribute parameters that cannot be matched in Revit; Manually change the piping system and its attribute parameters that need to be modified in Revit:
[0068] A) Use the secondary development plug-in to manually change the unmatched piping system and its attribute parameters in Revit: The core code is as follows:
[0069] grid_pipe[seleRow,1].View=defaultCell;
[0070] DevAge.Windows.Forms.DevAgeComboBox comboxMatchType=(grid_pipe[seleRow,1].Editor as SourceGrid.Cells.Editors.ComboBox).Control;
[0071] int index=pipeType.FindIndex(x=>x==
[0072] comboxMatchType.SelectedItem.ToString());
[0073] grid_pipe[seleRow,4]=new SourceGrid.Cells.Cell(pipelinePatt[index],mEditor_LinePatternName);
[0074] grid_pipe[seleRow,5]=new SourceGrid.Cells.Cell(pipelineWei[index],mEditor_LineWeight);
[0075] String color=pipelineColor[index];
[0076] B) Use the secondary development plug-in to manually change the piping system and its property parameters that need to be modified in Revit: The core code is as follows:
[0077] grid_pipe[row, 0] = new SourceGrid.Cells.Cell(data.Name, typeof(string));
[0078] grid_pipe[row, 1] = new SourceGrid.Cells.Cell(data.Abbreviation, typeof(string));
[0079] grid_pipe[row, 2] = new SourceGrid.Cells.Cell(strMaterialName, mEditor_Material);
[0080] grid_pipe[row, 3] = new SourceGrid.Cells.Cell(LinePatternId, mEditor_LinePatternName);
[0081] grid_pipe[row, 4] = new SourceGrid.Cells.Cell(lineWeight, mEditor_LineWeight);
[0082] grid_pipe[row, 5] = new SourceGrid.Cells.Cell(lineColor);
[0083] S8. Creation of the pipe system in Revit: Core code:
[0084] MEPSystemClassification epSysClaPipe =
[0085] (MEPSystemClassification)classification;
[0086] PipingSystemType type = PipingSystemType.Create(Document, mepSysClaPipe, strs.Name);
[0087] The piping system creation plug-in is a way to extend the function through external commands (ExternalCommand). On the Visual Studio2017 platform, the Revit interface definition files RevitAPI.dll and RevitAPIUI.dll are referenced, and the plug-in development is implemented using the C# language. It is started from within the Revit software through the addin file;
[0088] (1) Create a new class library in Visual Studio 2017, reference the Revit interface definition files RevitAPI.DLL and RevitAPIUI.DLL (the files are in the Revit installation directory), and set the Copy Local property to False
[0089] (2) Reference the namespace in the program header, create a transaction, and submit a series of operations to modify the Revit model to the document object; the core code is as follows:
[0090] UsingAutodesk.Revit.UI;
[0091] UsingAutodesk.Revit.DB;
[0092] UsingAutodesk.Revit.UI.Selection;
[0093] UsingAutodesk.Revit.DB.Mechanical;
[0094] Using System.Windows.Forms;
[0095] (3) Set the transaction start mode, create a new command class, derive from IExternalCommand, and overload the Execute() method;
[0096] (4) Main code compilation, writing the main functional code of the above-mentioned pipeline system creation;
[0097] (5) Create a plug-in button. First, add an embedded panel, then call the PushButton (call command button) class to add a button control, and finally call the Uri (Uniform Resource Identifier) class to import the corresponding icon into the button;
[0098] (6) Register and run the extension module. After the button is created, write the addin file as the internal startup file. Put the addin file in the corresponding revit version folder under the path C: / programdata(program data) / Autodesk / revit(modeling software) / addin(plug-in) / so that the button can be imported into the Revit software;
[0099] (7) Write the path of the .dll (dynamic link library) file, the namespace and class name of the plug-in generated by the above-mentioned program for creating the pipeline system plug-in function into the file. Open the Revit software to obtain the "System Management" plug-in. Click the button to create the pipeline system and its system properties.
[0100] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for quickly creating a piping system based on modeling software, characterized in that: The following steps are involved: S1. Import CAD drawings into Revit software, and use the secondary development plug-in to retrieve the piping system in the CAD drawings in Revit software; S2. Generate an Excel file of piping system abbreviations and piping system names in Revit software using secondary development plug-ins; S3. Obtain the abbreviation and name of the piping system to be created in Revit software; S4, using the secondary development plug-in Revit software to automatically search for the corresponding piping system that needs to be created in S3 in the cloud platform or offline database; S5. According to the result of automatic search for a match in S4, a matching piping system is automatically generated in the Revit software using the data in the cloud platform or the offline database, and the properties of the corresponding piping system are generated; S6. Based on the results of automatic search and matching in S4, the secondary development plug-in is used to automatically mark the piping system whose properties cannot be matched in S5 in the Revit software; S7. Based on the marking results in S6, use the secondary development plug-in in the Revit software to manually change the piping system that cannot be matched to the piping system attributes, and manually change the piping system that needs to modify the matching data; S8. Based on the results in S7, the secondary development plug-in is used to automatically complete the creation of the piping system in the CAD drawing in the Revit software.
2. A method for quickly creating a pipeline system based on modeling software according to claim 1, characterized in that: In the steps S2, S4 and S5, the use of secondary development plug-ins in the Revit software includes: The tools used include Visual Studio 2017, Revit 2019SDK, AddinManager, and RevitLookup; the RevitAPI implements software function expansion operations through the external command interface. There is only one abstract function Execute in the interface, which is overloaded to implement external commands.
3. The method for quickly creating a pipeline system based on modeling software according to claim 1, characterized in that: In step S8, creating a pipeline system and its pipeline system attribute plug-in includes: The piping system creation plug-in is a way to extend the function through external commands. On the Visual Studio 2017 platform, the Revit interface definition files RevitAPI.dll and RevitAPIUI.dll are referenced, and the plug-in development is implemented using the C# language. It is started from within the Revit software through the addin file; Create a new class library in Visual Studio 2017, reference the Revit interface definition files RevitAPI.DLL and RevitAPIUI.DLL, and copy Set the Local (copy to local) property to False; reference the namespace in the program header, create a transaction, and submit a series of operations that modify the Revit model to the document object; set the transaction start mode, create a new command class, derive from IExternalCommand, and overload the Execute() method; compile the main code and write the main functional code for creating the pipeline system mentioned above; create a plug-in button, first add an embedded panel, then call the PushButton class to add a button control, and finally call the Uri class to import the corresponding icon into the button; register and run the extension module, and after the button is made, write the addin file as the internal startup file, and put the addin file in the corresponding revit version folder under the C: / programdata / Autodesk / revit / addin / path so that the button can be imported into the Revit software; write the path of the .dll file generated by the above-mentioned program to create the pipeline system plug-in function, the namespace and class name of the plug-in into the file, open the Revit software to get the "system management" plug-in, and click the button to create the pipeline system and its system properties.
4. The method for quickly creating a pipeline system based on modeling software according to claim 1, characterized in that: The step S4 also includes an offline database, which is a database established by storing pipeline system information data collected offline, and is configured to perform further retrieval and matching when the cloud platform cannot be used for automatic search and matching in step S4 or the corresponding pipeline system cannot be found and matched in the cloud platform.
5. The method for quickly creating a pipeline system based on modeling software according to claim 1, characterized in that: The attributes of the corresponding pipeline system generated in step S5 include the pipeline system type name, abbreviation, material, line type, line width and color.
6. The method for quickly creating a pipeline system based on modeling software according to claim 5, characterized in that: The specific method of obtaining the offline database data in step S4 is as follows: S4.
1. Collect the data information of the historical pipeline system offline, classify and sort the collected data information, and then perform similarity matching. After the data information with complete matching similarity is clear, the remaining data information is used to jointly establish an offline database; S4.2, after the matching in step S7, the pipeline system that is confirmed to be unsuccessful in matching is transmitted to the offline database after manual modification to improve the database.
Citation Information
Patent Citations
Automatic air pipe machining method based on BIM
CN110008606A
Method and system for automatic modeling of a spraying system based on Revit
CN111382510A