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

Custom symbol in drawing title

Anonymous
Not applicable
The picture below shows an example of how we would like our drawing titles to look like.

I used the default Linear Drawing Title 10 and added the circle, W and the 2 centre lines through the circle.

However I would like to have this symbol as a option within the Title so that I can only pick the option (...like in the default title you can choose between circle, ellipse, rectangle and pentagon marker styles.)
How and what would I have to change in the gdl text to incorporate this symbol. And in such a manner that the symbol still scales with the rest of the title.
(...the symbol size is connected to the text size in the default title)

Can anybody help me with the gdl scripting that I need to add or change?

Drawing Title JWARC.jpg
9 REPLIES 9
Anonymous
Not applicable
I recommend starting from scratch. The title types are a little tricky, but they are much easier without hundreds of lines of code to confuse you. Try starting with just the graphics to get the hang of it and add the text later.
Cecilia -- It doesn't look like the Linear Drawing Title 10 is part of the US Library, so I can't tell you specifically what to do (and I also don't know your level of GDL knowledge), but basically:

Create an option (in addition to circle, ellipse, etc.) for the symbol in the Parameter Script.

The simplest way to create the symbol is within the "2D Symbol" window, and then add the necessary 2D script (IF Marker =`Symbol` THEN...) to insert the graphic as a FRAGMENT. You can probably figure this part out by studying the existing 2D script (I can only assume that the other marker shapes are scaled with the text).
MacBook Pro Apple M2 Max, 96 GB of RAM
AC27 US (5003) on Mac OS Ventura 13.6.2
Started on AC4.0 in 91/92/93; full-time user since AC8.1 in 2004
Aussie John
Newcomer
how did you add the graphics?
You need to find the part of code that creates the circle and put your custom bit next to that. TIP: search for "circle2", Comment out the command and see if it is indeed the part.
With a bit of luck you will be able to control it from the default paramters. With an "if" statement you could further customise the selection.
Cheers John
John Hyland : ARINA : www.arina.biz
User ver 4 to 12 - Jumped to v22 - so many options and settings!!!
OSX 10.15.6 [Catalina] : Archicad 22 : 15" MacBook Pro 2019
[/size]
Anonymous
Not applicable
This is the gdl scrip i need to edit / add to. some how i can not seem to get it in there.

my gdl knowledge are not to great, i know the basics.

100:
! ==============================================================================
! Drawing title marker symbol
! ==============================================================================
! in:
! titleWidth:
! titleHeight:
! out:
! upperLineDx:
! middleLineDx:
! bottomLineDx
! ==============================================================================

if not(gs_show_symbol) then ! Off

bHaveMarkerData = 0
if iTitleConfig = 1 & (gs_show_drawing_number | gs_show_layout_number) then bHaveMarkerData = 1

if bHaveMarkerData then
if gs_symbol_style = mSymbolStyle[1] then ! Circle
middleLineDx = titleHeight
endif
if gs_symbol_style = mSymbolStyle[2] then ! Elliptoid
ovalRatio = 1.5
middleLineDx = ovalRatio * titleHeight
endif
if gs_symbol_style = mSymbolStyle[3] then ! Rectangular
middleLineDx = titleHeight
endif
if gs_symbol_style = mSymbolStyle[4] then ! Pentagonal
middleLineDx = pentX1 + pentX2
endif
upperLineDx = middleLineDx
bottomLineDx = middleLineDx
else
upperLineDx = 0
bottomLineDx = 0
middleLineDx = 0
endif
else
pen gs_symbol_pen
fill gs_symbol_fill

if gs_symbol_style = mSymbolStyle[1] then ! Circle
hotarc2 titleHeight / 2, -titleHeight / 2, titleHeight / 2, 0, 180
hotarc2 titleHeight / 2, -titleHeight / 2, titleHeight / 2, 180, 0

poly2_b 2, 7, gs_symbol_fill_fg, gs_symbol_fill_bg,
titleHeight / 2, -titleHeight / 2, 901,
titleHeight / 2, 360, 4001

upperLineDx = titleHeight / 2
middleLineDx = titleHeight
bottomLineDx = titleHeight / 2
endif

if gs_symbol_style = mSymbolStyle[2] then ! Elliptoid
ovalRatio = 1.5

mul2 ovalRatio, 1

hotarc2 titleHeight / 2, -titleHeight / 2, titleHeight / 2, 0, 180
hotarc2 titleHeight / 2, -titleHeight / 2, titleHeight / 2, 180, 0

poly2_b 2, 7, gs_symbol_fill_fg, gs_symbol_fill_bg,
titleHeight / 2, -titleHeight / 2, 901,
titleHeight / 2, 360, 4001

del 1

upperLineDx = ovalRatio * titleHeight / 2
middleLineDx = ovalRatio * titleHeight
bottomLineDx = ovalRatio * titleHeight / 2
endif

if gs_symbol_style = mSymbolStyle[3] then ! Rectangular

hotline2 0, 0, 0, -titleHeight
hotline2 titleHeight,0, titleHeight, -titleHeight
hotline2 0, 0, titleHeight, 0
hotline2 0, -titleHeight,titleHeight, -titleHeight

poly2_b 4, 7, gs_symbol_fill_fg, gs_symbol_fill_bg,
titleHeight, -titleHeight, 1,
titleHeight, 0, 1,
0, 0, 1,
0, -titleHeight, 1

upperLineDx = titleHeight
middleLineDx = titleHeight
bottomLineDx = titleHeight
endif

if gs_symbol_style = mSymbolStyle[4] then ! Pentagonal
alpha = ((5 - 2) * 180) / 5
pentSideL = titleHeight / 2 / sin(alpha / 2)
pentX1 = titleHeight / 2/ tan(alpha / 2)
pentX2 = pentSideL * cos(alpha - 90)

add2 pentX1 + pentX2, -titleHeight / 2

hotline2 0, 0, -pentX1, titleHeight / 2
hotline2 -pentX1, titleHeight / 2, -pentX1 - pentX2, pentSideL / 2
hotline2 -pentX1 - pentX2, pentSideL / 2, -pentX1 - pentX2, -pentSideL / 2
hotline2 -pentX1 - pentX2, -pentSideL / 2, -pentX1, -titleHeight / 2
hotline2 -pentX1, -titleHeight / 2, 0, 0

poly2_b 5, 7, gs_symbol_fill_fg, gs_symbol_fill_bg,
0, 0, 1,
-pentX1, titleHeight / 2, 1,
-pentX1 - pentX2, pentSideL / 2, 1,
-pentX1 - pentX2,-pentSideL / 2, 1,
-pentX1, -titleHeight / 2, 1
del 1

upperLineDx = pentX2
middleLineDx = pentX1 + pentX2
bottomLineDx = pentX2
endif
endif
return



I know i have to add it here and then again i have to add it in the Master Script.

".........dim mSymbolStyle[4]
mSymbolStyle[1] = `Circle`
mSymbolStyle[2] = `Elliptoid`
mSymbolStyle[3] = `Rectangular`
mSymbolStyle[4] = `Pentagonal` ......"

Somehow i always get stuck.
Frank Beister
Moderator
No time to test, just a try:

...

if gs_symbol_style = mSymbolStyle[1] then ! Circle
hotarc2 titleHeight / 2, -titleHeight / 2, titleHeight / 2, 0, 180
hotarc2 titleHeight / 2, -titleHeight / 2, titleHeight / 2, 180, 0

! circle
poly2_b 2, 7, gs_symbol_fill_fg, gs_symbol_fill_bg,
titleHeight / 2, -titleHeight / 2, 901,
titleHeight / 2, 360, 4001

! cross
line2 -titleHeight / 2, 0, titleHeight / 2, 0
line2 0, -titleHeight / 2, 0, titleHeight / 2

! left
line2 -titleHeight / 2, titleHeight / 2, -titleHeight / 4, -titleHeight / 2
line2 0, titleHeight / 2, -titleHeight / 4, -titleHeight / 2

! right
ine2 titleHeight / 2, titleHeight / 2, titleHeight / 4, -titleHeight / 2
line2 0, titleHeight / 2, titleHeight / 4, -titleHeight / 2

! boundary
add2 -titleHeight / 2, -titleHeight / 2
rect2 titleHeight, titleHeight
del 1

upperLineDx = titleHeight / 2
middleLineDx = titleHeight
bottomLineDx = titleHeight / 2
endif

...
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Anonymous
Not applicable
Thanx for all the help.
It's not working just yet but i'm getting closer. as you can see in the picture the figure is there and it scales with the text the only problem left is it is not at the correct placeand the rectangle is missing.

But much better than what i had so far.
Thanx
Aussie John
Newcomer
The placement is easy to fix.

Immediately before Frank's code put

add2 -titleHeight / 2, -titleHeight/2

immediately after put

del 1



Also Frank did show the square
see "rect2" so not sure why you are not seeing it
Cheers John
John Hyland : ARINA : www.arina.biz
User ver 4 to 12 - Jumped to v22 - so many options and settings!!!
OSX 10.15.6 [Catalina] : Archicad 22 : 15" MacBook Pro 2019
[/size]
Anonymous
Not applicable
Thanx, but it did not work...

it moved everything to a new possition.

and as for the rect2 this is the massage that i get????
Anonymous
Not applicable
I played with the text that you gave me and just took the minus away and now it seems to be working.

"add2 titleHeight/2, -titleHeight/2"

Thanx a lot