Retrieving data with GDL Data Add-On

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-04-07 01:51 PM
2014-04-07
01:51 PM
I'm writing that:
z_name=""
z_number=""
rr= REQUEST ("Zone_relations", "", z_category_name, z_code, z_name, z_number)
file_name=z_name + ".txt"
ch=OPEN("DATA", file_name,"SEPARATOR='\t', MODE=RO, Library")
nr=INPUT(ch, z_number, 1, Cate1, Cate2, Cate3, Cate4, Cate5)
CLOSE ch
Any ideas? I'm tried to store the zone parameters in an array, but with the same result. The script works well when I'm writing manually the name of the file, but gives the error when I'm using the requested zone parameter.
Miquel
Capella & Garcia Arquitectura
AC18 - AC21, iMac 27" 3.1 Ghz Intel Core i7, 16GB Ram, OSX 10.13.1
Capella & Garcia Arquitectura
AC18 - AC21, iMac 27" 3.1 Ghz Intel Core i7, 16GB Ram, OSX 10.13.1
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-04-07 03:57 PM
2014-04-07
03:57 PM
Save the file anyway.
The problems with such scripts (requesting another object) is that inside GDL editor You do not have the requested file😉
Best Regards,
Piotr
The problems with such scripts (requesting another object) is that inside GDL editor You do not have the requested file
Best Regards,
Piotr

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-04-07 04:39 PM
2014-04-07
04:39 PM
I know it. To verify the functionality I have a placed object over every different zone. When I save the file, the placed objects misses its 2D.
Miquel
Capella & Garcia Arquitectura
AC18 - AC21, iMac 27" 3.1 Ghz Intel Core i7, 16GB Ram, OSX 10.13.1
Capella & Garcia Arquitectura
AC18 - AC21, iMac 27" 3.1 Ghz Intel Core i7, 16GB Ram, OSX 10.13.1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-04-07 05:49 PM
2014-04-07
05:49 PM
The main problem is that the name of the data text must begin by a letter, an not by a number. My data text had a numeric index at the beginning.
I'm now writing this workaround, but it only works in the parameter script:
z_name=""
z_number=""
Cate1=""
Cate2=""
Cate3=""
Cate4=""
Cate5=""
rr= REQUEST ("Zone_relations", "", z_category_name, z_code, z_name, z_number)
parameters SECC=z_name, MND=z_number, NARCH=z_name
codNumZ=strsub (z_name,1,3) !Numeric code from zone name
if codNumZ="152" then !File selection by numeric code
NARCH="Nuestra Casa"
endif
ch=OPEN("DATA", NARCH,"SEPARATOR='\t', MODE=RO, Library")
nr=INPUT(ch, MND, 1, Cate1, Cate2, Cate3, Cate4, Cate5)
CLOSE ch
parameters CTGR1=Cate1,CTGR2=Cate2,CTGR3=Cate3,CTGR4=Cate4,CTGR5=Cate5
any attempt to directly use the read parameters from the zone as a file name makes the object unusable.
A better workaround would be very helpful, thanks!
I'm now writing this workaround, but it only works in the parameter script:
z_name=""
z_number=""
Cate1=""
Cate2=""
Cate3=""
Cate4=""
Cate5=""
rr= REQUEST ("Zone_relations", "", z_category_name, z_code, z_name, z_number)
parameters SECC=z_name, MND=z_number, NARCH=z_name
codNumZ=strsub (z_name,1,3) !Numeric code from zone name
if codNumZ="152" then !File selection by numeric code
NARCH="Nuestra Casa"
endif
ch=OPEN("DATA", NARCH,"SEPARATOR='\t', MODE=RO, Library")
nr=INPUT(ch, MND, 1, Cate1, Cate2, Cate3, Cate4, Cate5)
CLOSE ch
parameters CTGR1=Cate1,CTGR2=Cate2,CTGR3=Cate3,CTGR4=Cate4,CTGR5=Cate5
any attempt to directly use the read parameters from the zone as a file name makes the object unusable.
A better workaround would be very helpful, thanks!
Miquel
Capella & Garcia Arquitectura
AC18 - AC21, iMac 27" 3.1 Ghz Intel Core i7, 16GB Ram, OSX 10.13.1
Capella & Garcia Arquitectura
AC18 - AC21, iMac 27" 3.1 Ghz Intel Core i7, 16GB Ram, OSX 10.13.1