2021-09-16 12:35 AM - edited 2021-09-16 12:35 AM
We have been using a custom drawing title object since AC20 with no issues. Now that we are using AC25, the title is behaving correctly ON SCREEN, but when we print or save as PDF, the title object displays the information for ALL drawings on the layout.
Need help solving this. GDL script below. Thanks!
Solved! Go to Solution.
2021-09-16 01:51 AM - edited 2021-09-16 02:01 AM
Thanks, Eduardo.
I was able to solve the issue by replacing what I call the "shortcut" variables - <DRAWINGNAME>, <DRAWINGID>, etc - with the global AC variables (AC_DrawingName, AC_DrawingNumber, etc.)
2021-09-16 01:11 AM
Might be the Title bug in AC25.
See here
Macbook Pro M1 Max 64GB ram, OS X 10.XX latest
another Moderator
2021-09-16 01:51 AM - edited 2021-09-16 02:01 AM
Thanks, Eduardo.
I was able to solve the issue by replacing what I call the "shortcut" variables - <DRAWINGNAME>, <DRAWINGID>, etc - with the global AC variables (AC_DrawingName, AC_DrawingNumber, etc.)
2021-09-16 03:53 AM
For future reference, those shortcut variables are called Autotext.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2022-03-23 12:19 PM - edited 2022-03-23 12:21 PM
Sorry...
but it seems that I'm to stupid to replace 'Autotext' with 'Variables'
If i put between quotes there appers the name of the variable in the titel instead the name of the drawing...
if i put it plain in, I get an error.
And how to replace <DRAWINGID> ?
text2 (AC_DrawingRect[3]-DistH),DistV,"<DRAWINGNAME>" + " <DRAWINGID>"
2022-03-23 06:17 PM
I'm too stupid to know all the right terminology, but I'll do my best to answer.
Archicad has global variables for use in the GDL code. I utilized the following:
AC_DrawingName
AC_DrawingNumber
AC_DrawingScale
These variables should not be in quotations when scripting in GDL.
Here's an example of the code:
PARAGRAPH "paragraph_number" 1, 0, 0, 0, 1
AC_DrawingNumber
ENDPARAGRAPH
2022-03-28 09:16 AM - edited 2022-03-28 09:18 AM
Thank you for your reply!
But it seems to use
'PARAGRAPH' instead of 'Text2' there is a complete different "environment" necessary...
... or someting with (a?) 'string' is necessary...(Warning in the editor...)
So you see, I don't have much knowledge of GDL-Script...
...seems that basics, like showing the "result" of a variable in the "output" are missing with me.
I looked several times into manuals but whether I didn't look for the right things or I just don't understand what's written there.
2022-03-28 06:17 PM
apologies - I should have given you the full code in context. I'm no GDL expert - more of a hack.
This is part of a larger script. This is the section that generates the drawing title.
IF showTitle = 1 THEN
STYLE title_type
PEN 1
PARAGRAPH "paragraph_title" 1, 0, 0, 0, 1
AC_DrawingName
ENDPARAGRAPH
TEXTBLOCK "textBlock_title" 0, 7, 0, 1, 1, 1, "paragraph_title"
ADD2 37/64",0
RICHTEXT2 0, 0, "textBlock_title"
PARAGRAPH is a means of defining styles and alignments. It also defines the output. In this case, the output is the variable AC_DrawingName.
TEXTBLOCK defines more options for anchor points, width_factor, etc. In this case, the output of the text block is the information defined in PARAGRAPH.
RICHTEXT2 is what actually outputs the text. It outputs the information defined in TEXTBLOCK.
You can use TEXT2, but you'll have less control over formatting:
TEXT2 0,0,AC_DrawingName
2022-03-31 06:06 PM - edited 2022-03-31 06:08 PM
With help trough the german Archicad-Discord Channel I could finally solve the 'problem' (just at the day the next Archicad update is announced... 😉 )
The key issue was, that the name of the variable has to be typed manually into the parameter list.
… and to get a space in the output between several expressions I had to learn what's about the 'str' command.