OK, I tested it and it works like this.
1. Create your GDL Object.
2. Create a folder on your hard drive (e.g. "Version 1") and save the Object into that folder under a name (e.g. "Object v1.gsm"). Do not save it into the Embedded Library.
3. Link the folder ("Version 1") containing the Object to your Project.
4. Place the Object ("Object v1.gsm").
Now, for its duplicate do the following. This is the critical part for preserving its Main ID:
5. Create another folder on your hard drive (e.g. "Version 2").
6. Copy and Paste the "Object v1.gsm" object from the "Version 1 "folder to the "Version 2" folder. Now you will have a file named "Object v1.gsm" in both folders.
7. Rename the object in "Version 2" folder to something else like "Object v2.gsm".
Renaming a GDL Object in the File system DOES NOT modify its Main ID, so ARCHICAD will still consider it the same object, just a different version of it.
(Using the Save As command from ARCHICAD to save a different version of the file DOES change its Main ID so from that point on it is a different object to ARCHICAD.)
So if you want to create a new version of a GDL Object, DO NOT use the Save As command. Copy-Paste it in the File System and then Rename it as needed. That way the new version will stay the same Object to ARCHICAD.
Now, all you have to do from this point on is to link that folder in the Library Manager that you need.
Need version 1 of the object? Link the "Version 1 "folder containing the "Object v1.gsm" object.
Need version 2 of the object? Link the "Version 2 "folder containing the "Object v2.gsm" object.
You will see that depending on which folder you link, the placed object instance WILL change to "Object v1.gsm" or "Object v2.gsm".
The above also explains why you cannot save the versions into the Embedded Library. If you had both versions of the file in the Embedded Library, they both would be loaded all the time, creating a "Duplicate Object" conflict and it would be up to luck which version ARCHICAD would be using and displaying. By saving them to different folders on your hard drive and always loading the corresponding folder you control which version of the object ARCHICAD will use.
Of course, if you need further versions of the same object, you just need to repeat steps 5.-7.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27