The Global Archicad Community

Stay informed. Get help. Share your knowledge.

Everything about using Libraries and Library Parts - Doors/Windows/Objects/Stairs etc. (Example: How can I display a Transom above my Door?)

Moderators: ejrolon, Barry Kelly, Karl Ottenstein, LaszloNagy, Gordana Radonic, nbalogh, gkmethy, mnguyen, Gergely Feher

User avatar
By Danny Sparks-Cousins

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,
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?
This information can now be obtained via a request in AC10 (although this addition to the existing request is not documented by Graphisoft).
Code: Select all
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_path
The 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.

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.
User avatar
By Juha Vesen
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 :roll:

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"
platform= "It's a WIN"!--or something even wilder
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