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

Grid Elements

gdford
Booster
There are times when grid element label heads do not fit on the drawings and thus get trimmed off... I know we can create additional drawings on the layout that only show the grid element heads that we need and then align it manually with the drawing on the layout that has the grid element heads trimmed off...... but it would be nice is we could drill down to the grid element name and display it using autotext in the model and not have to worry about coordinating the grid line names on the layout..... the same is true for story id, names and elevations.

Personally i think that all information in any object should be available using autotext... Story markers are a good example of this... Instead of increasing the flexibility of what the story marker can display, just give me access to the marker data so i can display it how i want.... where's the bim?

Thanks,
GaryF
Gary Ford
Self Employed - Modeling, Estimating, Construction
Archicad 12-25
Win 10 - ASUSTeK Zephyrus M GU502GV - 64 bit
Intel(R) Core(TM) i7-9750H CPU @ 2.60 GHz
16.0 GB ram
1 ACCEPTED SOLUTION

Solution
Nguyen Minh
Graphisoft Moderator
Graphisoft Moderator

Hi Eduardo,

 

Per your advice, I played around with line and scale, but couldn't reproduce the issue. If you are interested in a deeper investigation, I would like to have a sample of your project file, where the issue can be reproduced for further testing.

 

Thank you very much!

Best regards,
Minh

Minh Nguyen
Technical Support Engineer
GRAPHISOFT

View solution in original post

23 REPLIES 23

Podolsky
Newcomer
The problem with grid element is solvable. I have created label element on GDL that reads gridline name and shows it. The label element can also read and represent all parameters of Gridline head - colour, shape, size, background pen.

Almost all information of elements is available via GDL.

As about story markers - I have created separate GDL element (object), that has much more functions. If you are interested I can share it with you.

gdford
Booster
Yes I would love for you to share - I would like very much to see how those work...
Even though back in the day I was a database programmer I have resisted digging into GDL as there doesn't seem to be a decent development kit for GDL. I lived working with just the raw language and a text editor that back in the early 80's and I refuse now to use a language that doesn't have a decent development tool. It is hard for me to come up with an excuse for Graphisoft for not building at least a simple development tool for GDL. I am glad some folks persevere and build some code anyway.
Gary
Gary Ford
Self Employed - Modeling, Estimating, Construction
Archicad 12-25
Win 10 - ASUSTeK Zephyrus M GU502GV - 64 bit
Intel(R) Core(TM) i7-9750H CPU @ 2.60 GHz
16.0 GB ram

vdentello
Participant
gdford wrote:
Yes I would love for you to share - I would like very much to see how those work...
Even though back in the day I was a database programmer I have resisted digging into GDL as there doesn't seem to be a decent development kit for GDL. I lived working with just the raw language and a text editor that back in the early 80's and I refuse now to use a language that doesn't have a decent development tool. It is hard for me to come up with an excuse for Graphisoft for not building at least a simple development tool for GDL. I am glad some folks persevere and build some code anyway.
Gary
Got to agree with you, Gary. I'm one of the persistent GDL users. It annoys me that the interface is such a bad black and white text editor. Param-o won't solve more complex/ interface issues. GDL syntax for VSCode is great but it's no practical as the internal editor (what i use most of the time).
Archicad User Since 2013
GDL Developer
Experimenting with API
from Brazil

Bambooqn
Newcomer
Podolsky wrote:
The problem with grid element is solvable. I have created label element on GDL that reads gridline name and shows it. The label element can also read and represent all parameters of Gridline head - colour, shape, size, background pen.

Almost all information of elements is available via GDL.

As about story markers - I have created separate GDL element (object), that has much more functions. If you are interested I can share it with you.
Please sharing your object. Thank you

Podolsky
Newcomer

This is the label, that I mentioned before. If you place it on the gridline - it will show additional gridline marker. The GDL code is really simple.

As about storey level markers - there are two versions - one on UK and another in Hebrew libraries I shared on this forum before. Here are the links:
https://archicad-talk.graphisoft.com/viewtopic.php?f=37&t=72947

