A family parameter management system and method in Revit

By introducing a family parameter management system into Revit, and using C# and the Revit API for batch processing and data item updates, the problems of slow speed, limited functionality, and poor compatibility of existing plugins are solved, achieving efficient and accurate family parameter management.

CN116484473BActive Publication Date: 2026-01-27BEIJING CHATONE COMPUTER ROOM EQUIP & ENG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310443453.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-21
Publication Date
2026-01-27
Estimated Expiration
2043-04-21

AI Technical Summary

Technical Problem

Existing Revit plugins are slow, have limited functionality, and poor compatibility when processing family file parameters, leading to data corruption.

Method used

This paper provides a family parameter management system and method in Revit, including modules for adding, synchronizing, deleting, and clearing types of PM parameters. It utilizes C# language and Revit API for batch processing and data item updates, ensuring data format consistency.

Benefits of technology

It improved processing speed and efficiency, reduced repetitive work, ensured data processing accuracy, and solved the problem of data chaos.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116484473B_ABST
    Figure CN116484473B_ABST
Patent Text Reader

Abstract

The application discloses a family parameter management system and method in Revit, comprising a PM parameter adding module, a PM parameter synchronizing module, a family type deleting module, a family parameter deleting module and a PM data deleting module; the PM parameter adding module is used for batch adding of PM parameters; the PM parameter synchronizing module is used for updating of PM data items in a standard format and a fixed GUID; the family type deleting module is used for clearing all types of families and restoring a default state; the family parameter deleting module is used for clearing all parameters of families and restoring a default state; and the PM data deleting module is used for obtaining matched PM data items in a current family parameter table and deleting the same, so that the problems of repetitive work and easy errors occurring when adding, synchronizing and deleting family names and family parameters of a self-built family in Revit are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of project management, and more particularly to a family parameter management system and method in Revit. Background Technology

[0002] Revit is a BIM (Building Information Modeling) software developed by Autodesk, primarily used for architectural design, construction, and maintenance management. Revit's secondary development technology is mainly based on its API (Application Programming Interface) and the C# language. The Revit API is a set of interfaces for Revit software development, containing various classes, methods, and properties for developing Revit plugins. Current solutions utilize Revit secondary development plugins to directly import or export and then import back, such as plugins like DiRoots, Family TypeOrganizer, ParameterTools, Family Editor Interface, Family Exporter, Family TypesOrganizer, and Family Parameter Organizer.

[0003] However, existing technologies have the following drawbacks:

[0004] (1) Slow processing speed: Because Revit family files contain a large number of parameters, some plugins are slow to process parameters when making batch modifications or processing, especially when the file is large.

[0005] (2) Limited functionality: Some plugins have limited functionality and cannot be added flexibly according to the enterprise's list requirements and family parameter requirements. In actual operation, they can generally only be added mechanically and aimlessly.

[0006] (3) Compatibility issues: Different BIM engineers enter different GUIDs for the family parameter PM data items, which leads to data confusion (e.g., different columns for the same type of data) when generating the schedule. Summary of the Invention

[0007] To address the aforementioned shortcomings in the existing technology, the present invention provides a family parameter management system and method in Revit, which solves the problems of repetitive work and error-proneness when adding, synchronizing, and deleting family names and family parameters of custom Revit families.

[0008] To achieve the above-mentioned objectives, the technical solution adopted by the present invention is as follows: to provide a family parameter management system and method in Revit, including: a PM parameter addition module, a PM parameter synchronization module, a family type deletion module, a family parameter deletion module, and a PM data deletion module;

[0009] The PM parameter adding module is used to add PM parameters in batches;

[0010] The PM parameter synchronization module is used to update PM data items in standard format and with fixed GUIDs;

[0011] The family type deletion module is used to clear all family types and restore the default state.

[0012] The family parameter deletion module is used to clear all parameters of a family and restore it to its default state;

[0013] The PM data deletion module is used to obtain the matching PM data item in the current family parameter table and delete it.

