Door/Window Marker - How to tell when mirrored?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-05-31
08:41 AM
- last edited on
2023-05-24
12:36 PM
by
Rubia Torres
I have made a custom door/window marker for our company which is all working smoothly except for one thing. I am trying to make the marker capable of knowing which orientation the window is facing i.e. North, South etc. This works fine when the window is first placed, but if the wall containing the window is mirrored, the orientation is wrong.
In any other object I would use SYMB_MIRRORED to correct for this, however doors/windows and their associated markers don't seem to have any way of knowing when they are mirrored.
Does anyone know of a way to tell if a marker is mirrored?
Thanks,
Matt
PS I am using the marker with Cadimage Doors+Windows for AC14

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-05-31 02:38 PM
IF SYMB_ROTANGLE > 90 AND SYMB_ROTANGLE < 270 THEN textAngle = 180 ELSE textAngle = 0
GDL object creation: b-prisma.de
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-06-01 12:28 AM
The problem I am having is to do with the orientation relative to project north which becomes incorrect as soon as the wall containing the door/window is mirrored.
Joachim wrote:
I have just used for a door marker the following script part:
IF SYMB_ROTANGLE > 90 AND SYMB_ROTANGLE < 270 THEN textAngle = 180 ELSE textAngle = 0

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-06-01 06:46 AM
So you will need to use ... WALL_DIRECTION ... as well.
The mirroring of the window shouldn't have any affect.
SYMB_MIRROR has no value with doors/windows.
Add this script to the beginning of the 2D script of you window and you will see the values change as you rotate and flip the direction of the wall.
text2 0,1, WALL_DIRECTION
text2 0,2, SYMB_ROTANGLE
Barry.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-06-02 02:47 AM
That creates the next question however, it seems there is no way to determine the construction method of the wall (left, centre, right) and as such the WALL_DIRECTION is useless.
In the attached image you can see my problem. The wall on the left is drawn in our usual method and the window direction works properly, if the wall is mirrored (which we commonly do to an entire house) the direction does not change, only the construction method of the wall, which from what I can tell can't be determined and therefore can't be corrected for.
Can anyone think of a way around this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-06-02 05:49 AM
The window will only ever be 0 or 180 depending on whether the wall was drawn left to right or right to left.
But the wall can be any angle.
I add both together and add anothe 90 so the anle matches the archicad bearings (ie 90 = north).
The if greater than 360 then subtract 360 so you are left with a figure between 0 and 360 which will match you compass bearings.
Now you just match the angle with the direction you want to show in you marker (I think you have that sorted).
win_dir = (SYMB_ROTANGLE+WALL_DIRECTION+90)
IF win_dir>=360 THEN win_dir=win_dir-360
Barry.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-06-02 06:19 AM
How are you getting the SYMB_ROTANGLE to always be 0 or 180°?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-06-02 06:52 AM
mcjh_matt wrote:Nothing special.
Interesting...I must be doing something differently because my SYMB_ROTANGLE always matches the wall direction. If I can get it to be 0 or 180 it would solve the problem.
How are you getting the SYMB_ROTANGLE to always be 0 or 180°?
As I mentioned before I just added this script to the beginning of the 2D script.
text2 0,1, WALL_DIRECTION
text2 0,2, SYMB_ROTANGLE
Are you using a standard Archicad window - if so which one?
What is the snippet of code you are using to write the text for wall direction and symbol rotation?
Barry.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-06-02 07:05 AM
codetext_1 = str(SYMB_ROTANGLE, 1, 0)
codetext_2 = str(WALL_DIRECTION, 1, 0)
...then the SYMB_ROTANGLE matches the WALL_DIRECTION every time.
I am using the Cadimage window for AC14 however I just tried it on a standard AC window and had the same result.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2011-06-02 07:39 AM
Definitely different values for me.
You are not accidentally using the codetext_2 variable for both bits of text are you?
Using your code I got the same result as before so I don't know what the difference is if you didn't use the same variable for both.
This is the exact code I used.
codetext_1 = str(SYMB_ROTANGLE, 1, 0)
codetext_2 = str(WALL_DIRECTION, 1, 0)
text2 0,1, "WALL_DIRECTION = " + codetext_2
text2 0,2, "SYMB_ROTANGLE = " + codetext_1
Barry.
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