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

Adding text to window and doors object

Anonymous
Not applicable
I was hoping someone could tell me the code for adding in custom text to a window or a door that will rotate in the same direction as the ID. I can do this so either the bottom and right side is correct or the top and left side is correct but I can do figure out the code to get all correct.

Bonus: If would be great if the text matched the ID when the wall is angled too.

I am using AC12 right now and this is what I have for a code. this works for the bottom and right wall only.

rot2 SYMB_ROTANGLE
TEXT2 0, -17", label


Thanks for all of your help.

Camp
5 REPLIES 5
Anonymous
Not applicable
This is actually a pretty thorny problem. As I recall to get it to work in all circumstances you will have to account for the angle of the wall and probably whether things are mirrored (depending on exactly what you want it to do).

I did this for a door tag for a client that also had to swing to align with the open door leaf and it was quite a trick to get it right. For testing I suggest you make one wall with a door and tag, rotate fifteen copies (to cover all possible angle conditions) and then mirror the whole lot.

BTW: This topic should be in the Library Parts/GDL forum.
Erich
Booster
If you are wanting a challenge, this is it. Take a look at some of the doors on Archilib. As I recall there was a test file that laid out all the conditions and the necessary code appears well labeled in the door object(s).
Erich

AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
David Maudlin
Rockstar
Camp:

Another option is to open the Window ID Marker you want to emulate and see how the text rotation/placement is handled there. For instance, if you are using the Basic Window-Door Marker, go to Open Object By Subtype... then drill down to Drawing Symbol > Marker > Window-Door Marker > Basic Window-Door Marker and check the 2D Script to see Graphisoft's solution. As the other posters noted, it will not be simple solution.

You should add a Signature to your Profile (click the Profile button near the top of this page) with your ArchiCAD version and operating system (see mine for an example) for more accurate help in this forum.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Erich
Booster
Just to clarify, it is not that the solution is difficult on a case by case basis. But there are a lot of variables and you must deal with all possible combinations. This is what makes the problem complex.
Erich

AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
Anonymous
Not applicable
Camp,

This code works for me. I was looking for a simple text marker for my windows. I wound up drawing 8 walls in the shape of an octagon and placing 2 windows in opposite directions in each wall. I had text showing SYMB_ROTANGLE and WALL-DIRECTION so that I could narrow down the problem areas. The ADD2 statements are a matter of preference as to where I wanted my text. You can change them to your liking. You should be able to copy and paste at the tail end of your windows 2D script. You could also save an object with the "Marker" subtype and then tell your window to call it. There might be a better way to script it but like I said it works for me. No guarantees.

IF WALL_DIRECTION >90 AND WALL_DIRECTION<270 AND SYMB_ROTANGLE<.0001 THEN
ROT2 180
ADD2 0, -1 5/8"
GOTO 10:
ENDIF
IF WALL_DIRECTION <90 AND SYMB_ROTANGLE>179.9999 AND SYMB_ROTANGLE<180.0001 THEN
ROT2 180
ADD2 0, -1 5/8"
GOTO 10:
ENDIF
IF WALL_DIRECTION>270 AND SYMB_ROTANGLE>179.9999 AND SYMB_ROTANGLE<180.0001 THEN

ROT2 180
ADD2 0, -1 5/8"
GOTO 10:
ENDIF

ADD2 0, 6 11/16"

10:

TEXT2 X, Y, GLOB_ID

Doug