https://archicad-talk.graphisoft.com/viewtopic.php?f=37&t=73001

 

Eduardo Rolon
Moderator
Excelent.
Only wish if possible is to have different line types for the Bubble and the Pointer and to have Text always be horizontal.
eduardo rolón AIA NCARB
Another of the forum moderators.
Macbook Pro 2.4 i9 32GB ram
OS X 10.XX latest
AC25 US/INT -> AC08

Braza
Newcomer
Thanks Podolsky.
I did a minor fix on the Text Pen.

@ejrolon
I also included your wishes. Is it ok?

Cheers,
Paulo Henrique Santos, Architect
AC24_INT#3008 / I7 / 16Gb / 512Mb SSD / Windows 10

Eduardo Rolon
Moderator
Braza wrote:
Thanks Podolsky.
I did a minor fix on the Text Pen.

@ejrolon
I also included your wishes. Is it ok?

Cheers,
THX.
No more duplicate Grids.
eduardo rolón AIA NCARB
Another of the forum moderators.
Macbook Pro 2.4 i9 32GB ram
OS X 10.XX latest
AC25 US/INT -> AC08

Podolsky
Newcomer
Braza wrote:
Thanks Podolsky.
I did a minor fix on the Text Pen.

@ejrolon
I also included your wishes. Is it ok?

Cheers,
I'm not sure this is OK. You fixed an error in the script I've done replacing one line. Was PEN AC_MarkerPen. Replaced with PEN AC_TextPen_1.
Also added SET LINE_TYPE AC_LineType. From where AC_LineType is coming from? It's not in the list of variables and it's not extracted from linked object via REQUEST.
And what else? Original file was created in GDL version 37 (ArchiCAD 21). You saved in version 41.

Where support for square, pentagon and another shapes, as soon as you state you included another wishes?
Something I do not understand here.

Braza
Newcomer
Hi Podolsky,

I am sorry if I may have overstepped in your initiative. I was just trying to help and contribute.

Podolsky wrote:
From where AC_LineType is coming from?
I just opened the "Standard Grid Marker" and copied it before the POLY2_B. It seems that if the pointer is activated, it was passing the line definition to the POLY2_B.

Podolsky wrote:
And what else? Original file was created in GDL version 37 (ArchiCAD 21). You saved in version 41.
My bad. I don't have AC21. If you prefer I will just post the code.

Podolsky wrote:
Where support for square, pentagon and another shapes, as soon as you state you included another wishes?
Something I do not understand here.
ejrolon wrote:
Only wish if possible is to have different line types for the Bubble and the Pointer and to have Text always be horizontal.
If I understand Eduardo correctly, he was referring to that wrong line type when the pointer was activated.
Regarding the text orientation: I didn't do anything as I think it was/is already working.
But I agree that the Marker Shape support is necessary. If you want I can give it a try.
Paulo Henrique Santos, Architect
AC24_INT#3008 / I7 / 16Gb / 512Mb SSD / Windows 10

Braza
Newcomer

Here is a first try for the marker shape.
2d Script

 

ADD2 LABEL_POSITION[2][1]+LABEL_POSITION[3][1], LABEL_POSITION[3][2]

HOTSPOT2 0,0, 1

r=REQUEST('View_Rotangle', '', angleViewRotation)
angleTotalRotation=angleViewRotation MOD 360

ROT2 -angleTotalRotation

r=REQUEST ('ASSOCLP_NAME', '', nameObject)
IF nameObject='' THEN 
	textThis='Label unlinked! Select gridline.'
	GOSUB 'WARNING'
	END
ENDIF
IF nameObject<>'Standard grid marker' THEN 
	textThis='Link label only to gridline!'
	GOSUB 'WARNING'
	END
ENDIF

