License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Door/Window Marker - How to tell when mirrored?

Matt Balaam
Advocate
Hi all,

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
AC24 (7000 AUS FULL)| Windows 10 Pro | Intel Core i7-12700 @ 2.1GHz | 32GB RAM | NVidia T1000
12 REPLIES 12
Jochen Suehlo
Moderator
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
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
Matt Balaam
Advocate
Thanks Joachim, I am already using similar code for text rotation.

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
AC24 (7000 AUS FULL)| Windows 10 Pro | Intel Core i7-12700 @ 2.1GHz | 32GB RAM | NVidia T1000
Barry Kelly
Moderator
You also need to take into account the direction the wall was drawn.
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.
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
Matt Balaam
Advocate
Thanks Barry, now I understand why they were changing, I didn't think about the construction method of the wall changing.

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?
AC24 (7000 AUS FULL)| Windows 10 Pro | Intel Core i7-12700 @ 2.1GHz | 32GB RAM | NVidia T1000
Barry Kelly
Moderator
You need to add the SYMB_ROTANGLE+WALL_DIRECTION together.
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.
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
Matt Balaam
Advocate
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°?
AC24 (7000 AUS FULL)| Windows 10 Pro | Intel Core i7-12700 @ 2.1GHz | 32GB RAM | NVidia T1000
Barry Kelly
Moderator
mcjh_matt wrote:
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°?
Nothing special.
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.
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
Matt Balaam
Advocate
If I use this code to generate the text for my marker...

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.
AC24 (7000 AUS FULL)| Windows 10 Pro | Intel Core i7-12700 @ 2.1GHz | 32GB RAM | NVidia T1000
Barry Kelly
Moderator
Sorry you mentioned cadimage windows earlier.

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

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!