Filepath as GDL variable

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2006-07-10 11:47 AM
‎2006-07-10
11:47 AM
I need to be able to find the current project filepath as per the autotext <FILEPATH> and store this information in a variable. I am currently using a folder scanning routine that will search predetermined folder locations for the name of the current project to find its location however I now need to be able to find the file location no matter where it is placed.
The following GDL will give me the correct information as text, but I need to have this file location as a variable for other use (File I/O etc)
TEXT2 0.0, 0.0, "<FILEPATH>"
If anyone knows if this can be accomplished or any other ideas can you please let me know.
Kind Regards,
Danny
8 REPLIES 8
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2006-07-10 12:31 PM
‎2006-07-10
12:31 PM
AFAIK there is no REQUEST, REQ or GLOBAL to return the full filepath. And autotext can't be read out of GDL. IMHO: No way.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2006-07-10 01:13 PM
‎2006-07-10
01:13 PM
Thats disappointing to hear especially when the <FILEPATH> autotext is so close and can be scripted into text within GDL.
Could this functionality be written as a custom API - perhaps a custom GDL REQUEST?
Could this functionality be written as a custom API - perhaps a custom GDL REQUEST?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2006-07-10 01:43 PM
‎2006-07-10
01:43 PM
This could be written as API, but the add-on has to be loaded in every AC-session the object is used in.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2007-02-05 11:59 PM
‎2007-02-05
11:59 PM
This information can now be obtained via a request in AC10 (although this addition to the existing request is not documented by Graphisoft).
Hope this helps someone.
Danny
rrr=REQUEST("Name_of_plan", "", prj_name, prj_fullname, prj_path) TEXT2 0.0, 0.0, prj_name TEXT2 0.0, -1.0, prj_fullname TEXT2 0.0, -2.0, prj_pathThe above code will return the short name, full name and project path of the currently open project (assuming the project has been saved).
Hope this helps someone.
Danny
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2007-02-06 01:18 AM
‎2007-02-06
01:18 AM
Great! Where do you have it from? Trial and error? Found in another object? GS itself?
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2007-02-06 08:07 AM
‎2007-02-06
08:07 AM
I found these extra parameters through trial and error. Sometimes I add extra variables to the requests (especially when version upgrades have occured) and this one paid off.
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2007-02-07 10:25 PM
‎2007-02-07
10:25 PM
Thanks Danny for finding this!
Many times I would like to know the platform where the GDL
is running. If I remember right there was a REQUEST for this
a long time ago, but nothing working at the moment
With Your code the platform is cleared out soonest;
--
Regards, Juha
Many times I would like to know the platform where the GDL
is running. If I remember right there was a REQUEST for this
a long time ago, but nothing working at the moment

With Your code the platform is cleared out soonest;
rrr=REQUEST("Name_of_plan", "", prj_name, prj_fullname, prj_path)
len= strstr(prj_path, prj_fullname)-1
ddd= strsub(prj_path,len,1)
if ddd=":" then
platform= "It's a MAC"
else
platform= "It's a WIN"!--or something even wilder
endif
TEXT2 0.0, -3.0, platform
TEXT2 0.0, 0.0, prj_name
TEXT2 0.0, -1.0, prj_fullname
TEXT2 0.0, -2.0, prj_path
--
Regards, Juha
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2007-02-07 10:58 PM