We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2024-01-16 04:32 PM - last edited on 2024-09-26 01:54 PM by Doreena Deng
Hi!
I found this DIALOG option in the GDL Reference. Is this something so the user can manually search for a text file?
thanks a lot in advance!
Jeroen
2024-01-17 02:20 AM
Cannot help you, but just clarifying, when you say "manually search for a text file" you mean if the user does not know the name of a file, is there a way to access a file browser?
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2024-01-17 09:12 AM
Hi Lingwisyer,
That is correct, can the user open the object and click on something so the file-browser appears and he can select a file from the computer,
thanks!
Jeroen
2024-01-17 09:22 AM
Yes, Jeroen there appears a file browser. I used this in the past in some objects, but it does not work optimal.
E.G. When you have an object with this keyword and the linked text file is missing, the file-browser-dialog appears every time you open the file. Today I mostly use the LIBRARY keyword instead.
There is another way to use a filebrowser in GDL: The Filemanager I/O Addon.
2024-01-17 11:18 AM
Hi Joachim,
Thanks!
Do you have a code snippet of this Filemanager GDL. I'm having a hard time reading the manual,
Thanks in advance!
with kind regards,
Jeroen
2024-01-17 11:46 AM
MASTER-SCRIPT
DIM bitmap[]
folder= OPEN ("FileMan", verz, "FILES, DIALOG")
linecont=1
n = INPUT (folder, 0, 0, datName)
WHILE n=1 DO
bitmap[linecont]=datName
linecont=linecont+1
n = INPUT (folder, 0, 0, datName)
ENDWHILE
CLOSE folder
!PARAMETER-SCRIPT
VALUES "filename" bitmap
The script shown stores the file names read from a directory selected via DIALOG in the "bitmap" array in the master script.
The WHILE loop searches for files until n=0 (i.e. no more files are found).
In the parameter script, the array transfers the values to a value list of a text parameter to be defined with the designation "filename".
With this script you have access to any files that you want to place as a bitmap texture on an image object, for example.
The "verz" parameter must also be created as a text type so that its change gives you access to the selection dialog box for the folders.
From: https://www.selfgdl.de/addons/filemanager-io/input-3/
2024-01-17 11:56 AM
Thanks a lot!!