[0014] Furthermore: A method for managing family parameters in a Revit family parameter management system is provided, including the following steps:

[0015] S1. Establish PM shared parameter text and plugin text boxes, and formulate a coding system that conforms to PM data items;

[0016] The PM data item includes a PM data key and a PM data value;

[0017] S2. Based on the coding system, write a PM data class using the C# language based on the Revit API;

[0018] S3. Based on the PM data class, write the PM parameter addition module, PM parameter synchronization module, family type deletion module, family parameter deletion module, and PM data deletion module;

[0019] S4. Based on the family parameter management objectives, family parameters are managed through the PM parameter addition module, PM parameter synchronization module, family type deletion module, family parameter deletion module, and PM data deletion module.

[0020] The beneficial effects of the above-mentioned further solutions are: functional customization, allowing for the addition, synchronization, and deletion of family names and parameters of Revit self-built families according to the data organization format of PM, thus meeting the family requirements of data center construction.

[0021] Further: In step S3, the method for the PM parameter adding module to add PM parameters in batches is as follows:

[0022] S31. Input the required PM data items into the plugin text box and retrieve the PM data items from the plugin text box;

[0023] S32. Perform PM data item rule judgment on the acquired PM data items:

[0024] If the obtained PM data items meet the PM data item rules, proceed to step S33;

[0025] If the obtained PM data items do not meet the PM data item rules, clear the plugin text box, pop up a message "Please enter PM data items that meet the rules", and return to step S31;

[0026] S33. Configure the naming rules for the family types of PM data that satisfy the PM data item rules, perform batch modification of family type names by previewing the naming rules, and generate a family type data set that satisfies the uniqueness of type names by traversing.

[0027] S34. Traverse the family identifier data within the family type data set, and determine whether its material number exists and whether the GUID generated by the management system is equal to the existing GUID:

[0028] If so, proceed to step S35;

[0029] If not, update the PM data items with standard format and fixed GUID. After the update is completed, return to step S31.

[0030] S35. Read the PM shared parameter text, use the Revit-API class DefinitionFile to get the DefinitionGroup, and iterate through the DefinitionGroup to build a list of PM instances.

[0031] S36. Based on the Revit-API class FamilyMaster, iterate through the list of PM instances and determine whether the current family type exists in the list of PM instances:

[0032] If so, the PM data value of the PM data item is directly assigned to the current family type, and the process proceeds to step S37.

[0033] If not, create a new family type that is the family type of the current family type and assign the PM data value, and proceed to step S37;

[0034] S37. Based on the PM data values, sort the PM data items of the family according to the rules to complete the batch addition of PM parameters.

[0035] The beneficial effects of the above-mentioned further solutions are: optimizing algorithms and strategies based on the characteristics of data centers, improving processing speed and efficiency, reducing repetitive tasks, improving data processing accuracy, and increasing processing speed.

[0036] Further: In step S3, the method by which the PM parameter synchronization module updates PM data items in standard format and with fixed GUIDs is as follows:

[0037] A31. Obtain the PM encoding set and construct a hash table of family types and PM classes;

[0038] A32. Traverse the PM code set and use the get_arameter method to find the PM data key in the family identifier data and the corresponding PM data key in the PM shared parameter text. If the two are the same, delete it and form a key-value pair with the PM data key in the PM shared parameter text and the value corresponding to the PM data key in the family identifier data as a new PM data item and store it in the PM hash table.

[0039] A33. Use the FamilyManager class of the Revit API to obtain the FamilyTypeSet of the deleted PM codes, and iterate through the FamilyTypeSet to match the PM class hash table. Use the Set method of the FamilyManager class to add the PM codes in the hash table to the parameter table of the current family type in turn, thus completing the update of PM data items in standard format and fixed GUID.

