Method for realizing bidirectional modeling based on Revit secondary development in combination with Midas command stream

Through the combination of Revit secondary development and Midas command flow, the two-way modeling between Revit and Midas is realized, solving the problems of incomplete and repetitive data transfer in the existing technology, and improving the efficiency of engineering design and analysis.

CN119808236APending Publication Date: 2025-04-11NANJING KISEN INT ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411869942.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The existing integration methods of Revit and Midas cannot achieve full information transmission and bidirectional data flow, resulting in incomplete data transmission, increased repetitive work, and inefficient.

Method used

Through the Revit secondary development combined with Midas command flow, the Revit model is exported as a Midas computing model, and the Midas computing model is exported as a Revit model to realize two-way modeling.

Benefits of technology

It solves the problems of incomplete data transmission and repeated work, improves the efficiency of design and analysis, and realizes two-way automatic updates between Revit and Midas models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808236A_ABST
    Figure CN119808236A_ABST
Patent Text Reader

Abstract

The invention provides a method for realizing bidirectional modeling based on Revit secondary development in combination with a Midas command stream. The method comprises the following steps: establishing a truss calculation model by utilizing Midas Gen; exporting node information, section information and material information of the Midas Gen truss model; building a Revit upper and lower chord member, web member, support and cross beam member group; establishing a Revit truss connection node family library; selecting an insertion point, and creating a Revit three-dimensional truss; and creating connecting nodes of all components of the truss. According to the method, the three-dimensional truss and the connection nodes are automatically created in Revit according to the Midas calculation model information, the problems that the current Revit steel truss three-dimensional modeling speed is low and the nodes are difficult to create are solved, and the development of the BIM digital technology in industrial plants is promoted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0003] The present invention relates to the technical field of three-dimensional modeling, and in particular to a method for realizing bidirectional modeling based on Revit secondary development combined with Midas command stream. Background Art

[0005] With the rapid development of BIM technology, its application scenarios have expanded from traditional construction to infrastructure, industrial buildings and various complex structural projects. BIM provides a digital management method for the entire life cycle of engineering projects by integrating multi-dimensional information such as geometric data, material properties and construction processes. Especially in complex projects, BIM can significantly improve design efficiency and optimize construction management and operation and maintenance management. However, due to the diversification of structural analysis needs, BIM models and structural analysis models need to be frequently converted and linked, which poses a challenge to traditional modeling methods.

[0006] Structural analysis is an important tool for engineering design and optimization, used to calculate the mechanical response and stability of structures under various loads. Structural analysis can verify the safety and economy of the design scheme and optimize it. There are differences in data organization and information representation between traditional BIM models and structural analysis models, which leads to duplication of modeling work, inefficient manual data processing, and prone to information inconsistency.

[0007] As the mainstream software of BIM, Revit has significant advantages in 3D modeling and information integration, while Midas is widely used in the analysis and calculation of various structures, including finite element analysis and general structural analysis. The combination of the two can achieve full process integration from design to analysis. However, the current integration method has the following problems: 1. Incomplete data transfer: Model conversion is usually completed through geometric import (such as .DXF or .STEP format), but sections, materials, loads and boundary conditions still need to be set manually, which increases the workload of data input. 2. Duplication of work problem: During multiple design optimization and analysis, repeated modeling and parameter setting reduce work efficiency.

[0008] The existing integration method between Revit and Midas mainly relies on the import and export of geometric data, which cannot achieve comprehensive information transmission and two-way data flow. Although the geometric model can transmit basic shapes, it lacks the complete information required for structural analysis (such as material parameters and load conditions), which needs to be added manually. In addition, if the model is modified and optimized after analysis, the results cannot be automatically updated back to the Revit model. Summary of the invention

[0010] In order to realize bidirectional modeling between Revit (Revit2020 in the example of the present invention) and Midas (Midas Gen2023 in the example of the present invention, hereinafter referred to as Midas), the present invention provides a method for realizing bidirectional modeling based on Revit secondary development combined with Midas command stream, and the technical scheme adopted is as follows:

