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.

ac_bottomlevel and ac_toplevel parameters

sinceV6
Advocate
Hi everyone.
I've been using the typical parameter settings (ac_bottomlevel=0 and ac_toplevel=ZZYZX) for most of my objects, and they work all right as long as the object is confined between those parameters.

Now I'm trying to do what is displayed, in a very simple form, in the attached image. The basic explanation: two stacked cubes. The base elevation for the object, should be where both cubes meet, top and bottom should grow from this point. That's easy. The problem is that I want to show the top part in stories above and the bottom part in stories below using ac_bottomlevel and ac_toplevel.

If set as standard, the bottom part won't show unless the top part intersects the story below, which I don't want. If I set the bottom_level to be the lower part of the object, the base and top levels (in info box) start acting weird.

I did my research, read the scattered posts about these parameters, but just can't grasp the whole concept of how they are linked. I mean... I do, but there's something weird going on I can't figure out.

It was said that these parameters "start from the object origin of the object", but don't really understand that. The global GDL origin? The local GDL origin? The object origin once placed in floor plan?

I can't set ac_bottomlevel different from 0 or "b:" will display this (plus its elevation to home story); and "t:" will display the level according to its height or ZZYZX, but still I can set ac_toplevel independently to be quite above "t:"; also, I've been struggling to use ac_bottomlevel set different from 0, as any change to b: or t: in the info box will be changed because of this difference.

What would be the correct scripting approach to this? How can I set parameters so:
ac_bottomlevel is at bottom of object
ac_toplevel is at top of object
b: reads 0 when placed in story 0 and 0 elevation
t: reads the top of the object, not its height minus bottomlevel (ZZYZX-ac_bottomlevel, as I can see)
z: (in coordinates palette) reads correct values.

thanks in advance.

levels.png
16 REPLIES 16
sinceV6
Advocate
And a few simple objects with scripting options I've been playing with to find the answer.

Same object, 3 times, but levels and height work in different ways. ac_bottomlevel and ac_toplevel are displayed in settings dialog so I don't have to open the object every time I want to change them while debugging.
Anonymous
Not applicable
Doing this from my iPad so I can't check anything and I'm not entirely sure but...

It seems that it should work if you decouple the model from the ac_top and ac_bottom parameters. That is, use your own parameters to drive the model and use the PARAMETERS function to force the values to the ac top and bottom pars.
sinceV6
Advocate
Hi Matthew. Thanks for your reply.

The model (height is the issue here) is driven by ZZYZX, and its bottom and top values are passed to ac_bottomlevel and ac_toplevel using PARAMETERS command like you say, not the other way around. (should I try that though? )

In the attached objects, the bottom block has its height driven by a separate parameter, as in the full model its a value that is not going to change often.

The top block might need adjustments more often, so I would like its values to be shown in the info box, but somehow the get shifted if ac_bottomlevel is not 0.

If your suggestion is to separate the model from ZZYZX, I've done that also, but it kind of defeats the purpose of using the values shown in the infobox, as I would need to use PARAMETERS to tell AC the new ZZYZX value...
Anonymous
Not applicable
Don't use ZZYZX at all for this part. It generally causes problems with parts that extend below the origin.

Create your own parameters for the heights and then force the values to the ac_* parameters.
sinceV6
Advocate
Yeah, tell me about it.

Using separate parameters alleviates a few issues and leaves others (such as a ghost box in a different level when moving the object). What I've found is that while ac_top is not entirely linked to other parameters (e.g. i can set ac_toplevel as high as I want the object to be shown), ac_bottomlevel is quite different, and affects other parameters height or level related.

I think it shouldn't work this way, as those two parameters are there to tell AC the height of the object; so A, B and ZZYZX become the base measurements of the object (independently if some parts go beyond these) and ac_bottomlevel and ac_toplevel are used to tell AC a calculated height of it.

In the end, IMHO, the "Show in all relevant stories" option should be 3D-model driven and fully automatic.

I'll see what I can come up with. Thanks
Anonymous
Not applicable
It is a big pain in the fenėk.

I assume it's a legacy issue. The A and B parameters are ancient and ZZYZX is getting pretty old too. They worked fine back in the day but it seems that some of the decision made way back when are creating problems as we push the parts to do more. Although ZZYZX's inability to be mirrored through the XY plane has been a problem since day one.
Laszlo Nagy
Community Admin
Community Admin
FYI:

fenék (Hungarian): posterior. (It is not a dirty word, but of course, it has many synonyms, just like in English)
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27
vistasp
Advisor
laszlonagy wrote:
FYI:

fenék (Hungarian): posterior. (It is not a dirty word, but of course, it has many synonyms, just like in English)
Every day I learn something new.
= v i s t a s p =
bT Square Peg
https://archicadstuff.blogspot.com
https://www.btsquarepeg.com
| AC 9-27 INT | Win11 | Ryzen 5700 | 32 GB | RTX 3050 |
Anonymous
Not applicable
What would be the correct scripting approach to this? How can I set parameters so:
ac_bottomlevel is at bottom of object
ac_toplevel is at top of object
b: reads 0 when placed in story 0 and 0 elevation
t: reads the top of the object, not its height minus bottomlevel (ZZYZX-ac_bottomlevel, as I can see)
z: (in coordinates palette) reads correct values.

Maybe this can help you:

I´m developing a sewer shaft object. The bottom and top levels are displayed correctly on the Info box (with posibility to change that values).

Add this to Master Script:

EPS=0.00001 !-----Error checking ----------------

GLOB_ELEM_TYPE = 1 !----- element type (1= Object)
!!**** ac_bottomlevel
ac_bottomlevel = GLOB_ELEVATION + GLOB_HSTORY_ELEV
IF GLOB_ELEVATION < EPS THEN
!!**** ac_toplevel
ac_toplevel = GLOB_ELEVATION + ZZYZX + GLOB_HSTORY_ELEV
ELSE
ac_toplevel = ZZYZX + GLOB_ELEVATION + GLOB_HSTORY_ELEV
ENDIF
!------------------------------------------------------------------------------------------
IF GLOB_ELEVATION <= EPS THEN
GLOB_ELEVATION = GLOB_ELEVATION - a*2
ENDIF
!------------------------------------------------------------------------------------------
Sewer Shaft_Display by Story_01.jpg