Method for comprehensively reporting pipeline system based on DYNAMO
By establishing Revit working templates and dynamo scripts on the DYNAMO platform, automatic sorting and grouping of pipeline system components is solved, and the problems of low efficiency and poor accuracy of pipeline system comprehensive report generation in the existing technology are solved, and efficient and accurate report generation and modification are achieved.
Patent Information
- Application Number
- CN202510048759.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-25
AI Technical Summary
During the factory pipeline engineering design process, it is difficult for the existing technology to generate comprehensive reports of pipeline systems efficiently and accurately, and there are problems of low efficiency and high error rates, especially when modifying and outputting serial numbers.
Using a DYNAMO-based method, by establishing Revit working templates and dynamo scripts, automatic sorting and grouping of pipeline system components is realized, comprehensive reports are generated, and serial numbers are written into the preset fields of Revit corresponding components.
It improves the completion efficiency and accuracy of data reports, is reasonable in design, simple in operation, strong versatility, and easy to modify, and can effectively solve the problems of low efficiency and high error rates in traditional methods.
Smart Images

Figure CN119886087A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of engineering design, and in particular to a method for making a comprehensive report on a pipeline system based on DYNAMO. Background Art
[0002] At present, in the process of factory piping engineering design, it is necessary to issue a comprehensive report of each component of the piping system, which includes different systems such as air conditioning, air supply, exhaust, smoke exhaust, and fresh air. Each system contains different types of objects such as pipes, ducts, pipe fittings, duct fittings, accessories, duct accessories, duct terminals, mechanical equipment, etc. Each object has various specifications and attributes, and ultimately needs to be presented in a comprehensive table, grouped and sorted according to system classification, object category, and specification, and then uniformly output with a large serial number.
[0003] In the traditional process of making engineering reports, they are usually classified and sorted manually, which has the following problems: low efficiency and high error rate: the process of compiling reports requires re-searching each item in the engineering drawings and counting the quantity, which is cumbersome and easy to miss items, and the accuracy of the quantity statistics is relatively low; inconvenient to modify: after adding, deleting and modifying the existing engineering results, they need to be searched and sorted again, especially the large serial numbers need to be re-arranged, which increases the workload and reduces work efficiency. Summary of the invention
[0004] The technical problem to be solved by the present invention is to overcome the existing defects, provide a method for making comprehensive reports on pipeline systems based on DYNAMO, realize the method of comprehensive arrangement of pipeline systems and inputting serial numbers, improve the completion efficiency and accuracy of data reports, have reasonable design, high efficiency and accuracy, strong versatility, easy modification, and can effectively solve the problems in the background technology.
[0005] To achieve the above object, the present invention provides the following technical solution: a method for generating a comprehensive report of a pipeline system based on DYNAMO, comprising the following steps: S1): Create a Revit work template, including the preset of key fields and the format of the report; S2): Establish a Dynamo script to sort the pipeline system components using an algorithm, and reserve a custom sorting input port that can be manually adjusted; S3): Use the work template to create a project file and complete data entry according to the specific conditions of the project; S4): Open the Dynamo script, enter the alphabetical order of the system to be sorted, run the script program, automatically group and sort the components according to the custom sorting order, and write the final serial number into the preset field of the corresponding Revit component; S5): Reports are automatically generated in the Revit file schedule according to the preset template.
[0006] As a preferred technical solution of the present invention, the step S1) includes creating project parameters: serial number, system number, size, and model; the "size" parameter is used for air ducts and air duct fittings, and the "model" is used for air duct accessories, air duct terminals and mechanical equipment; the serial number and system number are used for all the above object categories.
[0007] As a preferred technical solution of the present invention, the step S1) includes creating a multi-category list, field selection: "Family and Type", "System Number", "Total"; setting in sorting / grouping: sort in descending order by the "Serial Number" field.
[0008] As a preferred technical solution of the present invention, the step S2) specifically includes the following steps: S2-1) Obtain all objects of ducts, duct fittings, duct terminals, duct accessories, and mechanical equipment through the node All Elements of Category, and merge them into a one-dimensional list Tab-1; S2-2) sort and group the objects according to their system numbers; S2-3) Sort and group objects within the subsystem into categories; S2-4) Sort and group objects under categories; S2-5) Reverse-enter the large serial number according to the final sorting.
[0009] As a preferred technical solution of the present invention, the step S2-2) specifically includes the following steps: S2-2-1) Node GetParameterValueByName obtains the "system number" attribute value of all graphics elements to form a new one-dimensional list Tab-2; S2-2-2) sort Tab-2 according to the weight coefficient to generate Tab-3; S2-2-3) The node IndexOf returns the index position of the first occurrence of Tab-2 in Tab-3. Using the index position as the key, the node SortByKey is used to re-sort Tab-1 to generate a new list Tab-4. S2-2-4) Perform character segmentation on the sorted "system number" list records in Tab-3, using "-" as the separator, and split them into two lists, where Tab-5 contains the character string in the system number and Tab-6 contains the number in the system number; S2-2-5) Use the node GroupByKey to group Tab-4, whose key is Tab-5, and generate a new two-dimensional list Tab-7. In this example, Tab-7 contains 5 secondary groups, representing objects in the K, J, P, PY, and XF systems respectively; S2-2-6) Use the node SortByKey to sort Tab-7 within the group, whose key is Tab-6, and generate the list Tab-8. After sorting, it is arranged in the order of K-1, K-2 in the K system; S2-2-7) Use the node GroupByFunction to further group each group in Tab-8. Func is the process of extracting Tab-6 from Tab-3, that is, Tab-6 is used as the grouping basis; the generated new list Tab-9 is a three-dimensional list, the third level is the major systems (K, P, etc.), and the second level is the subsystems within the major systems (K-1, K-2).
[0010] As a preferred technical solution of the present invention, the weight coefficient calculation and sorting algorithm in step S2-2-2) includes: S2-2-2-1) Provide the final sequence string to be sorted as needed, with the first letter first, followed by the second letter, and duplicates are not entered; S2-2-2-2) Match each item in Tab-2 with the sequence string and calculate the weight coefficient; S2-2-2-3) Each record in Tab-2 is sorted according to the calculated sum of weight coefficients to form a new list Tab-3. In Tab-3, records with the same system number are sorted together, and the ones with lower sum of weight coefficients are placed at the front.
[0011] As a preferred technical solution of the present invention, the step S2-3) specifically includes the following steps: S2-3-1) Create a string list of object sorting order according to project requirements. The string should be written strictly according to the Revit component category name to form a one-dimensional list Tab-10; S2-3-2) Use the node Flatten to convert Tab-9 into a two-dimensional list, use the node Element.GetCategory to extract the Category of the list object, use the node IndexOf to obtain the index position of the first appearance of the object in Tab-9 two-dimensional list in Tab-10, and use SortByKey to sort the group to generate a new two-dimensional list Tab-11, so as to achieve sorting in the subsystem group according to the custom object category order; S2-3-3) Use the node GroupByFunction to group the ordered objects in the subsystem and generate a new list Tab-12. The Func end is to obtain the object category of Tab-11, that is, the object category is used as the grouping basis. After grouping, a new three-dimensional list is formed. The first level is all subsystems, the second level is the category of each object, and the third level is the objects under different categories.
[0012] As a preferred technical solution of the present invention, the step S2-4) specifically includes the following steps: S2-4-1) Use the node Flatten to convert Tab-12 into a two-dimensional list, and use the node GroupByFunction to group the sorted objects in the object category group by size to generate a new list Tab-13. The Func end is to obtain the object size attribute of Tab-12, that is, the element size is used as the grouping basis. After grouping, a new three-dimensional list is formed. The first level is all sorted object categories, the second level is objects with the same size under the same category, and the third level is different objects. S2-4-2) Repeat the above steps, group again by model, generate a new list Tab-14, and complete the sorting and grouping of all objects.
[0013] As a preferred technical solution of the present invention, in the step S2-5), the node Flatten is used to convert the three-dimensional list Tab-14 into a one-dimensional list Tab-15, the node Count obtains the total number of list elements, the node Sequence generates a sequence from 1 to the total number of list elements, and the node SetParameterByName is used to input the values in the sequence one by one into the component corresponding to Tab-15.
[0014] Compared with the prior art, the beneficial effects of the present invention are: reasonable design, high efficiency and accuracy, one-click generation and accurate statistical quantity, simple operation, and no omissions; strong versatility, reserved custom input terminals, and the sorting order can be adjusted according to project requirements; easy modification, in the case of adding, deleting and modifying existing results, only need to re-run the script once to complete the new comprehensive report, which greatly reduces the labor burden of the staff and improves work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 Schematic diagram of algorithm logic used in the present invention. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0017] The project includes HVAC system (K-1, K-2), air supply system (J-1, J-2), exhaust system (P-1, P-2), smoke exhaust system (PY-1, PY-2), fresh air system (XF-1). Each system has air ducts, air duct fittings, air duct accessories, air duct terminals, and equipment of different models in different sizes. The ultimate goal is to arrange the systems in the order of K, J, P, PY, and XF. The objects in each system are arranged in the order of mechanical equipment, air duct terminals, air duct accessories, air ducts, and air duct fittings. Equipment of the same type is arranged in descending order according to size specifications. Finally, the serial number is generated after the overall arrangement.
[0018] See also Figure 1 The present invention provides a technical solution: a method for making a comprehensive report on a pipeline system based on DYNAMO, comprising the following steps: S1): Establish a Revit work template, including the preset of key fields and the format of the report, specifically: Create project parameters: serial number, system number, size, model; "Size" parameter is used for duct and duct fittings, "Model" is used for duct accessories, duct terminals and mechanical equipment; serial number and system number are used for all the above object categories.
[0019] Create a multi-category detailed list, and select the fields: "Family and Type", "System Number", "Total"; set in sorting / grouping: sort in descending order by the "Serial Number" field.
[0020] S2): Establish a dynamo script and use the algorithm to sort the pipeline system components. The specific algorithm logic is: S2-1) Obtain all objects of ducts, duct fittings, duct terminals, duct accessories, and mechanical equipment through the node All Elements of Category, and merge them into a one-dimensional list Tab-1.
[0021] S2-2) Sort and group each object according to the system number. The algorithm logic is as follows: S2-2-1) Node GetParameterValueByName obtains the "system number" attribute value of all graphics elements to form a new one-dimensional list Tab-2.
[0022] S2-2-2) Sort Tab-2 by weight coefficient to generate Tab-3. The weight coefficient calculation and sorting algorithm are as follows: S2-2-2-1) Provide the final sequence string that needs to be sorted as needed. The principle is that the first letter comes first, followed by the second letter, and duplicates are no longer entered. In this example, the sequence string is "KJPXYF".
[0023] S2-2-2-2) Match each item in Tab-2 with the sequential string and calculate the weight coefficient as follows: For a record in Tab-2, start from the first digit, find its rank in the sequential string one by one, and multiply it by *100; start from the second digit, find the rank *1, and finally calculate the total.
[0024] For example, K-1, the weight coefficient is 1*100=100; PY-1, weight coefficient is 3*100+5=305 S2-2-2-3) Each record in Tab-2 is sorted according to the calculated sum of weight coefficients to form a new list Tab-3. In Tab-3, records with the same system number are sorted together, and the ones with lower sum of weight coefficients are placed at the front.
[0025] S2-2-3) The node IndexOf returns the index position of the first occurrence of Tab-2 in Tab-3. Using the index position as the key, the node SortByKey is used to re-sort Tab-1 to generate a new list Tab-4. S2-2-4) Perform character segmentation on the sorted "system number" list records in Tab-3, using "-" as the separator, and split them into two lists, where Tab-5 contains the character strings in the system number and Tab-6 contains the numbers in the system number.
[0026] S2-2-5) Use the node GroupByKey to group Tab-4, whose key is Tab-5, and generate a new two-dimensional list Tab-7. In this example, Tab-7 contains 5 secondary groups, representing objects in the K, J, P, PY, and XF systems respectively.
[0027] S2-2-6) Use the node SortByKey to sort Tab-7 within the group, whose key is Tab-6, and generate the list Tab-8. After sorting, it is arranged in the order of K-1, K-2 within the K system.
[0028] S2-2-7) Use the node GroupByFunction to further group each group in Tab-8. Func is the process of extracting Tab-6 from Tab-3, that is, Tab-6 is used as the grouping basis; the generated new list Tab-9 is a three-dimensional list. The third level is the major systems (K, P, etc.), the second level is the subsystems in the major system (K-1, K-2), and the third level is the various objects in the system. It also realizes the arrangement according to the custom major system order and subsystem order.
[0029] S2-3) Sort and group the objects in the subsystem into categories. The algorithm logic is as follows: S2-3-1) Create a string list of object sorting order according to project requirements. The string should be written strictly according to the Revit component category name. For example, in this example, the order is "mechanical equipment", "duct terminal", "duct accessories", "duct", and "duct fittings", forming a one-dimensional list Tab-10.
[0030] S2-3-2) Use the node Flatten to convert Tab-9 into a two-dimensional list, use the node Element.GetCategory to extract the Category of the list object, use the node IndexOf to obtain the index position of the first appearance of the object in Tab-9 two-dimensional list in Tab-10, and use SortByKey to sort within the group to generate a new two-dimensional list Tab-11, so as to realize sorting within the subsystem group according to the custom object category order.
[0031] S2-3-3) Use the node GroupByFunction to group the ordered objects in the subsystem and generate a new list Tab-12. The Func end is to obtain the object category of Tab-11, that is, the object category is used as the grouping basis. After grouping, a new three-dimensional list is formed, with the first level being all subsystems, the second level being the category of each object, and the third level being the objects under different categories.
[0032] S2-4) Sort the objects under the category, and its algorithm logic is as follows: S2-4-1) Use the node Flatten to convert Tab-12 into a two-dimensional list, and use the node GroupByFunction to group the ordered objects in the object category group by size to generate a new list Tab-13. The Func end is to obtain the object size attribute of Tab-12, that is, the element size is used as the grouping basis. After grouping, a new three-dimensional list is formed, the first level is all sorted object categories, the second level is objects with the same size under the same category, and the third level is different objects.
[0033] S2-4-2) Repeat the above steps, group again by model, generate a new list Tab-14, and complete the sorting and grouping of all objects.
[0034] S2-5) Reverse write the large serial number according to the final sorting, the logic is as follows: The node Flatten is used to convert the three-dimensional list Tab-14 into a one-dimensional list Tab-15. The node Count is used to obtain the total number of list elements. The node Sequence generates a sequence from 1 to the total number of list elements. The node SetParameterByName is used to input the values in the sequence one by one to the corresponding components of Tab-15.
[0035] S3): Use the work template to create a project file and complete data entry according to the specific conditions of the project; S4): Open the Dynamo script, enter the alphabetical order of the system to be sorted and the object category order (you can also keep the default value). In this example, the system sorting order is "KFPXY", and the object sorting order is "mechanical equipment", "duct terminal", "duct accessories", "duct", "duct fittings", and run the script program.
[0036] According to the weight coefficient algorithm in S2), The weight coefficient of K-1 and K-2 systems is 1*100=100 The weight coefficient of F-1 and F-2 systems is 2*100=200 The weight coefficient of PY-1 and PY-2 systems is 3*100+5=305 The XF-1 system weight coefficient is 4*100+1=401 For the same weight system, the subsystems are sorted according to S2-2-6) and S2-2-7) in S2), and the final sorting order is K-1, K-2, F-1, F-2, PY-1, PY-2, XF-1.
[0037] According to S2-3-1), S2-3-2), and S2-3-3 in S2, the objects in each subsystem are mechanical equipment, air duct terminals, duct accessories, air ducts, and duct fittings.
[0038] S5): Reports are automatically generated in the Revit file schedule according to the preset template.
[0039] The present invention uses Dynamo script program to sort the pipeline system (including pipelines, air ducts, pipe fittings, air duct fittings, accessories, air duct accessories, air duct terminals, mechanical equipment and other types of objects) in a customized manner and output a comprehensive report. Through the algorithm design of key field preset, attribute extraction, sorting, grouping, and list dimension conversion of the pipeline system, hierarchical grouping and sorting according to pipeline system, subsystem, object category, object size, and model are realized, and finally output according to a standardized template. The design is reasonable, the operation is simple and fast, and the versatility is strong. It can be applied to various types of factory project pipeline systems; through the script operation, the sorting method can be customized according to the needs, and the sorting and comprehensive reports can be automatically generated, which improves the output efficiency and accuracy of the report, and is convenient to modify.
[0040] The undisclosed parts in the present invention are all prior art, and their specific structures, materials and working principles are not described in detail. Although the embodiments of the present invention have been shown and described, it is understood by those skilled in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for comprehensive reporting of pipeline systems based on DYNAMO, characterized in that: The following steps are involved: S1): Create a Revit work template, including the preset of key fields and the format of the report; S2): Establish a Dynamo script to sort the pipeline system components using an algorithm, and reserve a custom sorting input port that can be manually adjusted; S3): Use the work template to create a project file and complete data entry according to the specific conditions of the project; S4): Open the Dynamo script, enter the alphabetical order of the system to be sorted, run the script program, automatically group and sort the components according to the custom sorting order, and write the final serial number into the preset field of the corresponding Revit component; S5): Reports are automatically generated in the Revit file schedule according to the preset template.
2. The method for generating a comprehensive report of a pipeline system based on DYNAMO according to claim 1, characterized in that: The step S1) includes creating project parameters: serial number, system number, size, and model; the "size" parameter is used for air ducts and air duct fittings, and the "model" is used for air duct accessories, air duct terminals, and mechanical equipment; the serial number and system number are used for all the above object categories.
3. The method for generating a comprehensive report of a pipeline system based on DYNAMO according to claim 2, characterized in that: The step S1) includes creating a multi-category detailed list, and selecting the fields: "Family and Type", "System Number", and "Total"; and setting in sorting / grouping: sorting in descending order by the "Serial Number" field.
4. The method for generating a comprehensive report of a pipeline system based on DYNAMO according to claim 1, characterized in that: The step S2) specifically includes the following steps: S2-1) Obtain all objects of ducts, duct fittings, duct terminals, duct accessories, and mechanical equipment through the node All Elements of Category, and merge them into a one-dimensional list Tab-1; S2-2) sort and group the objects according to their system numbers; S2-3) Sort and group objects within the subsystem into categories; S2-4) Sort and group objects under categories; S2-5) Reverse-enter the large serial number according to the final sorting.
5. The method for generating a comprehensive report of a pipeline system based on DYNAMO according to claim 4, characterized in that: The step S2-2) specifically includes the following steps: S2-2-1) Node GetParameterValueByName obtains the "system number" attribute value of all graphics elements to form a new one-dimensional list Tab-2; S2-2-2) sort Tab-2 according to the weight coefficient to generate Tab-3; S2-2-3) The node IndexOf returns the index position of the first occurrence of Tab-2 in Tab-3. Using the index position as the key, the node SortByKey is used to re-sort Tab-1 to generate a new list Tab-4. S2-2-4) Perform character segmentation on the sorted "system number" list records in Tab-3, using "-" as the separator, and split them into two lists, where Tab-5 contains the character string in the system number and Tab-6 contains the numbers in the system number; S2-2-5) Use the node GroupByKey to group Tab-4, whose key is Tab-5, and generate a new two-dimensional list Tab-7. In this example, Tab-7 contains 5 secondary groups, representing objects in the K, J, P, PY, and XF systems respectively; S2-2-6) Use the node SortByKey to sort Tab-7 within the group, whose key is Tab-6, and generate the list Tab-8. After sorting, it is arranged in the order of K-1, K-2 in the K system; S2-2-7) Use the node GroupByFunction to further group each group in Tab-8. Func is the process of extracting Tab-6 from Tab-3, that is, Tab-6 is used as the grouping basis; the generated new list Tab-9 is a three-dimensional list, the third level is the major systems (K, P, etc.), and the second level is the subsystems within the major systems (K-1, K-2).
6. The method for generating a comprehensive report of a pipeline system based on DYNAMO according to claim 5, characterized in that: The weight coefficient calculation and sorting algorithm in step S2-2-2) includes: S2-2-2-1) Provide the final sequence string to be sorted as needed, with the first letter first, followed by the second letter, and duplicates are not entered; S2-2-2-2) Match each item in Tab-2 with the sequence string and calculate the weight coefficient; S2-2-2-3) Each record in Tab-2 is sorted according to the calculated sum of weight coefficients to form a new list Tab-3. In Tab-3, records with the same system number are sorted together, and the ones with lower sum of weight coefficients are placed at the front.
7. The method for generating a comprehensive report of a pipeline system based on DYNAMO according to claim 4, characterized in that: The step S2-3) specifically includes the following steps: S2-3-1) Create a string list of object sorting order according to project requirements. The string should be written strictly according to the Revit component category name to form a one-dimensional list Tab-10; S2-3-2) Use the node Flatten to convert Tab-9 into a two-dimensional list, use the node Element.GetCategory to extract the Category of the list object, use the node IndexOf to obtain the index position of the first appearance of the object in Tab-9 two-dimensional list in Tab-10, and use SortByKey to sort the group to generate a new two-dimensional list Tab-11, so as to achieve sorting in the subsystem group according to the custom object category order; S2-3-3) Use the node GroupByFunction to group the ordered objects in the subsystem and generate a new list Tab-12. The Func end is to obtain the object category of Tab-11, that is, the object category is used as the grouping basis. After grouping, a new three-dimensional list is formed. The first level is all subsystems, the second level is the category of each object, and the third level is the objects under different categories.
8. The method for generating a comprehensive report of a pipeline system based on DYNAMO according to claim 4, characterized in that: The step S2-4) specifically includes the following steps: S2-4-1) Use the node Flatten to convert Tab-12 into a two-dimensional list, and use the node GroupByFunction to group the sorted objects in the object category group by size to generate a new list Tab-13. The Func end is to obtain the object size attribute of Tab-12, that is, the element size is used as the grouping basis. After grouping, a new three-dimensional list is formed. The first level is all sorted object categories, the second level is objects with the same size under the same category, and the third level is different objects. S2-4-2) Repeat the above steps, group again by model, generate a new list Tab-14, and complete the sorting and grouping of all objects.
9. The method for generating a comprehensive report of a pipeline system based on DYNAMO according to claim 4, characterized in that: In the step S2-5), the node Flatten is used to convert the three-dimensional list Tab-14 into a one-dimensional list Tab-15, the node Count obtains the total number of list elements, the node Sequence generates a sequence from 1 to the total number of list elements, and the node SetParameterByName is used to input the values in the sequence one by one to the component corresponding to Tab-15.