[0011] A method for realizing bidirectional modeling based on Revit secondary development combined with Midas command stream, characterized in that the method comprises the following steps:

[0012] S10 Revit model is exported to Midas calculation model;

[0013] The S20 Midas calculation model is exported as a Revit model.

[0014] As a preferred embodiment of the present invention, in step S10, the specific steps of exporting the Revit model to the Midas calculation model are as follows:

[0015] S101 Revit model component selection and data storage;

[0016] S102 data parsing and command stream generation;

[0017] S103 command stream reading to generate a Midas calculation model.

[0018] As a preferred embodiment of the present invention, in step S101, the specific steps of selecting Revit model components and storing data are as follows:

[0019] S101.1 Select the component to be exported in Revit, and then select the insertion point point1 as the base point for importing into Midas. This article takes the structural frame as an example. This type of component has the LocationCurve attribute and is created according to the location curve.

[0020] S101.2 Add the coordinates of both ends of all components to the coordinate point dictionary.<XYZ, int> pointDictionary) and remove the duplicate parts, add all component sections to the section collection and remove the duplicate parts List <string>sectionList, add all components to the component collection List <element>elementList.

[0021] As a preferred embodiment of the present invention, in step S102, the specific steps of data parsing and command stream generation are as follows:

[0022] S102.1 Traverse the material collection meterialList created in S101 and create the command stream part of Midas to generate materials (taking steel as an example).

[0023] S102.2 Traverse the section collection sectionList created in S101 and create the command flow part of Midas to generate the section (taking the steel section as an example).

[0024] S102.3 Traverse the coordinate point set pointDictionary created in S101 and create the command stream part of the Midas generation node.

[0025] S102.4 Traverse the component set elementList created in S101 and create the command stream part of Midas to generate Element.

[0026] As a preferred embodiment of the present invention, in step S103, the specific steps of command stream reading are as follows:

[0027] In the Midas menu bar, first select "Tools", then select "MGT Command Window", then click the open file icon, select the command flow file .mgt generated in S102 and click to open, and finally click the "Run" button to generate the calculation model in Midas.

[0028] As a preferred embodiment of the present invention, in step S20, the specific steps of exporting the Midas calculation model to a Revit model are as follows:

[0029] S201 Midas data export

[0030] S202 Command Stream Parsing and Data Storage

[0031] S203 Component Mapping and Model Creation

[0032] As a preferred embodiment of the present invention, in step S201, the specific steps of exporting Midas data are as follows:

[0033] Click the Midas Gen icon, select "Model data text output", check the "Node data", "Beam member data", "Truss member data" options, and then export the data file .mdl.

[0034] As a preferred embodiment of the present invention, in step S202, the specific steps of exporting Midas data are as follows:

[0035] S202.1 ① Traverse each line of data. If the line contains the key character "Node Data" ("NODEDATA" in the English version), process the data from the line to the next occurrence of "***" and split each line according to the "space" symbol.

[0036] ② A class named NoPoint is defined, and an object list nodelist of this class is created. Then a NoPoint object is added to the list to store "node data".

[0037] S202.2 ① Repeat the reading steps in S202.1, the key characters are "BEAMMEMBER DATA" (English version: "BEAMMEMBER DATA").

[0038] ② A class named NoBeam is defined, and an object list beamList of this class is created. Then a NoBeam object is added to the list to store "beam component data".

[0039] As a preferred embodiment of the present invention, in step S203, the specific steps of component mapping and model creation are as follows:

[0040] S203.1 De-duplicate the material set elementMaterial created in S202, use the function Material.Create() to create each material in elementMaterial, and set the corresponding properties. Traverse the beam component section type Section1 in beamList to determine which family file to load (such as H-beam, I-beam, seamless steel pipe, etc.), and load the corresponding component family.

