We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2006-04-05 05:27 PM
2006-04-11 11:44 PM
line2 0, 0.4, 0, -1
define style "Samu Dinamikus" AC_TextFont_1, AC_TextSize_1, 7, 0
style "Samu Dinamikus"
rot2 -90
text2 -0.4, 0, AC_WIDO_A_SIZE*100
text2 -0.4, -AC_TextSize_1*1.5/10, AC_WIDO_B_SIZE*100
2006-04-12 06:29 AM
2006-04-12 09:08 AM
! Parameters: ! ef_PosW, free adjustable Angle of text to wall ! values "ef_PosW" CUSTOM,RANGE [0,360) ! define font style define style "demo" AC_TextFont_1,AC_TextSize_1,5,AC_TextStyle_1 style "demo" ! reading the window orientation. ! does only work in marker environment ! in this easy way! textAngle = SYMB_ROTANGLE+ef_PosW : gosub 100 ! turn direction if reveal side is changed if AC_WIDO_REVEAL_SIDE = 1 then rot2 180 textAngle = textAngle + 180 : gosub 100 endIf ! rotation to individual position and ! correcting for readable text if selected if textAngle >=90 and textAngle <=270 then rot2 ef_PosW+180*AC_readable else rot2 ef_PosW endif ! output text2 0,0,"marker" end 100: ! keep angle in range 0-360 if textAngle >= 360 then textAngle = textAngle - 360 returnDoing this with labels is similar, but a bit more complicated. AFAIK is there a bug with LABEL_ROTANGLE too, which is fixed in AC9 Hotfix 5 (2219).
2006-04-12 04:28 PM
F. wrote:Thanks, I'll give it a try.
Hello Matthew,
in this case AC helps you very much, because you haven't the total access to the wall and window settings. Paradoxon? No! Because of this the SYMB_ROTANGLE contains the correct orientation of the local coordinate-system to the global. If you would program that inside a window or door you would have to calculate by more parameters than SYMB_ROTANGLE, which would contain just 0 or 180, representing the orientation of the window inside the wall.
2006-04-12 07:43 PM
define style "Samu Dinamikus Jobbos" AC_TextFont_1, AC_TextSize_1, 9, 0(As You can see, I have simplified Mr. Beister's original idea, text is not rotateable and angles can be over 360 degree.)
!Right aligned text style
define style "Samu Dinamikus Balos" AC_TextFont_1, AC_TextSize_1, 7, 0
!Left aligned text style
Samuajtjel_jobbos = true
!If true, text is aligned to right
if AC_WIDO_REVEAL_SIDE = 0 then
line2 0, -1-AC_WALL_THICKNESS, 0, .5
else
Samuajtjel_jobbos = not ( Samuajtjel_jobbos )
line2 0, 1, 0, -.5-AC_WALL_THICKNESS
add2 0, -AC_WALL_THICKNESS
endif
if SYMB_ROTANGLE>45 and SYMB_ROTANGLE<225 then
rot2 -90
else
rot2 90
Samuajtjel_jobbos = not ( Samuajtjel_jobbos )
endif
if Samuajtjel_jobbos = true then
style "Samu Dinamikus Jobbos"
else
style "Samu Dinamikus Balos"
endif
text2 0, 0, AC_WIDO_A_SIZE*100
text2 0, -AC_TextSize_1*1.5/10, AC_WIDO_B_SIZE*100
2006-04-13 03:08 PM
Sam wrote:Sam:
One (and the last main) problem to solve is decide whether this is a window or a door, since the for the window we have to define the height of the parapet (the wall under the window).
My next question is how to modify (or is it possible) an existing window easily. Because I want to use built in or readily got windows, for example, but I also want to see my 2D drawings. So the 3D, and other difficult stuffs (database connectivity, etc) must be the same as a well workjing window or door, but the 2D symbol has to be mine (not only the text, but the window drawing, too).
Is it difficult?
2006-04-18 06:33 PM
define style "Samu Dinamikus Jobbos" AC_TextFont_1, AC_TextSize_1, 9, 0Another, quite absurd problem, that the Archicad puts the door markers to the wrong side of the door, the SE 2006 symbols put them to the reveal side of the door, which is the 'inner' side. In Hungary, we put them to the 'outer' side. It is not a problem, but the windows have the opposite direction. If I optmimize my script to a door, it will be bad for a window, and vice versa. Do You have the same problem?
define style "Samu Dinamikus Balos" AC_TextFont_1, AC_TextSize_1, 7, 0
define style "Samu Dinamikus Közepes" AC_TextFont_1, AC_TextSize_1, 8, 0
Samuajtjel_jobbos = true
if AC_WIDO_REVEAL_SIDE = 0 then
line2 0, -1-AC_WALL_THICKNESS, 0, .5
else
Samuajtjel_jobbos = not ( Samuajtjel_jobbos )
line2 0, 1, 0, -.5-AC_WALL_THICKNESS
add2 0, -AC_WALL_THICKNESS
endif
if SYMB_ROTANGLE>45 and SYMB_ROTANGLE<225 then
rot2 -90
else
rot2 90
Samuajtjel_jobbos = not ( Samuajtjel_jobbos )
endif
if Samuajtjel_jobbos = true then
style "Samu Dinamikus Jobbos"
else
style "Samu Dinamikus Balos"
endif
text2 0, 0, AC_WIDO_A_SIZE*100
text2 0, -AC_TextSize_1*1.5/10, AC_WIDO_B_SIZE*100
if (AC_GLOB_ELEVATION <> 0) or SAMU_PARAPET_KELL = 1 then
if (SYMB_ROTANGLE>45 and SYMB_ROTANGLE<=90) or (SYMB_ROTANGLE>=225 and SYMB_ROTANGLE<270) then
rot2 90
else
rot2 -90
endif
style "Samu Dinamikus Közepes"
if (SYMB_ROTANGLE>90 and SYMB_ROTANGLE<270 and AC_WIDO_REVEAL_SIDE = 1) or ((SYMB_ROTANGLE<=90 or SYMB_ROTANGLE>270) and AC_WIDO_REVEAL_SIDE = 0) then
text2 0, -AC_WALL_THICKNESS-.3, SAMU_PARAPET + str (AC_GLOB_ELEVATION,3,0)
else
text2 0, AC_WALL_THICKNESS, SAMU_PARAPET + str (AC_GLOB_ELEVATION,3,0)
endif
endif