Tip on using GDL to solve a trimmed zone height listing problem
TechTip of the Month Contest Winner of July 2004:
Tom Prokopchak's tip on using GDL to solve a trimmed zone height listing problem!
September 27, 2004
"(...)
I changed "Zone Identifier 2.gsm" to that the ceiling "Height Type" (ceiltype) to include the word "VARIES". This works great when a room has a sloped ceiling -- the floor plan says "VARIES" just like I wanted it to. However, the room schedule I created still says 10'-0" (or whatever the default height is) instead of "VARIES".
As far as I can tell there is now way to get the schedule to use the term "VARIES" when ceiltype is set to "VARIES", and put the actual height in when ceiltype is set to "Value". So the stamps look great on the floor plan, but the schedule still hase to be faked with a text element that says "VARIES".
Is there any way around this, or am I stuck faking in the text?"
First, let's begin by modifying the zone stamp to display "VARIES" instead of "Typical" (INT version, Zone_Stamp_02 - note that library part names may vary by localized versions of ArchiCAD). To do this, place a zone of a category that is using Zone_Stamp_02, select the stamp by one of its corners and go to File.../GDL Objects > Open Object... to open it for editing. (It is recommended to save it under a different name e.g. Zone_Stamp_02_A prior to editing in order to avoid possible complications. (File.../Save As...) If you do so, make sure to load the library that you saved it in with the Library Manager and change the default setting of the Zone Category in question to use this new zone stamp - go to Options.../Zone Categories.../Edit Selected Category and select the newly created stamp.)
Now open the zone stamp object again. Click on the large button at the left that says Parameters, scroll down to the variable called ceiltype and click on its row. When it is highlighted, click on the arrow pointing to the right - a small menu will pop up allowing to choose between "Typical" or "Value". (See screenshot below).
To change the word "Typical", choose the Parameter Script button to the left. This will display the object's parameter script. Just above the first IF ... THEN statement, you will find the line
values "ceiltype" `Value`,`Typical`
This line defines the values the parameter ceiltype can take. Simply type the word VARIES in the plae of Typical then save the object. (See screenshot below)
Once this is set, you can choose to display the word "VARIES" on the floor plan instead of the actual value if you desire - just select the zone stamp, open the Zone Selection Settings dialog, scroll down to the Show Ceiling Height section of the parameter list in the Zone Stamp field, and choose the option VARIES for the parameter Height Type.
In order to get the Interactive Schedule to list these zones with the word VARIES instead of their default height, do the following:
- In the Zone Stamp object, open the master script (to the left below the Descriptors button), and type into it:
Q=str ("%0#.16ffi",ROOM_HEIGHT)
if ceiltype = "Varies" then parameters Schedule = "VARIES" else parameters Schedule = Q
If you now click on the Check script button, a warning will appear: - It says that we haven't created the parameter Schedule yet. So, let's open the parameter window of the object (Parameters button to the left), and create a new parameter (New button at the top of the window), hide it (button in the same row with a big X), rename the variable to "Schedule", set it to text and give it a name i.e. Hidden Schedule (follow steps in the screenshot below):
- Now in the parameter script window, the Check Script will tell you the script is OK.
- Save and close the zone stamp object.
- Then in the IS setup reference the parameter "Schedule" rather than the "ROOM_HEIGHT" parameter and title the column as you wish. For this, you have to create a zone schedule (if you already haven't one). Of course choose to list the zones (Element type = Zone) on the first General tab page.
- On the next page called Fields you can choose what parameters of the selected object you would like to include in the schedule. Check the parameters you want in the left tree, they will appear in the right field instantly. In our example we chose Room name, Area, Zone Category, Height. To include the new, hidden parameter of the zone in our Schedule, you have to click on the Additional Parameters... button to the bottom left of the dialog.
- A new dialog window will open. In the upper part, select to show library part types 'All Types by Subtype', then in the tree shown below navigate to General GDL Object/Drawing Symbol/Zone Stamp/Zone_Stamp_02_A. To the right of the tree select only the parameters of the type Text to be listed in the lowest field.
- In the Select Parameters for Listing part of the dialog, now all parameters of the type text are selected. Uncheck all that are not needed, but leave the checkbox beside the Hidden Schedule parameter checked. Click on OK to close the window. (See screenshot below for help)
- The parameter Hidden Schedule will appear in the Parameters to list field in the Schedule Settings dialog's Fields tab page. Arrange the look and feel of the schedule as desired on the following two tab pages (Format and Schedule Element) then click on OK.
- Go to Calculate/Interactive Schedule>Preview... select the Schedule that's just been set up and click on the Place button to the right (below Schedule on Drawing) to place it on the floor plan, then close the window. If now you choose to display VARIES on the floor plan instead of the Zone Height in the Zone Selection Settings dialog, your placed Schedule object will display the changes immediately (after having issued an Update command from the Calculate/Interactive Schedule>Preview... dialog (remember to select the object prior to trying to update it)).
- Hint: check the User's Manual for tips on formatting the layout of your schedules. There are several possibilities for the output of the Schedule as well - you can even choose the export to Excel... For the value of the ROOM_HEIGHT variable to be displayed in metric units type
Q=str ("%0.2m",ROOM_HEIGHT)
- see ArchiCAD Help on STR for details and more options.
Page last updated: Monday, September 27, 2004