[0041] S203.2 Select the insertion point point, traverse the beam component set and truss component set in S202, use the FamilyInstance function to create each component, and generate a Revit model.

[0042] Compared with the prior art, the technical solution used in the present invention automatically creates three-dimensional trusses and connection nodes in Revit based on the Midas calculation model information, which solves the current problems of slow three-dimensional modeling of Revit steel trusses and difficult node creation, and promotes the development of BIM digital technology in industrial plants. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a flow chart of bidirectional transmission between Revit and Midas models in an example of the present invention. DETAILED DESCRIPTION

[0046] The technical solution of the present invention is further explained below in conjunction with the accompanying drawings and specific embodiments.

[0047] like Figure 1 As shown, the schematic diagram of the process of bidirectional transmission between Revit and Midas models in this embodiment includes:

[0048] S10 Revit model exported to Midas calculation model

[0049] S101 Revit model component selection and data storage

[0050] S101.1 Select the component to be exported in Revit, and then select the insertion point point1 as the base point for importing into Midas. This article takes the structural frame as an example. This type of component has the LocationCurve attribute and is created according to the location curve.

[0051] S101.2 Add the coordinates of both ends of all components to the coordinate point dictionary.<XYZ, int> pointDictionary) and remove the duplicate parts, add all component sections to the section collection and remove the duplicate parts List <string>sectionList, add all components to the component collection List <element>elementList. According to the Midas data format, convert the above data into text information and store it in each row.

[0052] S102 Data parsing and command stream generation

[0053] Note: The box in this step contains part of the command flow file. The italic part is the necessary parameter settings required by the command flow file. For specific parameter definitions, please refer to the Midas Gen manual. The format and content of this part are basically fixed (different Midas versions may be slightly different).

[0054] S102.1 Traverse the material collection meterialList created in S101, and create the command flow part for Midas to generate materials (taking steel as an example): enter the iMAT material number, TYPE material type (such as STEEL, CONC, ALUMINUM, USER, etc.), MNAME material name, SPHEAT specific heat capacity, HEATCO thermal conductivity, PLAST whether to consider plastic behavior (Boolean value, usually 0 or 1), TUNIT temperature unit, bMASS whether to consider mass effect, DAMPRATIO damping ratio, data type number (DATA1, DATA2), STANDARD standard (national or international), CODE / PRODUCT code or product number, DB database number, USEELAST whether to use elastic modulus, ELAST elastic modulus.

[0055] S102.2 Traverse the section collection sectionList created in S101, and create the command flow part of Midas to generate the section (taking the steel section as an example): enter the iSEC section number, TYPE section type, SNAME section name, [OFFSET] section offset, bSD whether to consider the shear deformation of the section (Boolean value, 0 or 1), bWE whether to consider the torsional deformation of the section (Boolean value, 0 or 1), SHAPE section shape number, data type number (DATA1, DATA2), DB database section, NAMEor 2 specified name, D1~D10 user-defined section.

[0056] S102.3 Traverse the coordinate point set pointDictionary created in S101, and create the command flow part of the Midas generation node: input the iNO node number, X-axis coordinate, Y-axis coordinate, and Z-axis coordinate respectively.

[0057] S102.4 Traverse the component set elementList created in S101, create the command flow part of Midas to generate Element, take the frame element Frame Element as an example, input the iEL element number, TYPE element type (in this case, the frame element BEAM), iMAT material number, iPRO section number, iN1 start node number, iN2 end node number, ANGLE element angle (relative to the local coordinate system), iSUB sub-number or sub-type. For compression / tension trusses (Comp / TensTruss), plane elements (Planar Element), and solid elements (Solid Element), the input parameters are slightly different.

[0058] S103 Midas command stream reading

[0059] In the Midas menu bar, first select "Tools", then select "MGT Command Window", then click the open file icon, select the command flow file .mgt generated in S102 and click to open, and finally click the "Run" button to generate the calculation model in Midas.

