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.

Modifying the Zone Stamp

kevin b
Contributor
I would like to modify the Zone Identifier 2 stamp. We have been using an old, stamp we purchased which allowed two lines of text but you had to put a special character in the name to do a hard return, but with the word wrap feature it is no longer necessary, however I'd like to make a seemingly minor modification and I know just enough GDL (very little) to make myself dangerous.

I would like to have the ability to use the word wrap feature for the zone name and resize as needed for the plan, however, I'd like to fix the size of the frame around the zone (room) number, or actually so that the frame around the number would adjust to the size of the text it is containing, independent of the length of the name of the zone. See the attached for clarification.

Any help would be greatly appreciated.

zonestamp.jpg
kevin s burns, AIA

massachusetts, usa



AC25 (1413), since AC6

Windows 10

Intel Core i7 -8700 @ 3.2 GHz~ 16 GB ram
2 REPLIES 2
Erika Epstein
Booster
I know someone will help you with this, but as what you are asking for is desired as an option by so many, including myself, I hope you will make a wish out of this
Erika
Architect, Consultant
MacBook Pro Retina, 15-inch Yosemite 2.8 GHz Intel Core i7 16 GB 1600 MHz DDR3
Mac OSX 10.11.1
AC5-18
Onuma System

"Implementing Successful Building Information Modeling"
David Maudlin
Rockstar
Kevin:

This is I bit of a hack. At line 226 of the 2D Script of the Zone Identifier 2 14, there is some code that starts:
	max_len = max (	w_roona 			* name,
	…
				w_roovol 			* volume)
That determines the width of the text box rectangle, using the longest of 10 options (for the various information that could be displayed in the text boxes). The one you are interested in is:
w_roonu
at line 228, which gives the length of the zone number text (with a bit extra for the width of the rectangle).

Then down at line 375 is the code for drawing the text box rectangle:
if numRow > 1 then rect2 0,-tBlockHeight[1],widthStamp,-vlen
You can modify this code to change the widthStamp (which is the maximum of all text options) to w_roonu which is the <zone number> text length (I think you are using the Zone Number for the Room Number in your illustration, the Room Number is another option in this zone object). So this code:
if numRow > 1 then rect2 widthStamp/2-w_roonu/2,-tBlockHeight[1],widthStamp/2+w_roonu/2,-vlen
should draw the rectangle to fit the Zone Number. (It is a bit convoluted since the rectangle is normally drawn starting at the left edge of the Zone Stamp, but the zone number is shorter than the Zone Name, so I have used 1/2 of widthStamp to get to the center, then added and subtracted 1/2 of w_roonu to draw the rectangle.)

There is an option for Lines Between Details that I have turned off, it is using the same parameters as the rectangle to draw these lines, so it is not needed if the rectangle contains only one listing.

Now this all gets more complicated if you want to use more text display options, as the rectangle width is determined by the Zone Number, so other text could be longer than this. Also, a similar fix would be needed to show the Lines Between Details.

This should get you started, but as I said is a hack so would need more work depending on the various options you want to enable.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14