[0040] The beneficial effects of the above-mentioned further solutions are: deep integration with Revit software, effectively solving the problem of data confusion (such as different columns for the same type of data) that occurs when generating schedules due to different GUIDs of family parameter PM data items entered by different BIM engineers.

[0041] Further: In step S3, the method by which the family type deletion module clears all family types is as follows: traverse the FamilyTypeSet class of the Revit API, and use the DeleteCurrentType method of the FamilyManager class to clear all family types and restore the default state.

[0042] Further: In step S3, the method by which the family parameter deletion module clears all parameters of a family is as follows: the family parameter table is obtained using the FamilyManager class method GetParameters, and all parameters of the family are cleared using the RemoveParameter method to restore the default state.

[0043] Further: In step S3, the PM data deletion module obtains the matching PM data item in the current family parameter table and deletes it by: obtaining the PM code set, traversing the PM code set, using the get_Parameter method of the FamilyParameter class of the Revit API to obtain the matching PM data item in the current family parameter table and deleting it.

[0044] The beneficial effects of this invention are as follows:

[0045] 1. Customizable Functionality: Add, synchronize, and delete family names and parameters of custom Revit families according to the data organization format of the PM, to meet the family requirements of data center construction;

[0046] 2. Faster processing speed: Algorithms and strategies are optimized for the characteristics of data centers to improve processing speed and efficiency, reduce repetitive tasks, and improve data processing accuracy;

[0047] 3. Improved compatibility: This invention's plugin can be deeply integrated with Revit software, effectively solving the problem of data confusion (such as different columns for the same type of data) that occurs when generating schedules due to different GUIDs of family parameter PM data items entered by different BIM engineers. Attached Figure Description

[0048] Figure 1 This is a schematic diagram of the family parameter management system and methods in Revit.

[0049] Figure 2 This is a flowchart of a Revit-based family parameter management method. Detailed Implementation

[0050] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0051] like Figure 1 As shown, in one embodiment of the present invention, a family parameter management system and method in Revit are provided, including: a PM parameter addition module, a PM parameter synchronization module, a family type deletion module, a family parameter deletion module, and a PM data deletion module;

[0052] The PM parameter adding module is used to add PM parameters in batches;

[0053] The PM parameter synchronization module is used to update PM data items in standard format and with fixed GUIDs;

[0054] The family type deletion module is used to clear all family types and restore the default state.

[0055] The family parameter deletion module is used to clear all parameters of a family and restore it to its default state;

[0056] The PM data deletion module is used to obtain the matching PM data item in the current family parameter table and delete it.

[0057] like Figure 2 As shown, in one embodiment of the present invention, a family parameter management method for a family parameter management system in Revit is provided, comprising the following steps:

[0058] S1. Establish PM shared parameter text and plugin text boxes, and formulate a coding system that conforms to PM data items;

[0059] The PM data item includes a PM data key and a PM data value;

[0060] S2. Based on the coding system, write a PM data class using the C# language based on the Revit API;

[0061] S3. Based on the PM data class, write the PM parameter addition module, PM parameter synchronization module, family type deletion module, family parameter deletion module, and PM data deletion module;

[0062] S4. Based on the family parameter management objectives, family parameters are managed through the PM parameter addition module, PM parameter synchronization module, family type deletion module, family parameter deletion module, and PM data deletion module.

[0063] In step S3 of this embodiment, the method for the PM parameter adding module to add PM parameters in batches is as follows:

[0064] S31. Input the required PM data items into the plugin text box and retrieve the PM data items from the plugin text box;

[0065] S32. Perform PM data item rule judgment on the acquired PM data items:

[0066] If the obtained PM data items meet the PM data item rules, proceed to step S33;

[0067] If the obtained PM data items do not meet the PM data item rules, clear the plugin text box, pop up a message "Please enter PM data items that meet the rules", and return to step S31;

[0068] S33. Configure the naming rules for the family types of PM data that satisfy the PM data item rules, perform batch modification of family type names by previewing the naming rules, and generate a family type data set that satisfies the uniqueness of type names by traversing.

