We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

text mirrors on floor plan

Anonymous
Not applicable
After placing purlins on my roof story, each to its correct hight on the gable, I mirrored them to the other side of the house. I have 2D script that automatically places an ID and the Length of the purlin on the plan. When I mirror, it flips the text upside down. I was wondering how to keep it from doing this. I'm still pretty new to this and haven't figured it all out yet. Thanks in advance.
_________________
13 REPLIES 13
Anonymous
Not applicable
Can you attach/write that script (needed part) here?
Anonymous
Not applicable
This is the script as it reads now. I just don't want my text to mirror when I mirror the object.

!PROJECT2 3,270,2

LW=5 1/2"

!!!!!!!!ID!!!!!!!!!!!!!!!!!!!!!!!
nb=a


If labl then
DEFINE STYLE "mytext" "ariel", x_B, 1, 0

set style "mytext"
Text2 2", lw+1/2", x_A

endif

If labl2 then

DEFINE STYLE "mytext1" "ariel", x_B, 1, 0
set style "mytext1"
TEXT2 a-1'-2", lw+1/2", STR ("%ffi",nb)

endif

If labl3 then
DEFINE STYLE "mytext2" "ariel", x_B, 1, 0
set style "mytext2"
TEXT2 a-a/1.9, lw+1/2", x_C

endif


!!!!!!!!nodes!!!!!!!

hotspot2 0, 0
hotspot2 A/2, 0
hotspot2 A, 0
HOTSPOT2 0,LW/2
HOTSPOT2 A/2,LW/2
HOTSPOT2 A,LW/2
HOTSPOT2 0,LW
HOTSPOT2 A/2,LW
HOTSPOT2 A,LW


!!!! show lines regardless of angle!!!

line2 0,0,0,lw
line2 0,0,a,0
line2 0,LW,a,LW
line2 a,0,a,LW







!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

IF LS='Customize' THEN

STRING1 = CN
STRING2 = CI
endif

if jf2 then
set fill JF
poly2_b 5, 2, JP, 91,
0,0,1,
A,0,1,
A,lw,1,
0,lw,1,
0,0,1
endif
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!hanger!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!'Left','Both','None'

if hang = 'Right' then
set fill FP
poly2_b 5, 2, fpp, 100,
0,0,0,
BL,0,0,
BL,-BT,0,
0,-BT,0,
0,0,0

set fill FP
poly2_b 5, 2, fpp, 100,
0,0,0,
0,-2"-BT,0,
BT,-2"-BT,0,
BT,0,0,
0,0,0


set fill FP
poly2_b 5, 2, fpp, 100,
0,BHW,0,
BT,BHW,0,
BT,BHW+2",0,
0,BHW+2",0,
0,BHW,0

set fill FP
poly2_b 5, 2, fpp, 100,
0,BHW,0,
BL,BHW,0,
BL,BHW+BT,0,
0,BHW+BT,0,
0,BHW,0
endif


if hang = 'Left' then

!!!!left

set fill FP
poly2_b 5, 2, fpp, 100,
a-(bl+bt),0,0,
a-(bl+bt),-bt,0,
a-bt,-BT,0,
a-bt,0,0,
a-(bl+bt),0,0

set fill FP
poly2_b 5, 2, fpp, 100,
a,0,0,
a,-2",0,
a-bt,-2",0,
a-bt,0,0,
a,0,0


set fill FP
poly2_b 5, 2, fpp, 100,
a,BHW,0,
a-(bl+bt),BHW,0,
a-(bl+bt),BHW+bt,0,
a-bt,BHW+bt,0,
a,bhw,0

set fill FP
poly2_b 5, 2, fpp, 100,
a,BHW,0,
a-bt,BHW,0,
a-bt,BHW+2",0,
a,BHW+2",0,
a,BHW,0
endif




if hang = 'Both' then
set fill FP
poly2_b 5, 2, fpp, 100,
0,0,0,
BL,0,0,
BL,-BT,0,
0,-BT,0,
0,0,0

set fill FP
poly2_b 5, 2, fpp, 100,
0,0,0,
0,-2"-BT,0,
BT,-2"-BT,0,
BT,0,0,
0,0,0


set fill FP
poly2_b 5, 2, fpp, 100,
0,BHW,0,
BT,BHW,0,
BT,BHW+2",0,
0,BHW+2",0,
0,BHW,0

set fill FP
poly2_b 5, 2, fpp, 100,
0,BHW,0,
BL,BHW,0,
BL,BHW+BT,0,
0,BHW+BT,0,
0,BHW,0
!!!!left

set fill FP
poly2_b 5, 2, fpp, 100,
a-(bl+bt),0,0,
a-(bl+bt),-bt,0,
a-bt,-BT,0,
a-bt,0,0,
a-(bl+bt),0,0