r=REQUEST('ASSOCLP_PARVALUE', 'AC_MarkerSize', index, type, flags, dim1, dim2, AC_MarkerSize)
r=REQUEST('ASSOCLP_PARVALUE', 'AC_MarkerPen', index, type, flags, dim1, dim2, AC_MarkerPen)
r=REQUEST('ASSOCLP_PARVALUE', 'res_mark', index, type, flags, dim1, dim2, res_mark)
r=REQUEST('ASSOCLP_PARVALUE', 'AC_TextFont_1', index, type, flags, dim1, dim2, AC_TextFont_1)
r=REQUEST('ASSOCLP_PARVALUE', 'AC_TextSize_1', index, type, flags, dim1, dim2, AC_TextSize_1)
r=REQUEST('ASSOCLP_PARVALUE', 'AC_TextStyle_1', index, type, flags, dim1, dim2, AC_TextStyle_1)
r=REQUEST('ASSOCLP_PARVALUE', 'AC_TextPen_1', index, type, flags, dim1, dim2, AC_TextPen_1)
r=REQUEST('ASSOCLP_PARVALUE', 'AC_MarkerText_1', index, type, flags, dim1, dim2, AC_MarkerText_1)
r=REQUEST('ASSOCLP_PARVALUE', 'shBackgroundFill', index, type, flags, dim1, dim2,shBackgroundFill)
r=REQUEST('ASSOCLP_PARVALUE', 'gs_fill_type', index, type, flags, dim1, dim2, gs_fill_type)
r=REQUEST('ASSOCLP_PARVALUE', 'gs_fill_pen', index, type, flags, dim1, dim2, gs_fill_pen)
r=REQUEST('ASSOCLP_PARVALUE', 'gs_back_pen', index, type, flags, dim1, dim2, gs_back_pen)

Marker_Diameter = GLOB_SCALE/1000*AC_MarkerSize

DEFINE STYLE 'TEXT' AC_TextFont_1, AC_TextSize_1, 5, AC_TextStyle_1
SET STYLE 'TEXT'

PEN AC_TextPen_1
Gridline_Number=AC_MarkerText_1
rot2 -LABEL_ROTANGLE
TEXT2 0,0, Gridline_Number
DEL 2

PEN AC_MarkerPen
SET LINE_TYPE AC_LineType

IF shBackgroundFill THEN SET FILL gs_fill_type

if AC_MarkerType_i = 1 then
	if not(shBackgroundFill) then
		circle2 0 , 0 , Marker_Diameter/2
	else
		poly2_b 2, 1+2+4+64, gs_fill_pen, gs_back_pen,
				0, 0, 901,
				Marker_Diameter/2, 360, 4001
	endif
else
	alfa_m2=360/res_mark
	dy=Marker_Diameter/2-Marker_Diameter/2*cos(alfa_m2/2)

	if AC_Type_i = i_Arc then rot2 90

	for m = 1 to res_mark+1
		PUT (Marker_Diameter/2)*cos(alfa_m2*m), (Marker_Diameter/2)*sin(alfa_m2*m), 1
	next m

	poly2_b res_mark+1, 1+2*shBackgroundFill+4+64*shBackgroundFill, gs_fill_pen, gs_back_pen,
		GET (NSP)

	if AC_Type_i = i_Arc then del 1
endif

END

'WARNING':

DEFINE STYLE 'WARNING' Arial, 2.5, 5, 0

SET STYLE 'WARNING'

TEXT2 0, 0, textThis

X1	=STW(textThis)/2000*GLOB_SCALE
Y1	=4.5/2000*GLOB_SCALE

POLY2_B 5, 2, 0, 0,
	X1, Y1, 1,
	X1, -Y1, 1,
	-X1, -Y1, 1,
	-X1, Y1, 1,
	X1, Y1, 1		

RETURN
Paulo Henrique Santos, Architect
AC24_INT#3008 / I7 / 16Gb / 512Mb SSD / Windows 10

