BIM Consulting | BIM Solutions > Focus on HOW

BIM-Professional (Technical University of Munich, Germany)
buildingSMART International Qualification



CBM-Attribute Manager-Compare tool, click on the image to enlarge it

CBM-Attribute Manager-Compare


This is not about how to keep things tidy. This is about how to fix them when they are not.


CBM-Attribute Manager-Compare is an advanced Python/xml tool for the BIM manager that helps to find even the deepest differences between any number of xml Attribute files and can output a to-do list in Excel for the team to resolve them.

If you wish to learn more about the way Archicad manages attributes, you must watch this Archintensive Video, which, by the way, inspired me to write the present tool: The Dark Side of Attribute Chaos, 2023, by Scott J. Moore of Fulton Trotter. At minute 44:09 Scott shows us this diagram:

The Dark Side of Attribute Chaos, 2023, by Scott J. Moore of Fulton Trotter

This complex attribute management means that keeping multi-file projects synchronised can be very difficult: Attributes tend to mismatch relentlessly at every point of contact with other files, hotlinks, etc., and you will have to search for and resolve discrepancies over and over again, or accept uncontrollable display and/or data problems.

The problem is, how do I detect these differences? Archicad has no built-in tool for this. The present tool helps you in this sense.

These are the possible mismatches:

Note: As of Archicad 27, it is not possible to solve mismatches programmatically using Python, the support is almost non-existent. The present tool is in fact an xml utility and not an Archicad utility and can only be used to compare xml files. At the moment, fixing attribute problems can only be done manually in Archicad.

Installation


This tool doesn't need Archicad: It operates on the xml files generated by the Attribute Manager. I tested on files produced by Archicad 26 but I think it should work also on previous versions.

Downloads
Under construction

Warning! At the moment the downloaded app is a beta version with limited access to few testers. Request a beta version if you wish to partecipate to the development, send a mail at "info at cad-bim-manager.com"

Usage




1 - Export the attribute files in a dedicated folder:

  • Create a dedicated folder where to store all attribute files. The tool will parse all eligible xml files within, so make it really dedicated.
  • For each archicad file to be compared, open the Attribute Manager from Options > Element Attributes > Attribute Manager
  • Click on the All tab
  • Select all attributes in the left list
  • Click on By Index: the list appears on the right
  • Click on the Export button (tiny page icon with exiting arrow)
  • Save the xml file into the dedicated folder


2 - Start the tool choosing a source file:

The chosen source file resides in the dedicated folder and represents the correct attributes. The tool will compare all eligible xml files within the dedicated folder to the source file.

The tool can parse hundreds of megabytes in few seconds. In the lower status bar you can follow the performed actions.

  • Click the button Choose source file...:
    This file will be used as source for correct attributes: all other files in the dedicated folder will be compared against this file

Choose the source file


  • Click the checkbox Cleaning up AddPars (optional):
    AddPars files ares automatically generated xml files describing singular materials and zone attributes. Every time that you save attribute files into the dedicated folder, Archicad will create "AddPars" files and put them into the AddPars folder. If equally named files exists already, Archicad will make a duplicate adding an 'X' to the name, not only in the file name, also for the attribute name. This will cause a huge lot of false issues: every material name will be unique across all files.

    During the process of finding and fixing attribute issues, you will want to re-export many times and restart the tool, to see the results of your changes. The AddPars folder will get rather large in a very short time. For example, in my test project I reach 25MB re-saving just 4 times the attribute files.

    You must activate this option every time you load a new set of attribute files in order to consolidate all AddPars duplicates.

Proliferation of AddPar files



Option to consolidate AddPar files



3 - Filter and sort the results:

Upon finishing, a list of attribute issues will appear and you can examine them one by one and decide how to resolve them. Again, the tool finds issues, but resolving them can only be done manually from within Archicad.

The list might be huge, it is not unfrequent that you'll see thousands of issues. In order to resolve them, you might want to filter them, hide some or mark them somehow as fixed.

You can filter and sort the results in many ways, both globally, by disabling entire attribute types, or singularly, by hiding singular items in the list.

  • Attribute Types:
    • Composites, Building Materials, Fills, etc.
  • Issue Types:
    • Name mismatch:
      attribute index as in the source file, name different in the comparison file, there are two cases
      1. without implicit duplication:
        Example: {source file: index 1, name "A"} - {comparison file: index 1, name "B"}
        Name "A" does not exist elsewhere in the comparison file (no duplication).
        This happens upon renaming attributes in one file, while not re-introducing them somehow through hotlinks or else.
      2. with implicit duplication:
        Example: {source file: index 1, name "A"} - {comparison file: index 1, name "B"} - {comparison file: index 2, name "A"}
        Name "A" also exists in the comparison file under a different index (duplication).
        This happens if you hotlink the source file into the comparison file after renaming attributes only in the comparison file. The originally named attribute will sneak back into the first available index, because the original one is "busy" with the new name. For the sake of clarity, this type of problem won't show up in the list, as it will be caught elsewhere as an index problem.
    • Index mismatch:
      attribute name as in the source file, index different in the comparison file
      Example: {source file: index 1, name "A"} - {comparison file: index 2, name "A"}
    • Missing in source:
      Attribute name and index not present in the source file
      Example: {source file: index ?, name ?} - {comparison file: index 1, name "A"}
    • Missing in file:
      Attribute name and index present in source file, but not in the comparison file
      Example: {source file: index 1, name "A"} - {comparison file: index ?, name ?}
    • Content mismatch:
      Deep attribute mismatch such as attributes of skins/components: fill thickness, skin type, pen, etc.

      A note about Content mismatch: parsing precisely this kind of issues would be too time consuming. There is a simplified but very fast algorithm comparing nested attributes side by side. This might output senseless statements whenever differences are large, see image on the right.
      • Ignoring items:
        Helps degarbaging the results, which can otherwise output a huge number of irrelevant positives you are most likely not interested upon.
        • energy data:
          thermal conductivity, density, heat capacity, embodied carbon, embodied energy.
        • technical Archicad things:
          guid, time stamps, file and image data, etc.

          A note about guids: they change constantly every time the xml files are re-saved and don't seem to be applied by Archicad itself upon replacements using the built in Attribute Manager. They can thus be fully ignored.
  • Frequency:
    • How often an issue description appears in the list. Click on the column header to sort by frequency