[0069] S34. Traverse the family identifier data within the family type data set, and determine whether its material number exists and whether the GUID generated by the management system is equal to the existing GUID:

[0070] If so, proceed to step S35;

[0071] If not, update the PM data items with standard format and fixed GUID. After the update is completed, return to step S31.

[0072] S35. Read the PM shared parameter text, use the Revit-API class DefinitionFile to get the DefinitionGroup, and iterate through the DefinitionGroup to build a list of PM instances.

[0073] S36. Based on the Revit-API class FamilyMaster, iterate through the list of PM instances and determine whether the current family type exists in the list of PM instances:

[0074] If so, the PM data value of the PM data item is directly assigned to the current family type, and the process proceeds to step S37.

[0075] If not, create a new family type that is the family type of the current family type and assign the PM data value, and proceed to step S37;

[0076] S37. Based on the PM data values, sort the PM data items of the family according to the rules to complete the batch addition of PM parameters.

[0077] The beneficial effects of the above-mentioned further solutions are: optimizing algorithms and strategies based on the characteristics of data centers, improving processing speed and efficiency, reducing repetitive tasks, improving data processing accuracy, and increasing processing speed.

[0078] In this embodiment, the method by which the PM parameter synchronization module updates PM data items in standard format and with fixed GUIDs in step S3 is as follows:

[0079] A31. Obtain the PM encoding set and construct a hash table of family types and PM classes;

[0080] A32. Traverse the PM code set and use the get_arameter method to find the PM data key in the family identifier data and the corresponding PM data key in the PM shared parameter text. If the two are the same, delete it and form a key-value pair with the PM data key in the PM shared parameter text and the value corresponding to the PM data key in the family identifier data as a new PM data item and store it in the PM hash table.

[0081] A33. Use the FamilyManager class of the Revit API to obtain the FamilyTypeSet of the deleted PM codes, and iterate through the FamilyTypeSet to match the PM class hash table. Use the Set method of the FamilyManager class to add the PM codes in the hash table to the parameter table of the current family type in turn, thus completing the update of PM data items in standard format and fixed GUID.

[0082] In this embodiment, in step S3, the method by which the family type deletion module clears all family types is as follows: iterate through the FamilyTypeSet class of the Revit API, and use the DeleteCurrentType method of the FamilyManager class to clear all family types and restore the default state.

[0083] In this embodiment, in step S3, the method by which the family parameter deletion module clears all parameters of a family is as follows: the family parameter table is obtained using the FamilyManager class method GetParameters, and all parameters of the family are cleared using the RemoveParameter method to restore the default state.

[0084] In this embodiment, in step S3, the PM data deletion module obtains the matching PM data item in the current family parameter table and deletes it by: obtaining the PM code set, traversing the PM code set, using the get_Parameter method of the FamilyParameter class of the Revit API to obtain the matching PM data item in the current family parameter table, and deleting it.

[0085] In the description of this invention, it should be understood that the terms "center," "thickness," "upper," "lower," "horizontal," "top," "bottom," "inner," "outer," and "radial," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying the relative importance or the number of technical features implicitly specified. Therefore, a feature defined by "first," "second," and "third" may explicitly or implicitly include one or more of that feature.

Claims

