GDL
About building parametric objects with GDL.
SOLVED!

Find Library Part by GUID

Is there a way to find out which library part has a particular known GUID?

James Murray

Archicad 27 • Rill Architects • macOS • OnLand.info
1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Marc, I think James is not refering to the GUID of the placed instance, but rather of the object itself.

It is used by Archicad to identify an object. If no GUID matches all instances will report as missing. The GUID has also a important part with macro calls and migration.

This object-level GUID will be assigned the first time the object is created and should not be changed later due to the reasons stated above. So even if you rename an object it will still work, meaning this GUID is pretty permanent.

You can find the GUID in the "libpartdata.xml" file generated when converting to HSF.

In there in the "Identification" node is the "MainGUID".

I don't know any way to get to this GUID easily, or even finding the corresponding object.

I am now in the habit of converting the whole LCF to HSF with every new Archicad version. I can then do a full text search over all files for a GUID. Not end user friendly tho 😄

Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»

View solution in original post

6 REPLIES 6
Marc H
Advisor

Did you try creating a schedule including the Unique ID?  It looks like the GUID field. 🤔

“The best thing about the future is that it comes one day at a time.” - Abraham Lincoln

AC27 USA on 16” 2019 MBP (2.4GHz i9 8-Core, 32GB DDR4, AMD Radeon Pro 5500M 8G GDDR5, 500GB SSD, T3s, Trackpad use) running Sonoma OS + extended w/ (2) 32" ASUS ProArt PAU32C (4K) Monitors
lszatmary
Contributor

Maybe this solution is not so user-friendly, but can work:

-(if necessary) extract the lcf by AC's File/Libraries and Objects/Extract a Container.. command

- convert the gsms into xmls, by LP_XMLConverter.exe, which can be found in the AC's root folder. Drop the exe into a command line and then you have to set the commands to be able to use it. By putting " help" after the exe, you can get help, but basically you have to use "l2x" and the you have to add the path of the source (gsms folder) and the destination folder. Something like this: 

 

lszatmary_1-1672919589039.png

 

- then you can search for the IDs in the xmls using a text editor. 

László Szatmáry
Content Developer at Walter AEC
Budapest, Hungary
Solution

Marc, I think James is not refering to the GUID of the placed instance, but rather of the object itself.

It is used by Archicad to identify an object. If no GUID matches all instances will report as missing. The GUID has also a important part with macro calls and migration.

This object-level GUID will be assigned the first time the object is created and should not be changed later due to the reasons stated above. So even if you rename an object it will still work, meaning this GUID is pretty permanent.

You can find the GUID in the "libpartdata.xml" file generated when converting to HSF.

In there in the "Identification" node is the "MainGUID".

I don't know any way to get to this GUID easily, or even finding the corresponding object.

I am now in the habit of converting the whole LCF to HSF with every new Archicad version. I can then do a full text search over all files for a GUID. Not end user friendly tho 😄

Lucas Becker | AC 27 on Mac | Graphisoft Insider Panelist | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text | My List of AC shortcomings & bugs | I Will Piledrive You If You Mention AI Again |

POSIWID – The Purpose Of a System Is What It Does /// «Furthermore, I consider that Carth... yearly releases must be destroyed»
Jochen Suehlo
Moderator

You can find the GUID of the object itself also the following way:
- Open the object in Archicad and open a script window

- Go to menu "Edit >> Insert Own GUID"

But this way you cannot search for a GUID, except you only want to search in some custom made lib parts, then you can give every object a parameter with its own GUID and search with the interactive schedule.

Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
Peter Baksa
Graphisoft
Graphisoft

How did you get to know the GUID? Did AC report it without writing the library part name?

 

If it is one of the built-in subtypes, you need to include the source of the built-in library in the search mentioned by others. Either unpack BuiltInLibraryParts.lcf from AC root folder or use the source code from the Library Developer Toolkit 

When you already have the source code anyway, the vscode-gdl plugin can open libparts by GUID with the Go to symbol in workspace feature (ctrl-t).

Péter Baksa
Software Engineer, Library
Graphisoft SE, Budapest

Thanks, Peter, this was due to misleading feedback from GSNA tech support, where they were describing element unique IDs as object IDs. So, a wild goose chase, but searching after converting to XML did the job in principle. 

James Murray

Archicad 27 • Rill Architects • macOS • OnLand.info