BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

How to know what the exact GUID of a Library Object is

automata
Graphisoft
Graphisoft
With the growing complexity of object libraries, a method of tracking Library parts and their revised versions was developed for ARCHICAD 8. In short, two GUIDs - internally coded 16-byte numbers -, in combination with the object (file) name, identify each object. Usually this composition is visualized as a 77-character long special string. This identifier is called the Library Part ID and it helps ARCHICAD track the iterations of an object, as it is revised or improved.

The GUID

The GUID consists of two parts, each 36 characters long. The first 36 characters represent the "Main ID" and the last 36 characters represent the "Revision ID".
wp-content_uploads_archicadwiki_guid--guid.jpg

 

  • The Main ID is created when the library part is saved for the first time. It is also modified if the library part is resaved using the "Save as" command.
  • The Revision ID is also created when the library part is saved for the first time but it is modified if the library part is resaved using the "Save" command.

Library Part Identification

When placing an object in ARCHICAD it refers the GUID before considering the name. When loading a library, ARCHICAD uses the following hierarchical criteria for matching loaded library parts to objects already placed into the project:
  1. It tries to get an exact mach of both parts of the GUID
  2. Failing that, it tries to match the first part of the GUID, which is the Main ID
  3. In ARCHICAD versions 8-11, if a match cannot be found for the Main ID, then it tries to match by library part name. (See ARCHICAD 12 changes at the bottom of this article)
In case of Library Parts coming from versions earlier than ARCHICAD 8, there was no such thing as GUID. So when such a Library Part is encountered in the file, ARCHICAD will fill out its GUID with zeros. It also knows that it does not have to deal with the first 2 steps of the identification procedure and tries to match it by name.

Example

Let us say we create a new Library Part. We choose the 'Model Element' Library Part for its Template. The GUID of this Template is {103E8D2C-8230-42E1-9597-46F84CCE28C0}-{CE15CD1D- E6C8 -4C6B-B919-C4E367D3983A}. We save the Library Part under the name of 'Chair 1.gsm'. Its GUID becomes {5E258C98-C74E-43E6-9F8A-894F2F9A3E22}-{9AD91219-5A87-4C64-8F32-84CB4DFB5E05}.
 
