License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

GDL checking libraries

Anonymous
Not applicable
is it possible to have an object check for certain objects in the library? I would like my object 'X' to check to see if objects 'Y' and 'Z' are loaded before doing executing part of the GDL script... kinda like a check for a control statement

If [object is loaded] Then
this

If [object is loaded] Then
that
9 REPLIES 9
Rob
Graphisoft
Graphisoft
I am afraid that is not possible mate. However I will wait for while if someone would have any good idea how to do that before posting this as a wish.
::rk
Anonymous
Not applicable
Depends what you are trying to do really. If you call another object like a macro you will get an error message if the macro is not there. Any object can be a macro. You could but a tag in 'Y' and 'Z', call them in 'X', get the value of the tag to put in your if statement. But if 'y' and 'Z' aren't there at all you will get an error message, there may be a way around it I am unaware of.

Julia
Laszlo Nagy
Community Admin
Community Admin
Check the File Manager I/O possibilities in AC 9 Help at:

GDL Reference Guide > Miscellaneous > GDL File Manager I/O Add-On

It says you can open a folder and scan for file names.
You can read file names int ovariables and you can check these variables against your file names.
If they are found your GDL Script gets executed.
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
Anonymous
Not applicable
Thanks! ill try to do the file scanning. ill make sure to post my results.

-- Matthew Peychich
Anonymous
Not applicable
File scanning works wonders for doing this. simply set up the OPEN function and then when the user first uses the object or the original file path is invalid, the user will be prompted with a dialog box that allows them to browse for the new path. then using a check on if the file is found you can control what params the user sets. Thanks laszlonagy for the idea, it works great!
Laszlo Nagy
Community Admin
Community Admin
Great! And thanks for posting back the result, now I know it works. I might use such a thing in the future.
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
Rob
Graphisoft
Graphisoft
I think, it is a rather 'half-cooked' solution. It's not a cross-platform solution and based on 'physical' path of the file. What about searching in the AC internal database of LOADED libraries? That is what I would expected from such a add-on. That would tell me whether my object that I am looking for is loaded in active libs or has to be loaded in (optional dialog box). I am putting this in the GDL wish list as well.
::rk
Laszlo Nagy
Community Admin
Community Admin
Sounds good as a wish.
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
Anonymous
Not applicable
Rob wrote:
I think, it is a rather 'half-cooked' solution. It's not a cross-platform solution and based on 'physical' path of the file. What about searching in the AC internal database of LOADED libraries? That is what I would expected from such a add-on. That would tell me whether my object that I am looking for is loaded in active libs or has to be loaded in (optional dialog box). I am putting this in the GDL wish list as well.


it would be a wish. as to the cross platform issue, it is. the file io scans for the folder defined as the one containing the files specified. if it resides at C:\libraries\parchtools on my pc and someplace on my mac. when i move the project to the mac it will recognize that the defined file system location is invalid and will prompt the user to browse for it. the system in its bare for iin factct portable however you would need to have an OS check if you were to run a complex fs operation due to the path separatoror differences. ( '/' vs. '\')

so long as the files being checked reside that the defined root of the objects path, you can use it on all platforms. when you start saying it resides at root\folder1\folder2 and root/folder1/folder2 you obviously would have problems. an actual way to access the database of loaded libraries would be nice and can be done with an add on but not from just GDL