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

Accessing Project Info Values

derekjackson
Enthusiast
Hi,
I'm sure there must be a simple command that accesses the Project Info variables (Client, Project Name, Project Number, etc.) in GDL - can anyone please tell me how to do this?

Thanks,

Derek
23 REPLIES 23
Barry Kelly
Moderator
It should also work with RICHTEXT which can be used in any objects 3D script.
Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Karl Ottenstein
Moderator
Cool. Thanks David and Barry!

Karl
One of the forum moderators
AC 27 USA and earlier   •   macOS Ventura 13.6.6, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB
derekjackson
Enthusiast
Thanks guys, but I'm not having much luck with it.

Adding the line
"Client: " + <CLIENT> + "\n"
into the Paragraph definition just gives me the error 'Error in Expression'.

It doesn't seem to recognise <CLIENT>, for some reason.

Any ideas what I'm doing wrong?
Anonymous
Not applicable
Hello,

I think you should use the autotext as any other string inside the paragraph.

For example;

myText= "Client: <CLIENT>\n"


Hope this helps.
derekjackson
Enthusiast
Unfortunately not - it displays Client: <CLIENT>

instead of referencing the Client value from Project Info....
Anonymous
Not applicable
Hello,

You're right: the autotext seems to work in 2D but not in 3D

This works in 2D:

myText= "Client: <CLIENT>\n"
paragraph "ptxt10" 1, 0, 0, 0, 1
	myText
endparagraph
textblock "btxt10" 0, 7, 0, 1, 1, 1, "ptxt10"
richtext2 0, 0, "btxt10"

This does not in 3D:

myText= "Client: <CLIENT>\n"
paragraph "ptxt10" 1, 0, 0, 0, 1
	myText
endparagraph
textblock "btxt10" 0, 7, 0, 1, 1, 1, "ptxt10"
richtext 0,  0, 0.002, 0, "btxt10"
Barry Kelly
Moderator
Juha wrote:
You're right: the autotext seems to work in 2D but not in 3D
Sorry.
I knew it worked in 2D and I just assumed (incorrectly) it would also work in 3D.

I should know by now to NEVER assume anything in Archicad.
Always check first!

So now we have the problem that the actual values for the project info fields can't be extracted.

Unless the Project Info is manually saved as an XML file when ever there is a change.
Or create your own Project Info object that can write a text file automatically when the parameters are updated.
You may as well just create a 3D sign-board object and add the data if that is the only object that needs it though.

There must be a way of getting the project info data without saving the XML file but only GS could tell us.
Or maybe an API can access this data but that is beyond me at the moment.

Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
derekjackson
Enthusiast
Barry wrote:
Juha wrote:
You're right: the autotext seems to work in 2D but not in 3D
Sorry.
I knew it worked in 2D and I just assumed (incorrectly) it would also work in 3D.

I should know by now to NEVER assume anything in Archicad.
Always check first!

So now we have the problem that the actual values for the project info fields can't be extracted.

Unless the Project Info is manually saved as an XML file when ever there is a change.
Or create your own Project Info object that can write a text file automatically when the parameters are updated.
You may as well just create a 3D sign-board object and add the data if that is the only object that needs it though.

There must be a way of getting the project info data without saving the XML file but only GS could tell us.
Or maybe an API can access this data but that is beyond me at the moment.

Barry.
It just seems bizarre that the object can read the info for it's 2D display, but can't then pass it into the 3D display! I think getting the user to re-enter the project info is probably the easiest solution in this case...
ztaskai
Graphisoft Alumni
Graphisoft Alumni
Unfortunately, autotext is not supported in 3D. Autotext is basically a substitution in the 2D text drawing.

I recorded this as a wish for later versions. I don't know any workaround until then:(

Regards,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
vistasp
Advisor
ztaskai wrote:
Unfortunately, autotext is not supported in 3D. Autotext is basically a substitution in the 2D text drawing.

I recorded this as a wish for later versions. I don't know any workaround until then:(
I'm a little over my head here but...

Zsolt, does autotext not work even in the master script then? If it does, a workaround could be to convert it to a string in the master script first.

If that is possible...
= v i s t a s p =
bT Square Peg
https://archicadstuff.blogspot.com
https://www.btsquarepeg.com
| AC 9-27 INT | Win11 | Ryzen 5700 | 32 GB | RTX 3050 |