As you can see this is completely different from the previous number. If we make some modifications on it, save it, then check its GUID, it will become {5E258C98-C74E-43E6-9F8A-894F2F9A3E22}-{ACFAA215-4B96-4CA2-9277-4C613AD50AC7. The MainID part of the GUID has not changed, but the RevisionID part has.
 
Now, if we resave this Library Part using the Save as... command of the File menu under the name of 'Chair 2.gsm', then its GUID will be {463F5328-53EC-4255-AC9F-614AB6B26C10}-{7521BF5D-66E3-4A62-8FD3-E5DFA4B245B7} it becomes a completely different GUID. It can happen that this new 'Chair 2.gsm' is renamed 'Chair 1.gsm'. This will not cause problems for ARCHICAD or the user for the following reason: First of all, neither Windows, nor Mac does not allow two identically named files in the same folder, so if you have two Library Part with the same name in your loaded Libraries, they will have to be located in two different folders.
 
If you loaded two Libraries, one with the original 'Chair 1.gsm' in it, and the other with the saved-as-Chair 2.gsm-renamed to Chair 1.gsm in it, ARCHICAD's Status Window would report to you the two Library Part under its 'Duplicate Names' section. This is because their names are the same, but their GUID is not. If you had two 'Chair 1.gsm' files in the loaded libraries - one the original, and another that was copied from it, then modified and saved (but not Saved as...) -, their MainID would stay the same, so they would be reported under the 'Duplicate Library Parts' section of the Status Window.
 
So, when two or more library objects with the same name are loaded, with the help of GUID ARCHICAD can tell if the parts are actually identical or if one of them is a different revision, or actually a totally different object.

How to know what the exact GUID of a Library Object is

The only place you can check an element's GUID is the Open Object by Subtype dialog. To access this dialog, you need to turn on the Edit GDL Library Parts Toolbar (alternatively, you can add the Open Object by Subtype command to your menu structure through Work Environment)
wp-content_uploads_archicadwiki_guid--1.jpg
wp-content_uploads_archicadwiki_guid--2.jpg
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
In the Subtype Hierarchy dialog, you need to find your object in the Subtype Hierarchy tree. Library Objects will be displayed with green color in the list.
wp-content_uploads_archicadwiki_guid--libpartselectsubtypedialog-2.png
 
 
 
 
 
 
 
 
 
 
 
 
If you are not sure where you would find the library part in the hierarchy, then you need to check which "template" it belongs to. To do this, open the library part for editing, and click the Select Subtype... button.
wp-content_uploads_archicadwiki_guid--libparteditingwindow.png
 
The Select Subtype...button of the Library Editor It will bring up the Subtype Hirearchy dialog. Note, the GUID you see here is not that of the edited Library Part, but the GUID of its parent element (template). In the below screen capture you can see that the selected element is not 'Armchair 01.gsm', but its direct parent element, 'Seating'. Its Name, Version, GUID and Location are shown.
wp-content_uploads_archicadwiki_guid--libpartselectsubtypedialog.png
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
You have to remember the 'path' of the library part in the subtype hierarchy, then go back to the Open Object by Subtype dialog to find out the GUID of your library part. If in any case there is a clash of GUIDs between Library Parts within loaded libraries, the Library Loading Report will notify you with a Duplicate Library Part alert. In this case, you will also see the GUID of the Library Parts involved.
wp-content_uploads_archicadwiki_guid--libraryloadingreport.png
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
The reverse is also true: if there is no alert displayed by the Library Loading Report after all libraries are loaded successfully, you can be sure there are no two Library Parts with the same GUID in your loaded libraries.

Library Loading Report

In particular, there are 4 different categories:
  1. Missing
  2. Duplicates (If in any case there is a clash of GUIDs between Library Parts within loaded libraries, the Library Loading Report will notify you with a Duplicate Library Part alert.)
  3. Duplicate Names (Only the names are identical)
  4. Multiple Versions (Only the Main ID is the same, but the Revision ID not)

How it works with Macros

Consider the example of a kitchen cabinet and a standard door. Both might call another object named "Knob" but the cabinet knob and the doorknob might be entirely different files. This situation could happen when third party developers and product manufacturers around the world are independently making thousands of GDL objects.
 
Because of the GUID, ARCHICAD can use a wide range of library parts without constraining GDL developers to using unique part names. This allows part names to be simple to understand by the user, and sophisticated enough under the hood for ARCHICAD to manage large and complex libraries. It also facilitates a new strategy to update placed library parts with new versions. (This point will be described in more detail below.)
 
When a Library Part's Scripts contain Macro calls, ARCHICAD checks if the macro with the specified macro name exists in the loaded libraries. If it does, it will include its GUID information in the Library Part calling it, when the Library Part is saved. So macro references are identified just as normal Library Objects: first by GUID, then by MainID, then by name. Let us say, you have a Library Part containing a macro call to a macro with a certain GUID.
 
Later another Library is loaded that contains a macro with the same name, but that macro has a different GUID. If the Library Object calling the macro is modified and saved, ARCHICAD will look in the loaded libraries for a macro with the same GUID. It will not find any. Then it will look for one with the same MainID. It will not find any. So it will look for a macro with the same name. It will find one, will take its GUID, and this GUID will be saved with the macro reference overwriting the previous value of the GUID value stored for that macro reference.
 
This means that you should not have several macros with the same name loaded with libraries, if you want to modify your Library Parts, because when the Library Part is saved, if it does not find a GUID match or a MainID match, it will take the first macro that matches the name and that will be a random selection beyond the control of the user. This same rule applies to any operation that result in Library Parts being changed and saved or updated.

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!