The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Everything about GDL - Doors/Windows/Objects/Stairs etc. (Example: I created an object that prints an error message in 3D all the time, please help!)

Moderators: Barry Kelly, Karl Ottenstein, LaszloNagy, ejrolon, gkmethy, Gergely Feher

User avatar
By Barry Kelly
#160272
It should also work with RICHTEXT which can be used in any objects 3D script.
Barry.
By derekjackson
#160303
Thanks guys, but I'm not having much luck with it.

Adding the line
Code: Select all
"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?
User avatar
By Juha Vesen
#160306
Hello,

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

For example;

myText= "Client: <CLIENT>\n"


Hope this helps.
User avatar
By Juha Vesen
#160309
Hello,

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

This works in 2D:
Code: Select all
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:
Code: Select all
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"
User avatar
By Barry Kelly
#160358
Juha Vesen wrote: You're right: the autotext seems to work in 2D but not in 3D :shock:
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.
By derekjackson
#160375
Barry Kelly wrote:
Juha Vesen wrote: You're right: the autotext seems to work in 2D but not in 3D :shock:
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...
User avatar
By ztaskai
#160860
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,
User avatar
By vistasp
#160876
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... :!: