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.
SOLVED!

how to get rotation of placed window

Anonymous
Not applicable
Hello,

I'm trying to add some horizontally aligned text to the 2d symbol of a window, and have run into some trouble.

I tried to follow the instructions I found here:

http://gdl.graphisoft.com/tips-and-tricks/how-to-make-an-always-readable-text-cs

and here:

https://archicad-talk.graphisoft.com/viewtopic.php?t=47251

My code now looks something like this:

r = request ("View_Rotangle", "", _angleViewRot)
rot2 ((symb_rotangle + _angleViewRot) MOD 360) * (symb_mirrored - not(symb_mirrored))
text2 0, 0 , myText
del 1
however, the variable symb_rotangle is always either 0 or 180, and the variable _angleViewRot is always 0. Did I do something wrong, or is there some other way to do this?

I also found this:

http://gdl.graphisoft.com/reference-guide/doors-and-windows

which seems to imply that symb_rotangle can only be 0 or 180, is this correct?


blob
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Barry Kelly
Moderator
WALL_DIRECTION is the global variable I meant.

I like to add some text to my 2D script to show all the various variables so I can place windows in various rotations, mirrored, flipped, different wall angles and rotate the plan window and see what the values are in each instance.

Space the text out and use different pen colours so you know what each one is - or you could add extra text for a description (but I am lazy).
You can leave it all in the script and just comment it out so it is there if you ever need to check it in the future.

i.e.
PEN 1
text2 0,0, WALL_DIRECTION
PEN 2
text2 0,0.5, SYMB_ROTANGLE
PEN 3
text2 0,1, SYMB_MIRRORED
PEN 4
text2 0,1.5, _angleViewRot
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

View solution in original post

3 REPLIES 3
Barry Kelly
Moderator
I don’t have ArchiCAD with me at the moment.
The symb_rotang will always be 0 or 180 as the window belongs to the wall and can only be placed in one of two rotations.

Angle view rot is of no real value - I think that is the rotation of the plan window.

However there is a wall angle that you will need to use.
I think it is wall_angle that you are after - you will find it in the gdl reference guide.

There is also a global variable for symb_mirrored and another for the reveal side (can’t remember the actual variable without the manual).
These may also be important to determine what is happening to your window when you place it in a wall.

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
Solution
Barry Kelly
Moderator
WALL_DIRECTION is the global variable I meant.

I like to add some text to my 2D script to show all the various variables so I can place windows in various rotations, mirrored, flipped, different wall angles and rotate the plan window and see what the values are in each instance.

Space the text out and use different pen colours so you know what each one is - or you could add extra text for a description (but I am lazy).
You can leave it all in the script and just comment it out so it is there if you ever need to check it in the future.

i.e.
PEN 1
text2 0,0, WALL_DIRECTION
PEN 2
text2 0,0.5, SYMB_ROTANGLE
PEN 3
text2 0,1, SYMB_MIRRORED
PEN 4
text2 0,1.5, _angleViewRot
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
Hi Barry,

This was exactly what I was looking for, thank you!