1. A method for managing family parameters, based on the family parameter management system in Revit, characterized in that, Includes the following steps: S1. Establish PM shared parameter text and plugin text boxes, and formulate a coding system that conforms to PM data items; The PM data item includes a PM data key and a PM data value; S2. Based on the coding system, write a PM data class using the C# language based on the Revit API; S3. Based on the PM data class, write the PM parameter addition module, PM parameter synchronization module, family type deletion module, family parameter deletion module, and PM data deletion module; S4. Based on the family parameter management objectives, manage family parameters through the PM parameter addition module, PM parameter synchronization module, family type deletion module, family parameter deletion module, and PM data deletion module. In step S3, the method for batch adding PM parameters by the PM parameter adding module is as follows: S31. Input the required PM data items into the plugin text box and retrieve the PM data items from the plugin text box; S32. Perform PM data item rule judgment on the acquired PM data items: If the obtained PM data items meet the PM data item rules, proceed to step S33; If the obtained PM data items do not meet the PM data item rules, clear the plugin text box, pop up a message "Please enter PM data items that meet the rules", and return to step S31; S33. Configure the naming rules for the family types of PM data that satisfy the PM data item rules, perform batch modification of family type names by previewing the naming rules, and generate a family type data set that satisfies the uniqueness of type names by traversing. S34. Traverse the family identifier data within the family type data set, and determine whether its material number exists and whether the GUID generated by the management system is equal to the existing GUID: If so, proceed to step S35; If not, update the PM data items with standard format and fixed GUID. After the update is completed, return to step S31. S35. Read the PM shared parameter text, use the Revit-API class DefinitionFile to get the DefinitionGroup, and iterate through the DefinitionGroup to build a list of PM instances. S36. Based on the Revit-API class FamilyMaster, iterate through the list of PM instances and determine whether the current family type exists in the list of PM instances: If so, the PM data value of the PM data item is directly assigned to the current family type, and the process proceeds to step S37. If not, create a new family type that is the family type of the current family type and assign the PM data value, and proceed to step S37; S37. Based on the PM data values, sort the PM data items of the family according to the rules to complete the batch addition of PM parameters; The family parameter management system in Revit includes: PM parameter addition module, PM parameter synchronization module, family type deletion module, family parameter deletion module, and PM data deletion module; The PM parameter adding module is used to add PM parameters in batches; The PM parameter synchronization module is used to update PM data items in standard format and with fixed GUIDs; The family type deletion module is used to clear all family types and restore the default state. The family parameter deletion module is used to clear all parameters of a family and restore it to its default state; The PM data deletion module is used to obtain the matching PM data item in the current family parameter table and delete it.

2. The family parameter management method according to claim 1, characterized in that: In step S3, the method by which the PM parameter synchronization module updates PM data items in standard format and with fixed GUIDs is as follows: A31. Obtain the PM encoding set and construct a hash table of family types and PM classes; A32. Traverse the PM code set, use the get_Parameter method to find the PM data key in the family identifier data and the corresponding PM data key in the PM shared parameter text. If they are the same, delete it, and form a key-value pair with the value corresponding to the PM data key in the PM shared parameter text and the PM data key in the family identifier data as a new PM data item, and store it in the PM hash table. A33. Use the FamilyManager class of the Revit API to obtain the FamilyTypeSet of the deleted PM codes, and iterate through the FamilyTypeSet to match the PM class hash table. Use the Set method of the FamilyManager class to add the PM codes in the hash table to the parameter table of the current family type in turn, thus completing the update of PM data items with standard format and fixed GUID.

3. The family parameter management method according to claim 1, characterized in that: In step S3, the method by which the family type deletion module clears all family types is as follows: iterate through the FamilyTypeSet class of the Revit API, and use the DeleteCurrentType method of the FamilyManager class to clear all family types and restore the default state.

4. The family parameter management method according to claim 1, characterized in that: In step S3, the method by which the family parameter deletion module clears all parameters of a family is as follows: the family parameter table is obtained using the FamilyManager class method GetParameters, and the family parameters are cleared using the RemoveParameter method to restore the default state.

5. The family parameter management method according to claim 1, characterized in that: In step S3, the PM data deletion module obtains the matching PM data item in the current family parameter table and deletes it by: obtaining the PM code set, traversing the PM code set, using the get_Parameter method of the FamilyParameter class of the Revit API to obtain the matching PM data item in the current family parameter table, and deleting it.

Citation Information

Patent Citations

  • Method and system for automatically adding BIM model group file information

    CN106126279A

  • A model database system based on Revit

    CN109815350A