Eduardo Rolon
Moderator
What I was asking for was that the Label mimic the Grid in order to be able to substitute it when necessary and have everything linked
For this we should have the Label match all the grid settings or have settings that can:
1. Specify Head pen and line type
2. Rotate Head Text or rotate the Leader or just have a setting fo keep the text always horizontal
3. Specify Leader pen and line type
----
Braza's has all but the horizontal text option which I really don't know if it is possible or not.
eduardo rolón AIA NCARB
Another of the forum moderators.
Macbook Pro 2.4 i9 32GB ram
OS X 10.XX latest
AC25 US/INT -> AC08

Braza
Newcomer
Ok Eduardo. I got it.
Check the code in my last post. I added a rot2 -LABEL_ROTANGLE that I think is working as you want.
So. If you want it to mimic the grid line, would you prefer to get grid line type automatically?
Paulo Henrique Santos, Architect
AC24_INT#3008 / I7 / 16Gb / 512Mb SSD / Windows 10

Podolsky
Newcomer
I think mistake that you are doing - before use variables from Standard Grid Marker, they needed to be requested from the object. And these requests I don't see.

Check it again.

In general I'm happy that you modifying my label. Go ahead, make it perfect. It's better to get ArchiCAD 21 (you can download it from Graphisoft web-site) and publish it in version 37. Because the earlier version it is - the more potentially users can use it (as not anyone on the latest version).

Don't forget to upload the final label on BIM components.

Braza
Newcomer
You are correct Podolsky. The AC_LineType wasn't reading anything. It was just setting Line_Type to 1 (As there was no AC_LineType defined). But without this definition, the label was pulling the Line_Type from the Grid Marker. I think. So I will just set it to 1.
I also put most of the requests on the Master Script. With this, the label can read the Grid Marker and assign the same line type and pen to the pointer. It seems to be working... If I leave them on 2d it wont work. Do you see any problem with this?

I can't save it to AC21, so I will just post the code and people copy paste it on your original label.
Here is the updated 2d script:
ADD2 LABEL_POSITION[2][1]+LABEL_POSITION[3][1], LABEL_POSITION[3][2]

HOTSPOT2 0,0, 1

r=REQUEST('View_Rotangle', '', angleViewRotation)
angleTotalRotation=angleViewRotation MOD 360

ROT2 -angleTotalRotation

r=REQUEST ('ASSOCLP_NAME', '', nameObject)
IF nameObject='' THEN 
	textThis='Label unlinked! Select gridline.'
	GOSUB 'WARNING'
	END
ENDIF
IF nameObject<>'Standard grid marker' THEN 
	textThis='Link label only to gridline!'
	GOSUB 'WARNING'
	END
ENDIF



Marker_Diameter = GLOB_SCALE/1000*AC_MarkerSize

DEFINE STYLE 'TEXT' AC_TextFont_1, AC_TextSize_1, 5, AC_TextStyle_1
SET STYLE 'TEXT'

PEN AC_TextPen_1
Gridline_Number=AC_MarkerText_1
rot2 -LABEL_ROTANGLE
TEXT2 0,0, Gridline_Number
DEL 2

PEN AC_MarkerPen
SET LINE_TYPE 1

IF shBackgroundFill THEN SET FILL gs_fill_type

if AC_MarkerType_i = 1 then
	if not(shBackgroundFill) then
		circle2 0 , 0 , Marker_Diameter/2
	else
		poly2_b 2, 1+2+4+64, gs_fill_pen, gs_back_pen,
				0, 0, 901,
				Marker_Diameter/2, 360, 4001
	endif
else
	alfa_m2=360/res_mark
	dy=Marker_Diameter/2-Marker_Diameter/2*cos(alfa_m2/2)

	if AC_Type_i = i_Arc then rot2 90

	for m = 1 to res_mark+1
		PUT (Marker_Diameter/2)*cos(alfa_m2*m), (Marker_Diameter/2)*sin(alfa_m2*m), 1
	next m

	poly2_b res_mark+1, 1+2*shBackgroundFill+4+64*shBackgroundFill, gs_fill_pen, gs_back_pen,
		GET (NSP)

	if AC_Type_i = i_Arc then del 1
endif


END

