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

Custom Window Object Wallhole Issue in ArchiCAD 16

Matt Balaam
Advocate
Hi,

I have just started converting from AC14 to AC16 and am trying to work out a strange bug with a custom window I have created.

The basic idea is (and this worked perfectly in AC14) that the window uses the story height and a few parameters to automatically determine the correct head height. It then counteracts any sill/head height that is set in the settings dialog and moves the window up to the correct head height. This then changes when the story height changes to ensure the window is always at the correct height with no user input.

When I run this in AC16 I am getting strange results, basically the height is not being calculated correctly at run time.

I set a variable for the pitching height:
pitching = int(GLOB_HSTORY_HEIGHT * 1000)
Then I use this variable and other parameters to determine the sill and head heights of the window. The issue arises in the 3D window. If I print the value of this variable it prints twice, once with the correct value and once with a 0 value. I use the following code at the beginning of the 3D script to set the window at the correct height:
addy -WIDO_SILL_HEIGHT + sillHeight
The window itself uses the value correctly and sits where it should in the wall, but the wallhole uses the 0 figure and wont move. In the settings dialog only the correct number prints which suggests it's something to do with the wall?

Any ideas on why this happens or how to fix it?
AC24 (7000 AUS FULL)| Windows 10 Pro | Intel Core i7-12700 @ 2.1GHz | 32GB RAM | NVidia T1000
1 REPLY 1
Matt Balaam
Advocate
For future reference if anyone else strikes this issue I have found the solution.

Story information is not available directly in the 3D window (or elevations, sections etc. it seems) so GLOB_HSTORY_HEIGHT cannot be used reliably. You can however access the story information another way which works in any environment.

First you find the index of the home story then access the height information of this story. I used the following code to get the story height:
success = request("Home_story_of_opening", "", index, story_name)
success = request("Story_info", index, nStories, index, name, elevation, height)
The height value returns the height of the windows home story.

Hope this helps someone in the future.
AC24 (7000 AUS FULL)| Windows 10 Pro | Intel Core i7-12700 @ 2.1GHz | 32GB RAM | NVidia T1000