set fill FP
poly2_b 5, 2, fpp, 100,
a,0,0,
a,-2",0,
a-bt,-2",0,
a-bt,0,0,
a,0,0


set fill FP
poly2_b 5, 2, fpp, 100,
a,BHW,0,
a-(bl+bt),BHW,0,
a-(bl+bt),BHW+bt,0,
a-bt,BHW+bt,0,
a,bhw,0

set fill FP
poly2_b 5, 2, fpp, 100,
a,BHW,0,
a-bt,BHW,0,
a-bt,BHW+2",0,
a,BHW+2",0,
a,BHW,0
endif
Barry Kelly
Moderator
4thorns wrote:
After placing purlins on my roof story, each to its correct hight on the gable, I mirrored them to the other side of the house. I have 2D script that automatically places an ID and the Length of the purlin on the plan. When I mirror, it flips the text upside down. I was wondering how to keep it from doing this. I'm still pretty new to this and haven't figured it all out yet. Thanks in advance.
_________________
In your script just before you place the text try this.

IF symb_mirrored = 1 THEN
ROT2 180
ENDIF

Then after the text add this to reset the origin.

IF symb_mirrored = 1 THEN
DEL 1
ENDIF

Or you could try this to always keep your text horizontal.

IF symb_mirrored = 1 THEN
ROT2 symb_rotangle
ELSE
ROT2 -symb_rotangle
ENDIF

Then "DEL 1" after the text.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
I needed to edit this post because I don't think I explained it properly. The text rotates and mirrors within the object fine but it doesn't remain upright. I need it to stay upright within the object regardless of the rotation angle.



!PROJECT2 3,270,2
LW=5 1/2"
IF symb_mirrored = 1 THEN
ROT2 symb_rotangle
ELSE
ROT2 -symb_rotangle
ENDIF

!!!!!!!!ID!!!!!!!!!!!!!!!!!!!!!!!
nb=a


If labl then
DEFINE STYLE "mytext" "ariel", x_B, 1, 0
set style "mytext"
Text2 2", lw+1/2", x_A
endif

If labl2 then
DEFINE STYLE "mytext1" "ariel", x_B, 1, 0
set style "mytext1"
TEXT2 a-1'-2", lw+1/2", STR ("%ffi",nb)
endif

If labl3 then
DEFINE STYLE "mytext2" "ariel", x_B, 1, 0
set style "mytext2"
TEXT2 a-a/1.9, lw+1/2", x_C
ENDIF

!!!!!!!!nodes!!!!!!!

hotspot2 0, 0
hotspot2 A/2, 0
hotspot2 A, 0
HOTSPOT2 0,LW/2
HOTSPOT2 A/2,LW/2
HOTSPOT2 A,LW/2
HOTSPOT2 0,LW
HOTSPOT2 A/2,LW
HOTSPOT2 A,LW


!!!! show lines regardless of angle!!!

line2 0,0,0,lw
line2 0,0,a,0
line2 0,LW,a,LW
line2 a,0,a,LW


del 1
Anonymous
Not applicable
The script looks OK. The text should stay horizontal to the screen at all rotations, mirrored or not. A picture might help.
Anonymous
Not applicable
You're absolutely right. Unfortunately this isn't the outcome I'm looking for. I neglected to show the script that I'm using now. Sorry for wasting your time. I tried sending a png but it was to big.
Anonymous
Not applicable
Let me try this again. If I put my Object and it's text horizontal across the screen then mirror it up the screen the text is upside down. If I rotate it counter clockwise, once it gets past 12:00 it is upside down all the way down to 6:00. What I would like is for this text (lab1,lab2,lab3 in the script) to stay upright in the object regardless of what angle it and the object are positioned. I saved a png of just the two objects (the original and one mirrored) to send with my post. Unfortunately they were deemed too big to send. I still haven't figured that one out because I have seen png's in other posts that had to have been bigger files than mine. Hopefully I'll figure out how to send a picture but until then maybe this explanation of my problem is sufficient.
Anonymous
Not applicable
Because of used frame I understood you so, that you need to see horizontal text only when frame is horizontal. For this case I have overwritten your script with attached one.
But after reading your all post again now I think that you need to have both text with frame always horizontal for purlins labels. Is this your wish? If so then, after you look at my attached object and still have open questions, I will overwrite mines again (to make horizontal label in each case).
RandyC
Advocate
Try attached library part to see if this meets your request ,
you can flip it anyway and text always stays readable-- hope this helps
ArchiCAD 4.5 --- 27 , Win 10 , dual monitors, 64 gb ram,Nvidia GeforceRTX 2080 TI, I-9