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

Scripting doors

Erich
Contributor
I am scripting a custom door object that can be a single or double door, have sidelights, transoms etc. and thus far all is working well.

However, in 2D when I turn on the sidelights what is the best way to get a correct wall opening? Right now I am forcing a variable to the values needed to account for the sidelight width beyond the values of A and then using this variable in the details section ("Wall opening oversizing relative to the nominal (A and B) sizes"). While this does work it seems a bit ad hoc and very dirty.
	IF sidelite='Left side'  THEN   
		VALUES "lsd" xsidelite_l+mullion
		VALUES "rsd" 0
	ENDIF

	IF sidelite='Right side'  THEN   
		VALUES "lsd" 0
		VALUES "rsd" xsidelite_r+mullion
	ENDIF

	IF sidelite='Both'  THEN   
		VALUES "lsd" xsidelite_l+mullion
		VALUES "rsd" xsidelite_r+mullion
	ENDIF

I have also tried using the WALLHOLE2 command, but it does not seem to work the way that I want (although I suspect that this is my lack of knowledge).

Does anyone have some guidance?

edit: image and code added for clarification

Picture 1.png
Erich

AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
5 REPLIES 5
When I did my doors I used masking elements in the 2D symbol to cover irregularities in the 2D opening. WALLHOLE2 did not exist then. So this is from investigation rather than experience, but it looks like the advantage of WALLHOLE2 is that unlike standard POLY2s they can cut the wall rather than simply mask it. The disadvantage is that WALLHOLE2 polygons can't have a contour, so you need additional 2D line shapes. Like WALLHOLE in 3D, WALLHOLE2 replaces the default A-width opening.

The 'oversizing' is a separate issue from the graphical appearance of the 2D symbol. You still need to use the oversizing values in order to get the opening to show the sidelight width when the doors are 'off' in Model View Options.
James Murray

Archicad 25 • Rill Architects • macOS • OnLand.info
Erich
Contributor
James,

What type of masking element did you use? Just a fill with the poly lines turned off appropriately? This would still leave the section of wall below your fill, correct?

While dirty this oversize method does correctly display the 2D wall cut and is variable with changes to the sidelight lengths (as well as the oversize variable).

When I tried the Wallhole2 command, I got it masking only one side of the wall and not the other. Although, as I write this I wonder if I was inside a MUL2 that flipped my "y" axis...I will have to check on that.
Erich

AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
Erich
Contributor
OK,

Now that I am not quite as brain dead as I was when working on this before, I can get the WALLHOLE2 command to work as expect, my "Y" coordinates were flipped and so were outside of the wall.

This seems to be a much better way to handle the situation. Of course I, this method does not seem to work with a curved wall as the Wall hole remains straight. Or must we script for the curve as we would for trim and frames?
Erich

AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
• In the old days you would just use POLY2_Bs to mask the cut part of the wall, yes.

• Curved walls need to be handled explicitly with curved symbol stuff. The key point is the global variable WIDO_ORIG_DIST (R_).

• Not sure what the goal is with your VALUES statements. It looks like you're trying to set the right and left distances depending on whether there's a sidelight. For that you should use PARAMETERS:

IF sidelite='Left side'  THEN
      lsd=xsidelite_l+mullion
      PARAMETERS lsd=lsd
      rsd=0
      PARAMETERS rsd=rsd
ENDIF 
• The oversizing fields can have arithmetic in them, but IIRC any variables used must be parameters, not ordinary variables initialized in a script.

So, lsd and rsd have to be parameters in the parameter list. You should hide these to avoid distracting the user.
James Murray

Archicad 25 • Rill Architects • macOS • OnLand.info
Erich
Contributor
Does anyone know a any good guides for scripting wall closures/returns for windows and doors? I have looked at the technical standards and basic library documentation but most of the image links are broken and even when they aren't there isn't much help there.

Thanks

edit: Never mind, I think I got it now.
Erich

AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K