Frighteningly large list attribute differences.




Filtering results.

Example: we chose as source file 'Attributes BT01'. We show only lines. This source file contains a line attribute named 'Volllinie'. This line attribute exists in file 'Attributes BT03" but has index 41, while it should be 46.


Content mismatch.

Example: a composite has the same name and index across source and comparison file, but shows a deep issue within its components, some don't have the same thickness. As a consequence, also the overall thickness mismatches.




Sorting results.

Example: sort by frequency clicking on the last column header. In the screenshot a layer index issue appears 76 times.



  • Right-clicking on a row in the list of issues allows to perform some row commands, this simplify greatly resolving the issues:
    • Mark as done/undone: marks/unmarks the row in gray
    • All Undone: unmarks all rows restoring their color
    • Show most frequent: shows only the most frequent issue(s)

    Right-click a row and choose a command:
    • Hide row[s]: hide the selected row(s)
    • Hide this file name: hide all rows with the same file name
    • Hide this attribute type: hide all rows with the same attribute type
    • Hide this attribute index: hide all rows with the same attribute index
    • Hide this attribute name: hide all rows with the same attribute name
    • Hide this description: hide all rows with the same description

    • Show all: restore full row visibility
    • Show only this file name: show only rows with the same file name
    • Show only this attribute type: show only rows with the same attribute type
    • Show only this attribute index: show only rows with the same attribute index
    • Show only this attribute name: show only rows with the same attribute name
    • Show only this description: show only rows with the same description

    • Copy: save row data into the scrapbook
    • Reload folder: reloads all xml files in the dedicated folder. You can use this to reload changed xml files instead of re-launching the tool. This will preserve all markups.

Right-click commands: mark selected row as Done (grayed).


Right-click commands: show all issues with this description



4 - Optionally: Export as Excel:

You can save the results as Excel file and share it with the collaborators involved in resolving the issues.

- On the left, you see the list of attributes names according to the chosen source file.
- On the right, you see the list of files in the dedicated folder.
- Attributes that are in sync across the analysed files will show a gray x.
- If there is a difference, this will show with a red background.


  • Click the button Export as Excel, save in a relevant place
  • Open the Excel file, there is a sheet for every attribute set enabled in the dialog
  • Eventually expand the columns by double-clicking on them

Excel output.

Example: we chose as source file 'Attributes BT01'. We show here the materials sheet. This source file contains a material attribute named 'A-Ausgleichdämmung'. This material attribute exists in file 'Attributes BT03" but is called 'A-Dämmung, Ausgleich'.


Knowledge: Resolve Attribute Issues in Archicad:

As mentioned above, the tool helps to find the problems, however, they can only be solved in Archicad. Since complex attributes - such as composites - are associated with primitive ones - such as pens and lines - it is essential to resolve the latter first.

The main bulk of the issues are Content issues. These are hidden problems in deep parts, such as mismatches in composite skins. If there is a mismatch in a line, it will cause an issue in any skin or profile that uses it, not just the line itself.

Attribute issues must thus be resolved in this sequence:

  1. Pens:
    Used by almost everything
  2. Lines, Fills:
    Used by Materials, Composites and Profiles
    So once the pens, lines and fills have been resolved, a huge number of dependent mismatches will also be resolved. You will then want to save all the attribute files again and restart the tool cleaning up AddPars, see what is left.
  3. Surfaces:
    Used by Building Materials and Profiles (when the option Override Surface is on)
  4. Building Materials:
    Used by Composites
  5. Profiles and Composites:
    Use all attributes listed above

Within the singular attribute types, you will want to follow this sequence:

  1. Unused:
    Remove any attributes that are unused and certainly incorrect before saving the attribute files. If necessary, an attribute file can be loaded from your main template to track the overall deviation from normal standards.
  2. Name mismatch with implicit duplication:
    Example: {source file: index 1, name "A"} - {comparison file: index 1, name "B"} - {comparison file: index 2, name "A"}
    Resolving this, resolves also many index issues. The best way to resolve this type of mismatch is as follows:
    1. Delete:
      In the attribute manager, find the duplicated attribute, it will be the one with the same name as in the source file, but different index. Click on "delete"
    2. Replace:
      Replace with the attribute with the same index as in the source file, but different name
    3. Rename:
      Now you can rename the attribute to match the source file.
  3. Index mismatch: resolving this resolves lots of following name issues. Resolve all index issues, then re-save the attribute files and re-launch the tool cleaning up AddPars. You can either restart the tool or right-click on the table and choose Reload folder.
  4. Name mismatch without implicit duplication:
    Example: {source file: index 1, name "A"} - {comparison file: index 1, name "B"} Resolving this, resolves a large part of content mismatch.
  5. Content mismatch:
    Not all of it is relevant, evaluate


Associated attributes.

Example: this composite contains materials, surfaces, fills, lines, etc. It will always show problems as long as one or more of the associated attributes are different from the source file..