cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Name_of_plan not adding to parameter

JGoode
Expert
Hello,

I'm trying to add the name of my project to a parameter but for some reason it doesn't fill the field?

Here is my script:
rrr=REQUEST("Name_of_plan", "", prj_name, prj_fullname, prj_path)
zx = prj_fullname
parameters zx=zx
I feel like this should just work but doesn't, Any ideas as to how to solve it?

Thanks
ArchiCAD 23

Windows 10
13 REPLIES 13
JGoode
Expert
So I've just read that using it in a parameter script will return an empty string. Is there any other way to get the project name?

Thanks
ArchiCAD 23

Windows 10
Lingwisyer
Guru
There are quite a few commands which do not work in the Parameter Script... Do you actually need the result to be visible in the Parameter Script? It will still impact all of your other scripts.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
Nader Belal
Mentor
@jGoode

make the request in the master script and assign the result to a variable.

then in parameter script assign the parameter's value to that of the master ...

PS:
1. That is a quick fix
2. Don't make that part of the Master Script run as a parameter script or it will not work
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
Jochen Suehlo
Advisor
make the request in the master script and assign the result to a variable.

then in parameter script assign the parameter's value to that of the master ...
This does not work in the Master Script because then the Master Script is used as Parameter Script and you get an error in the Parameter Script. (ARCHICAD 22)
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
Nader Belal
Mentor
Then I could suggest to you another method.

For instance,

1. You can get "Project Name" from "Project Info" autotext ( <PROJECTNAME> )
2. Project fullname same as in 1 (or create a new field and use it)
3. Project path, also by autotext ( <FILEPATH> + <FILENAME> )
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
Nader Belal
Mentor
Another suggestion,

it's idea is simple, where you run your snippet when only if the master script is not run as master or parameter scripts, just add

if GLOB_SCRIPT_TYPE # 5 |GLOB_SCRIPT_TYPE # 6 then

your code snippet

endif
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
Jochen Suehlo
Advisor
if GLOB_SCRIPT_TYPE # 5 |GLOB_SCRIPT_TYPE # 6 then
This only works for the output in 2D. The error message in Parameter Script appears nevertheless.
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
Nader Belal
Mentor
What about the autotext ? see above my responce
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
Lingwisyer
Guru
Moonlight wrote:
What about the autotext ? see above my responce

Will not work for James's purpose as he is wanting to reference the return which cannot be done with Autotexts.

JGoode wrote:
What I want to achieve involves cutting up the name of the project to get the first 5 numbers of the project name. I have no use for it to be outputted in 2D / 3D. It’s not necessarily needing to store it as a parameter but I do need to be able to use the string (like a parameter). I don’t know if there is a way of doing so?



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660