'WARNING':

DEFINE STYLE 'WARNING' Arial, 2.5, 5, 0

SET STYLE 'WARNING'

TEXT2 0, 0, textThis

X1	=STW(textThis)/2000*GLOB_SCALE
Y1	=4.5/2000*GLOB_SCALE

POLY2_B 5, 2, 0, 0,
	X1, Y1, 1,
	X1, -Y1, 1,
	-X1, -Y1, 1,
	-X1, Y1, 1,
	X1, Y1, 1		

RETURN
And the Master Script:
r=REQUEST('ASSOCLP_PARVALUE', 'AC_MarkerSize', index, type, flags, dim1, dim2, AC_MarkerSize)
r=REQUEST('ASSOCLP_PARVALUE', 'AC_MarkerPen', index, type, flags, dim1, dim2, AC_MarkerPen)
r=REQUEST('ASSOCLP_PARVALUE', 'res_mark', index, type, flags, dim1, dim2, res_mark)
r=REQUEST('ASSOCLP_PARVALUE', 'AC_TextFont_1', index, type, flags, dim1, dim2, AC_TextFont_1)
r=REQUEST('ASSOCLP_PARVALUE', 'AC_TextSize_1', index, type, flags, dim1, dim2, AC_TextSize_1)
r=REQUEST('ASSOCLP_PARVALUE', 'AC_TextStyle_1', index, type, flags, dim1, dim2, AC_TextStyle_1)
r=REQUEST('ASSOCLP_PARVALUE', 'AC_TextPen_1', index, type, flags, dim1, dim2, AC_TextPen_1)
r=REQUEST('ASSOCLP_PARVALUE', 'AC_MarkerText_1', index, type, flags, dim1, dim2, AC_MarkerText_1)
r=REQUEST('ASSOCLP_PARVALUE', 'shBackgroundFill', index, type, flags, dim1, dim2,shBackgroundFill)
r=REQUEST('ASSOCLP_PARVALUE', 'gs_fill_type', index, type, flags, dim1, dim2, gs_fill_type)
r=REQUEST('ASSOCLP_PARVALUE', 'gs_fill_pen', index, type, flags, dim1, dim2, gs_fill_pen)
r=REQUEST('ASSOCLP_PARVALUE', 'gs_back_pen', index, type, flags, dim1, dim2, gs_back_pen)
r=REQUEST('ASSOCLP_PARVALUE', 'AC_LineType', index, type, flags, dim1, dim2, AC_LineType)
r=REQUEST('ASSOCLP_PARVALUE', 'AC_LinePen', index, type, flags, dim1, dim2, AC_LinePen)

parameters AC_LabelPointerLineType = AC_LineType
parameters AC_LabelPointerPen = AC_LinePen
parameters AC_LabelPointerConnection = 0
Paulo Henrique Santos, Architect
AC24_INT#3008 / I7 / 16Gb / 512Mb SSD / Windows 10

Podolsky
Newcomer
object also uploaded to BIM components

Eduardo Rolon
Moderator

Coming back to this, just started to notice an issue with the label that is faceted which looks wrong when exporting to PDF

Screen Shot 2021-09-10 at 1.44.50 PM.png

eduardo rolón AIA NCARB
Another of the forum moderators.
Macbook Pro 2.4 i9 32GB ram
OS X 10.XX latest
AC25 US/INT -> AC08

Eduardo Rolon
Moderator

This is how it looks when exported as PDF.

Screen Shot 2021-09-10 at 2.21.30 PM.png

eduardo rolón AIA NCARB
Another of the forum moderators.
Macbook Pro 2.4 i9 32GB ram
OS X 10.XX latest
AC25 US/INT -> AC08

Hey Eduardo,

 

Thank you very much for reporting this issue!

May I ask whether the issue comes from the object made in this thread, or it was a standard Archicad's Grid marker? Does it happen if you copy it to a new file?

 

Best regards,

Minh

Minh Nguyen
Technical Support Engineer
GRAPHISOFT

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!