[0060] S20 Midas calculation model is exported as Revit model

[0061] S201 Midas data export

[0062] Click the Midas Gen icon, select "Model data text output", check the "Node data", "Beam member data", "Truss member data" options, and then export the data file .mdl.

[0063] S202 Command Stream Parsing and Data Storage

[0064] Open the command stream .mdl file generated in S201 and parse the text content. This embodiment takes the frame element as an example. For the compression / tension truss (Comp / Tens Truss), plane element (PlanarElement), and solid element (Solid Element), the input parameters are slightly different. In the data example, the wavy line annotation line is not in the export file, but only for the convenience of this article. The specific operations are as follows:

[0065] S202.1 ① Traverse each row of data. If the row contains the key character "node data" ("NODEDATA" in English), process the data from the row to the next occurrence of "***" and split each row by the "space" symbol. There are 5 columns of node data, column 0 is the node number, columns 1 to 3 are the X, Y, and Z values ​​of the node coordinates, and column 4 is the temperature. As shown in the following table:

[0066] ② A class named NoPoint is defined, and an object list nodelist of this class is created. Then a NoPoint object is added to the list, containing the node number No=columns[0] and the node coordinates Pointvar=point1.

[0067] S202.2 ① Repeat the reading steps in S202.1. The key character is "beam component data" (English version is "BEAMMEMBER DATA"). There are 9 columns in the beam component data. Column 0 is the beam component number, column 1 and column 2 are the starting node number and ending node number of the beam component (corresponding to the number obtained in S202.1), column 3 and column 4 are the constraints at both ends (starting point and end point) of the beam component, column 5 is the material of the beam component, column 6 is the cross-sectional type code of the beam component (such as HW, HM, P, etc.), column 7 is the cross-sectional size specification of the beam component (such as 200x200x8 / 12, 102x5, etc.), and column 8 is the length of the beam component, as shown in the following table:

[0068]

[0069] ② Define a class named NoBeam and create an object list beamList of this class. Then add a NoBeam object to the list, which contains the beam component number No=columns[0], the beam component starting node number Startpoint=columns[1], the beam component ending node number Endpoint=columns[2], the beam component section type code Section1=columns[6], the beam component section size specification Section2=columns[7], the beam component start point constraint Support1=columns[3], the beam component end point constraint Support2=columns[4], and the beam component material Material=columns[5]. At the same time, add column 5 to the material collection elementMaterial.

[0070] S203 Component Mapping and Model Creation

[0071] To create a component in Revit, you need to first use the filter FilterCollector to find the corresponding component. If there is no component in the current project document, you need to load the corresponding family first, and then create the instance FamilyInstance. However, when there are many components and cross-section types in the model, loading the family and creating the instance at the same time will cause the program to freeze and affect the user experience. Therefore, this embodiment first performs component mapping (batch loading the corresponding family) and then creates the instance (that is, component creation).

[0072] S203.1 De-duplicate the material collection elementMaterial created in S202, use the function Material.Create() to create each material in elementMaterial, and set the corresponding properties. Traverse the beam component section type Section1 in beamList to decide which family file to load (such as H-beam, I-beam, seamless steel pipe, etc.), and load the corresponding component family (these commonly used standard sections can be found in the files installed by Revit). For components of different section types, the expressions in Revit and Midas are slightly different. For example, the circular steel pipe section type symbol is "P" in Midas and "ø" in Revit. When mapping components, it is necessary to pay attention to the one-to-one correspondence of names.

[0073] S203.2 Select the insertion point point, traverse the beam component set and truss component set in S202, use the FamilyInstance function to create each component, and generate a Revit model. Among them, pointstartlistforTruss[i] and pointendlistforTruss[i] are the node coordinates matched according to the beamList[i].Startpoint and beamList[i].Endpoint numbers.

