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

Accessing Project Info Values

derekjackson
Contributor
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

Karl Ottenstein
Moderator
I do not believe that there is an interface to Project Info. All of those fields are autotext, so you can generate text that picks up the values, but you cannot directly read the values.

On the other hand, from the Project Info dialog, you can export that information as an XML file. You could then read the XML file in a GDL object. But, the export to XML would be a manual process...

Karl
One of the forum moderators   •   AC 25 USA and earlier   •   MacOS 11.6.1, iMac Pro

Master Script
Newcomer
Autotext does work in the 2D symbol. When you place an autotext in the 2D symbol and use the FRAGMENT2 command you will be able display that text. It will be less flexible though, in terms of font type and size (I guess).

Michael Rensing
Newcomer
You can access them for display only. I tried earlier to use them to populate a Title Block. However I found that you can only display them. IE I was able to populate the title block with information From the Project Info, but I was unable to copy the text to another variable, and I was unable to force the text to Capitals. What are you trying to do with the Project Info?
Michael Rensing
AC 12, 13, 14, 15 USA
AC 16 3487
Windows 7
Kirksey

derekjackson
Contributor
We're using the Virtual Building Explorer quite a lot to show designs to clients. Our thinking is to create a 'site board' object for each VBE file that the user will start standing next to. It'll have our logo on it, and info about the project. They'll then be free to wander off around the model.

I was hoping that, rather than getting people to re-enter the project info for the site board, I could just read whatever has been entered into the Project Info dialogue.

So how would I do this? Haven't used autotext or FRAGMENT2 before...

You can save the project info to .XML file, which in turn you can read out in GDL. Don't ask me how the latter part works though
Erwin Edel, Project Lead, Leloup Architecten
www.leloup.nl

ArchiCAD 9-24 NED FULL
Windows 10 Pro
Adobe Design Premium CS5

derekjackson
Contributor
If I'm getting people to manually export an XML file, I may as well just get them to manually re-enter the info for the site board, in that case. That'll save messing around with XML.

Thanks anyway!

David Larrew
Booster
You can pull each field out of the Project Info using the autotext feature as previously described. But you don't need to mess with the Fragment2 command.

In your Object, just type-in the autotext call of the desired PI field ("<PROJECTNAME>", "<CLIENT>", etc.) for the scripted text string. So you are basically hard-coding the text field to be the autotext value.
David Larrew, AIA, GDLA, GSRC

Architectural Technology Specialist

a r c h i S O L U T I O N S



WIN7-10/ OSX 10.15.7

AC 5.1-25 USA

Karl Ottenstein
Moderator
Glad you posted what you wanted to do ... the first post was a little vague, so I gave two answers. (The XML stuff is for someone who wants their GDL object to behave differently based on the Project Info content.)

David's autotext illustration is the idea for what you need. It cannot be a FRAGMENT2 thing - which is part of a 2D symbolic representation, because you want your information displayed in VBE and VBE only displays 3D elements. Hmmm... I'm not sure if you can get autotext text to display directly by a GDL object in 3D? Never tried. Somebody?

Karl
One of the forum moderators   •   AC 25 USA and earlier   •   MacOS 11.6.1, iMac Pro

David Larrew
Booster
Karl,

I don't know why it wouldn't work with the "Text 3D" object. It should work with any string parameter field in any object (2D or 3D).

I currently use this technique with an architectural seal object that I created some years back. Since the Project Info and autotext abilities were added to AC, I plugged-in a bunch of linked PI fields for different text parameters in my object. Works like a charm.
David Larrew, AIA, GDLA, GSRC

Architectural Technology Specialist

a r c h i S O L U T I O N S



WIN7-10/ OSX 10.15.7

AC 5.1-25 USA

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 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Karl Ottenstein
Moderator
Cool. Thanks David and Barry!

Karl
One of the forum moderators   •   AC 25 USA and earlier   •   MacOS 11.6.1, iMac Pro

derekjackson
Contributor
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?

Juha Vesen
Newcomer
Hello,

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

For example;

myText= "Client: <CLIENT>\n"


Hope this helps.
--
Juha Vesen
ArchiCAD 4.1 --- 20
Mac Intel 2.5 GHz Intel Core i7 16Gb | OSX 10.10

derekjackson
Contributor
Unfortunately not - it displays Client: <CLIENT>

instead of referencing the Client value from Project Info....

Juha Vesen
Newcomer
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"
--
Juha Vesen
ArchiCAD 4.1 --- 20
Mac Intel 2.5 GHz Intel Core i7 16Gb | OSX 10.10

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 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

derekjackson
Contributor
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
Newcomer
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
Advocate
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-25 INT | Win10 | Ryzen 2600 | 16 GB | GTX 1150Ti |

Didn't find the answer? Start a new discussion

Labels

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!