We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2022-12-22 11:36 PM - last edited on 2023-05-25 08:33 AM by Noemi Balogh
Hello ,
Creating custom drawings does not support back referencing,
the defaut Archicad linear drawing title object support back reference, but i don't know why this object is designed to show titles and scales on the right of the drawing,
i know it can be adjusted inside the GDL editor, but i didn't figure it out, i tried but with no results,
Can someone help me to obtain that result by editing an existing drawing title GDL script ?
Thanks
Solved! Go to Solution.
2023-01-03 04:36 AM - last edited on 2023-01-09 02:06 AM by Laszlo Nagy
Hi bouhmidage ,
your one is is how titles are meant to look, i don't know why there isn't a standard one like that...
Note:
Best method to get what you want is to save what you have typed as an object,
and it will turn it into code with everything in the correct position as code.
then open the code and substitute the code below where needed to get back ref and drawing information.
to get it to work it requires coding;
from an older version of the drawing title:
if gs_backref_custom=0 then
STYLE styleBackref
pen gs_backref_font_pen
TEXT2 posX+ gs_backref_pos_x,-backrefFontH+gs_backref_pos_y,gs_backref_prefix+"<BACKREFSHEETNUMBER_R><DUMMY><"+ gs_backref_separator + ">" + AC_BackReferenceGUIDList[1]
else
set style "styleBackref"
pen gs_backref_font_pen
TEXT2 posX+ gs_backref_pos_x ,-titleHeight+gs_backref_pos_y,gs_backref_prefix+gs_backref_customtxt
endif
(Note: the AC_BackReferenceGUIDList array produces ID of the drawings so it can calulate the page the backrefence is on, you need lots of extra parameters in the parameters script for this to work)
to get the drawing name and number in code then
drawingNumber = gs_drawing_number_prefix + AC_DrawingNumber
text2 posX + gs_drawing_number_pos_x, posY + gs_drawing_number_pos_y, drawingNumber
drawingName = AC_DrawingName
text2 posX + gs_drawing_name_pos_x, posY + gs_drawing_name_pos_y, drawingName
(Note: the AC_DrawingNumber and AC_DrawingName parameters need to be in the parameters script for this to work)
if gs_drawing_scale_original then
drawingScale = gs_drawing_scale_prefix + AC_OriginalDrawingScale
else
drawingScale = gs_drawing_scale_prefix + AC_DrawingScale
endif
text2 posX + gs_drawing_scale_pos_x, posY + gs_drawing_scale_pos_y, drawingScale
(Note: the AC_OriginalDrawingScale and AC_DrawingName parameters need to be in the parameters script for this to work)
you would need a circle,
you will need a line
and you will need to set anchor points to the text
the code that Archicad produces will look like this.
the anchor points i will make bold, in the textblock part of the script:
!
! Name : New Object 5.gsm
! Date : Tuesday, 3 January 2023
! Version : 18.00
! Written by Archicad
!
mul2 A/0.072811, B/0.009130
add2 0.01130368226451, 0.004565182264512
pen penAttribute_1
line_property 0
line2 -0.009130364529023, 0, 0.06150720974114, 0
pen penAttribute_2
circle2 -0.004565182264512, 0, 0.004565182264512
define style{2} "AC_STYLE_1" "Arial", 2, 0
paragraph "AC_PRG_21" 2, 0, 0, 0, 1
set style "AC_STYLE_1"
"Drawing name aligned to the left"
endparagraph
textblock "AC_TEXTBLOCK_21" 0, 7, 0, 1, 1, 1,
"AC_PRG_21"
richtext2 0, 0, "AC_TEXTBLOCK_21"
paragraph "AC_PRG_22" 2, 0, 0, 0, 1
"Drawing Scale aligned to the left"
endparagraph
textblock "AC_TEXTBLOCK_22" 0, 1, 0, 1, 1, 1,
"AC_PRG_22"
richtext2 0, -3.788908032329E-008, "AC_TEXTBLOCK_22"
paragraph "AC_PRG_23" 2, 0, 0, 0, 1
"Drawing ID"
endparagraph
textblock "AC_TEXTBLOCK_23" 0, 8, 0, 1, 1, 1,
"AC_PRG_23"
richtext2 -0.004565182264512, 0, "AC_TEXTBLOCK_23"
paragraph "AC_PRG_24" 2, 0, 0, 0, 1
"Back Ref"
endparagraph
textblock "AC_TEXTBLOCK_24" 0, 2, 0, 1, 1, 1,
"AC_PRG_24"
richtext2 -0.004565182264512, 0, "AC_TEXTBLOCK_24"
take a working drawing title, save as, delete the 2d content...
then use the following code (cleaned up so you can read it) in the 2d script of your new drawing title:
line2 -0.005, 0, 0.065, 0
circle2 0, 0, 0.005
define style{2} "Arial_STYLE_2mm" "Arial", 2, 0!!!2mm Arial text....you can change this,
set style "Arial_STYLE_2mm"
paragraph "Drawing name Paragraph" 2, 0, 0, 0, 1
AC_DrawingName !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"Drawing name aligned to the left"
endparagraph
textblock "Drawing name TEXTBLOCK" 0, 7, 0, 1, 1, 1,
"Drawing name Paragraph"
richtext2 0.005, 0, "Drawing name TEXTBLOCK"
paragraph "Drawing scale Paragraph" 2, 0, 0, 0, 1
AC_OriginalDrawingScale !!!!!!!!!!!!!!!!"Drawing Scale aligned to the left"
endparagraph
textblock "Drawing scale TEXTBLOCK" 0, 1, 0, 1, 1, 1,
"Drawing scale Paragraph"
richtext2 0.005, 0, "Drawing scale TEXTBLOCK"
paragraph "Drawing ID Paragraph" 2, 0, 0, 0, 1
AC_DrawingNumber !!!!!!!!!!!!!!!!!!"Drawing ID"
endparagraph
textblock "Drawing ID TEXTBLOCK" 0, 8, 0, 1, 1, 1,
"Drawing ID Paragraph"
richtext2 0, 0, "Drawing ID TEXTBLOCK"
paragraph "Back Ref Paragraph" 2, 0, 0, 0, 1
"<BACKREFSHEETNUMBER_R><DUMMY><.>" + AC_BackReferenceGUIDList[1] !!!!!!!!!!!!!!!!!!!!!!!!!!"Back Ref"
endparagraph
textblock "Back Ref TEXTBLOCK" 0, 2, 0, 1, 1, 1,
"Back Ref Paragraph"
richtext2 0, 0, "Back Ref TEXTBLOCK"
and you have your title you wanted.
2022-12-23 11:55 AM
2023-01-03 04:36 AM - last edited on 2023-01-09 02:06 AM by Laszlo Nagy
Hi bouhmidage ,
your one is is how titles are meant to look, i don't know why there isn't a standard one like that...
Note:
Best method to get what you want is to save what you have typed as an object,
and it will turn it into code with everything in the correct position as code.
then open the code and substitute the code below where needed to get back ref and drawing information.
to get it to work it requires coding;
from an older version of the drawing title:
if gs_backref_custom=0 then
STYLE styleBackref
pen gs_backref_font_pen
TEXT2 posX+ gs_backref_pos_x,-backrefFontH+gs_backref_pos_y,gs_backref_prefix+"<BACKREFSHEETNUMBER_R><DUMMY><"+ gs_backref_separator + ">" + AC_BackReferenceGUIDList[1]
else
set style "styleBackref"
pen gs_backref_font_pen
TEXT2 posX+ gs_backref_pos_x ,-titleHeight+gs_backref_pos_y,gs_backref_prefix+gs_backref_customtxt
endif
(Note: the AC_BackReferenceGUIDList array produces ID of the drawings so it can calulate the page the backrefence is on, you need lots of extra parameters in the parameters script for this to work)
to get the drawing name and number in code then
drawingNumber = gs_drawing_number_prefix + AC_DrawingNumber
text2 posX + gs_drawing_number_pos_x, posY + gs_drawing_number_pos_y, drawingNumber
drawingName = AC_DrawingName
text2 posX + gs_drawing_name_pos_x, posY + gs_drawing_name_pos_y, drawingName
(Note: the AC_DrawingNumber and AC_DrawingName parameters need to be in the parameters script for this to work)
if gs_drawing_scale_original then
drawingScale = gs_drawing_scale_prefix + AC_OriginalDrawingScale
else
drawingScale = gs_drawing_scale_prefix + AC_DrawingScale
endif
text2 posX + gs_drawing_scale_pos_x, posY + gs_drawing_scale_pos_y, drawingScale
(Note: the AC_OriginalDrawingScale and AC_DrawingName parameters need to be in the parameters script for this to work)
you would need a circle,
you will need a line
and you will need to set anchor points to the text
the code that Archicad produces will look like this.
the anchor points i will make bold, in the textblock part of the script:
!
! Name : New Object 5.gsm
! Date : Tuesday, 3 January 2023
! Version : 18.00
! Written by Archicad
!
mul2 A/0.072811, B/0.009130
add2 0.01130368226451, 0.004565182264512
pen penAttribute_1
line_property 0
line2 -0.009130364529023, 0, 0.06150720974114, 0
pen penAttribute_2
circle2 -0.004565182264512, 0, 0.004565182264512
define style{2} "AC_STYLE_1" "Arial", 2, 0
paragraph "AC_PRG_21" 2, 0, 0, 0, 1
set style "AC_STYLE_1"
"Drawing name aligned to the left"
endparagraph
textblock "AC_TEXTBLOCK_21" 0, 7, 0, 1, 1, 1,
"AC_PRG_21"
richtext2 0, 0, "AC_TEXTBLOCK_21"
paragraph "AC_PRG_22" 2, 0, 0, 0, 1
"Drawing Scale aligned to the left"
endparagraph
textblock "AC_TEXTBLOCK_22" 0, 1, 0, 1, 1, 1,
"AC_PRG_22"
richtext2 0, -3.788908032329E-008, "AC_TEXTBLOCK_22"
paragraph "AC_PRG_23" 2, 0, 0, 0, 1
"Drawing ID"
endparagraph
textblock "AC_TEXTBLOCK_23" 0, 8, 0, 1, 1, 1,
"AC_PRG_23"
richtext2 -0.004565182264512, 0, "AC_TEXTBLOCK_23"
paragraph "AC_PRG_24" 2, 0, 0, 0, 1
"Back Ref"
endparagraph
textblock "AC_TEXTBLOCK_24" 0, 2, 0, 1, 1, 1,
"AC_PRG_24"
richtext2 -0.004565182264512, 0, "AC_TEXTBLOCK_24"
take a working drawing title, save as, delete the 2d content...
then use the following code (cleaned up so you can read it) in the 2d script of your new drawing title:
line2 -0.005, 0, 0.065, 0
circle2 0, 0, 0.005
define style{2} "Arial_STYLE_2mm" "Arial", 2, 0!!!2mm Arial text....you can change this,
set style "Arial_STYLE_2mm"
paragraph "Drawing name Paragraph" 2, 0, 0, 0, 1
AC_DrawingName !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"Drawing name aligned to the left"
endparagraph
textblock "Drawing name TEXTBLOCK" 0, 7, 0, 1, 1, 1,
"Drawing name Paragraph"
richtext2 0.005, 0, "Drawing name TEXTBLOCK"
paragraph "Drawing scale Paragraph" 2, 0, 0, 0, 1
AC_OriginalDrawingScale !!!!!!!!!!!!!!!!"Drawing Scale aligned to the left"
endparagraph
textblock "Drawing scale TEXTBLOCK" 0, 1, 0, 1, 1, 1,
"Drawing scale Paragraph"
richtext2 0.005, 0, "Drawing scale TEXTBLOCK"
paragraph "Drawing ID Paragraph" 2, 0, 0, 0, 1
AC_DrawingNumber !!!!!!!!!!!!!!!!!!"Drawing ID"
endparagraph
textblock "Drawing ID TEXTBLOCK" 0, 8, 0, 1, 1, 1,
"Drawing ID Paragraph"
richtext2 0, 0, "Drawing ID TEXTBLOCK"
paragraph "Back Ref Paragraph" 2, 0, 0, 0, 1
"<BACKREFSHEETNUMBER_R><DUMMY><.>" + AC_BackReferenceGUIDList[1] !!!!!!!!!!!!!!!!!!!!!!!!!!"Back Ref"
endparagraph
textblock "Back Ref TEXTBLOCK" 0, 2, 0, 1, 1, 1,
"Back Ref Paragraph"
richtext2 0, 0, "Back Ref TEXTBLOCK"
and you have your title you wanted.
2023-01-03 04:59 PM
Thank you so much for your time and effort !!
last week i spent a day to understand how the linear drawing title object works ,
after a looot of headacke i modified the defaut object and it looks exactly like i want, the edited script is close to yours,
i'd like to test your method and see what i get !
thanks 😄
here i share with you the object i got agter editing ,
2023-06-06 10:48 PM
very loosely following along with this topic,
is it possible to call the North Arrow Object so that within the circle of the drawing Title for Plans, the North Arrow is automatically inserted, and follows along with the project north as assigned under the project preferences.
Just seeing if anyone has attempted such a ridiculous idea, prior to my many awful attempts.
2023-06-07 03:39 AM
I do not believe there is a way for a Drawing Title to retrieve information on how a View is rotated... You might be able to just use GLOB_NORTH_DIR if none of your views are rotated, though I am unsure how that works on Layouts...
Ling.
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 |
2023-06-08 10:18 PM
That ended up working out great! figuring out the rest of what I am trying to do may bring about the need for another post or 2 in here.
Thanks @Lingwisyer !