[0074] Although the invention has been disclosed as above in terms of preferred embodiments, the embodiments and drawings are not intended to limit the invention. Anyone familiar with the art can make various changes or modifications without departing from the spirit and scope of the invention, but they are also within the scope of protection of the invention. Therefore, the scope of protection of the invention shall be based on the scope of protection of the claims of this application.< / element> < / string> < / element> < / string>

Claims

1. A method for implementing bidirectional modeling based on Revit secondary development combined with Midas command stream, characterized in that: The steps include: S10 Revit model is exported to Midas calculation model; S101 Revit model component selection and data storage; S102 data parsing and command stream generation; S103 command stream reading generates Midas calculation model; S20 Midas calculation model is exported as Revit model; S201 Midas data export; S202 command stream parsing and data storage; S203 Component mapping and model creation.

2. The method for realizing bidirectional modeling based on Revit secondary development combined with Midas command stream according to claim 1 is characterized in that: In step S101, the specific steps of selecting Revit model components and storing data are as follows: S101.1 Select the component to be exported in Revit, and then select the insertion point point1 as the base point for importing into Midas. The component has the LocationCurve attribute and is created according to the location curve; S101.2 Add the coordinates of both ends of all components to the coordinate point dictionary.<XYZ, int> pointDictionary) and remove the duplicate parts, add all component sections to the section collection and remove the duplicate parts List <string>sectionList, add all components to the component collection List <element> elementList.< / element> < / string> 3. The method for realizing bidirectional modeling based on Revit secondary development combined with Midas command stream according to claim 1 is characterized in that: In step S102, the specific steps of data parsing and command stream generation are as follows: S102.1 traverse the material collection meterialList created in S101, and create the command stream part of Midas to generate materials; S102.2 traverse the section set sectionList created in S101, and create the command stream part of Midas to generate the section; S102.3 traverse the coordinate point set pointDictionary created in S101, and create the command stream part of the Midas generation node; S102.4 Traverse the component set elementList created in S101 and create the command stream part of Midas to generate Element.

4. The method for realizing bidirectional modeling based on Revit secondary development combined with Midas command stream according to claim 1 is characterized in that: In step S103, the specific steps of command stream reading are as follows: In the Midas menu bar, first select "Tools", then select "MGT Command Window", then click the open file icon, select the command flow file .mgt generated in S102 and click to open, and finally click the "Run" button to generate the calculation model in Midas.

5. The method for realizing bidirectional modeling based on Revit secondary development combined with Midas command stream according to claim 1 is characterized in that: In step S201, the specific steps of exporting Midas data are as follows: Click the Midas Gen icon, select "Model data text output", check the "Node data", "Beam member data" and "Truss member data" options, and then export the data file .mdl.

6. The method for realizing bidirectional modeling based on Revit secondary development combined with Midas command stream according to claim 1 is characterized in that: In step S202, the specific steps of exporting Midas data are as follows: S202.1 ① Traverse each line of data. If the line contains the key character "Node Data" ("NODEDATA" in English), process the data from the line to the next occurrence of "***" and split each line by the "space" symbol; ② Define a class named NoPoint, create an object list nodelist of this class, and then add a NoPoint object to the list to store "node data"; S202.2 ① Repeat the reading steps in S202.1, the key characters are "beam component data" - the English version is "BEAMMEMBER DATA"; ② A class named NoBeam is defined, and an object list beamList of this class is created. Then a NoBeam object is added to the list to store "beam component data".

7. The method for realizing bidirectional modeling based on Revit secondary development combined with Midas command stream according to claim 1 is characterized in that: In step S203, the specific steps of component mapping and model creation are as follows: S203.1 De-duplicate the material set elementMaterial created in S202, use the function Material.Create() to create each material in elementMaterial, set the corresponding properties, traverse the beam component section type Section1 in beamList to determine which family file to load, including H-beam, I-beam and seamless steel pipe, and load the corresponding component family; S203.2 Select the insertion point point, traverse the beam component set and truss component set in S202, use the FamilyInstance function to create each component, and generate a Revit model.