2021-03-22 06:13 PM
Solved! Go to Solution.
2021-07-01 12:02 PM
Podolsky wrote: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.
From where AC_LineType is coming from?
Podolsky wrote:My bad. I don't have AC21. If you prefer I will just post the code.
And what else? Original file was created in GDL version 37 (ArchiCAD 21). You saved in version 41.
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:If I understand Eduardo correctly, he was referring to that wrong line type when the pointer was activated.
Only wish if possible is to havedifferent line types for the Bubble and the Pointerand to have Text always be horizontal.
2021-07-01 01:29 PM - last edited on 2021-09-12 03:50 PM by Laszlo Nagy
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
2021-07-01 02:51 PM
Macbook Pro M1 Max 64GB ram, OS X 10.XX latest
another Moderator
2021-07-01 04:54 PM
2021-07-01 06:20 PM
2021-07-01 07:08 PM
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 RETURNAnd 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
2021-07-01 09:52 PM
2021-09-10 07:49 PM
Coming back to this, just started to notice an issue with the label that is faceted which looks wrong when exporting to PDF
Macbook Pro M1 Max 64GB ram, OS X 10.XX latest
another Moderator
2021-09-10 08:22 PM
This is how it looks when exported as PDF.
Macbook Pro M1 Max 64GB ram, OS X 10.XX latest
another Moderator
2021-09-14 01:41 PM
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