Text file input to gdl
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2008-05-08 10:51 PM
‎2008-05-08
10:51 PM
I have a text file with one letter in it and that file is sitting in the Arhicad Data Folder. I want to read that one letter and have it as a variable in my GDL program. I have been going round and round in circles by trying to follow information in the GDL help. Thank you in advance for any help.
Archicad V11
3 REPLIES 3
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2008-05-09 03:01 AM
‎2008-05-09
03:01 AM
Look in the GDL manual for the Text I/O functions. It is toward the end since it is an add-on/extension and not a core part of GDL. The manual can be a bit cryptic at times but it does list all the file handling procedures, commands, etc.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2008-05-09 06:35 PM
‎2008-05-09
06:35 PM
You should also check the other possibilities: one is DATA I/O and I think there is also an XML ability. Maybe that would serve you purpose better.
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-Ac28
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2008-05-11 09:51 PM
‎2008-05-11
09:51 PM
Hello,
Just put this in the master script;
ch1=OPEN("TEXT","Mytextfile.txt","SEPARATOR='\t',MODE=RO")
n=INPUT(ch1,1,1,value01, value02, value03, value04, value05)
CLOSE (ch1)
...so it reads a file named "Mytextfile.txt" from your Archicad Data folder.
This example takes in five values from the first row, starting from the first value.
'\t' means that values are separated with a tab which means the same as an Excel file
saved as a 'Tab separated text'.
Hope this helps.
Just put this in the master script;
ch1=OPEN("TEXT","Mytextfile.txt","SEPARATOR='\t',MODE=RO")
n=INPUT(ch1,1,1,value01, value02, value03, value04, value05)
CLOSE (ch1)
...so it reads a file named "Mytextfile.txt" from your Archicad Data folder.
This example takes in five values from the first row, starting from the first value.
'\t' means that values are separated with a tab which means the same as an Excel file
saved as a 'Tab separated text'.
Hope this helps.