We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-07-04 01:23 PM - edited 2023-07-04 04:06 PM
I am studying the window in element_test.
However, I understand the location, but I would like to know how to designate the 1. left and right direction of the window and 2. the inside/outside of the wall.
I'd be grateful if you could tell me where to look.
i am a beginner
typedef struct { API_Elem_Head head; API_OpeningBaseType openingBase; API_WindowDoorRevealDepthLocationID revealDepthLocation; double revealDepthOffset; double revealDepthFromSide; double jambDepthHead; double jambDepthSill; double jambDepth; double jambDepth2; bool reveal; bool filler_1[7]; API_Guid owner; double objLoc; double lower; API_Coord startPoint; API_Coord dirVector; API_WindowDoorDirectionTypes directionType; short fixPoint; short filler_2; } API_WindowType, API_DoorType;
Solved! Go to Solution.
2023-07-09 01:55 PM
Check the following picture:
Displayed are all 8 door orientation combinations for two different wall directions
And in the last row, you see how it would be if you'd draw the door manually.
Now we can deduce the following:
2023-07-04 01:42 PM - edited 2023-07-04 01:55 PM
in AC25
In ac25, even though I changed the width from 900 to 1200, it does not work. But after resetting it, it's back to normal.
What's wrong?
After installing another window, this problem has changed to no problem.
in AC26 create window in element_test
2023-07-04 02:09 PM - edited 2023-07-04 04:10 PM
I tried changing the revealDepthLocation, directionType, and fixPoint, but no response.
element.window.fixPoint = APIHoleAnchor_EndFix; seems to work.
What I thought is to make the point when I install the window be the right end point.
It seems to be installed and the bottom right corner is specified.
When specifying this, it seems that moving the insertion point by the width should also be considered.
I didn't do element.window.reveal = true;
I found that element.window.revealDepthLocation = APIWDRevealDepth_Core; did not work.
I'm still looking for the left and right and front and back positioning.
Please tell me at least where I should study
2023-07-04 03:53 PM
The location of the center point of the opening. It is measured from the beginning corner of the wall roof etc., rotated into the direction of the wall reference edge starting from the first corner.
Note that this location can be outside of the wall polygon.
element.window.startPoint = begC; or element.window.startPoint.x = 1000; element.window.startPoint.y = 1000;
No matter what number I put in, there was no change.
I can't pinpoint the exact meaning of this existence.
(objLoc is unused)
There was nothing wrong with using objLoc.
Location of the center of the window. If the container wall is polygonal, this value is not used.
What I'm thinking of is entering the distance from the starting point.
2023-07-04 04:32 PM
question 2
revealDepthOffset
Inset from the clicked side of wall or core (according to revealDepthLocation).
revealDepthFromSide
Calculated inset from the clicked side of wall.
This phrase clearly says that it starts from the clicked side, but I can't.
The clicked value is c3 and obviously entered c2. But nowhere does it use c3 as an option.
c2 is element.window.objLoc = DistCPtr(&c2, &begC);
It just shows the distance.
if (!ClickAnElem("Click a wall to place a window", API_WallID, nullptr, &element.header.typeID, &wallGuid, &c3)) {
WriteReport_Alert("Please click a wall");
return;
}
I don't know how to use the value of c3 from this part.
I would be grateful if you let me know.
2023-07-04 04:55 PM
Whether to use objLoc or startPoint depends on the type of wall the window/door is placed in.
2023-07-04 05:09 PM - edited 2023-07-04 05:10 PM
thank you.^^
If possible, I would appreciate it if you could also tell me the answer to question number 2.
2023-07-05 04:37 PM
Can't you adjust the front and back and left and right of the wall like installing windows in Archicad?
If you tell me it's possible, I'll look for more. ^^
We are waiting for your help. ^^
2023-07-05 10:05 PM
Yes it's possible.
You'll need to change the following three options:
openingBase.reflected
openingBase.oSide
openingBase.refSide
All of them can be true or false. So there are 8 combinations.
They are a bit confusing and I always forget how it works, so it's best to just try all the combinations.
Also be aware of the wall reference line direction, it can have an impact too if I remember correctly.
2023-07-06 04:57 PM - edited 2023-07-06 05:25 PM
Thank you for answer.
But here I have a question.
Usually when you set up a window, if you designate a line, it will be displayed on the outside or inside of the wall.
If so, how is this calculated?
Are you taking the information from the composite wall style and calculating whether it is external or internal?
How can you think outside or inside?
With your answer, I'm on a new path. thank you ^^
if (!ClickAnElem ("Click a wall to place a window", API_WallID, nullptr, &element.header.typeID, &wallGuid, &c3)) {
WriteReport_Alert ("Please click a wall");
return;
}
Can you determine element.window.openingBase.refSide = false or true with the point of c3?