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

Zone Tool - Flooring Types

Anonymous
Not applicable

How do I add more floor types to the drop-down in the Zone Tool, Edit Content Flooring, Floor types? Parquet/Tiles/Screed/... Is there a manager to add that type of property item?
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Laszlo Nagy
Community Admin
Community Admin
Hi Draw,

The list of available Floor Types is scripted in the Zone. It is possible to change it with the use of some GDL Scripting.
In the following few posts I will detail how to do it. I will also attach the modified GSM files in a ZIP file.

1. Select the Zone Stamp and use the "File > Libraries and Objects > Open Object" menu command to select its GDL source for editing. My Zone was using the "Zone Stamp 02 23" GDL file.
2. Use the "Save As" command to save it into the Embedded Library under a new name. In this example, I save it under the name "Zone Stamp 02 23_Extended Floor Types" for better identification.
The reason you have to save it under a new name is because default ARCHICAD Library content is usually packed into a single LCF (Library Container File) and you cannot save modified GSM files into that.
3. Now we can start looking at the Scripts of the Zone Stamp. Since this is a 2D element, we may find the definition of those Floor Type values in either the Master Script, the 2D Script or the Parameter Script. The 2D and Parameter Scripts are empty, and the Master Script is very short.
It contains the following line:
call "Zone_stamp_macro" parameters all iStampType = 1			! ZONE_STAMP_2_INT
This means that it is calling a macro, so we will need to look into that GSM file as well.
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-Ac28

View solution in original post

8 REPLIES 8
Hello Draw,

I do not use this option but I create my own floor parameters and call them into my zone stamps.
I do not know if it is easy or not to add more floor references. 😕
Christophe - FRANCE
Archicad Designer and Teacher
Archicad 15 to 27 FRA FULL

OS 13 Ventura - MacBook Pro M2 max- 32Go RAM
"Quality is never an accident ; it's always the result of an intelligent effort" John Ruskin
Solution
Laszlo Nagy
Community Admin
Community Admin
Hi Draw,

The list of available Floor Types is scripted in the Zone. It is possible to change it with the use of some GDL Scripting.
In the following few posts I will detail how to do it. I will also attach the modified GSM files in a ZIP file.

1. Select the Zone Stamp and use the "File > Libraries and Objects > Open Object" menu command to select its GDL source for editing. My Zone was using the "Zone Stamp 02 23" GDL file.
2. Use the "Save As" command to save it into the Embedded Library under a new name. In this example, I save it under the name "Zone Stamp 02 23_Extended Floor Types" for better identification.
The reason you have to save it under a new name is because default ARCHICAD Library content is usually packed into a single LCF (Library Container File) and you cannot save modified GSM files into that.
3. Now we can start looking at the Scripts of the Zone Stamp. Since this is a 2D element, we may find the definition of those Floor Type values in either the Master Script, the 2D Script or the Parameter Script. The 2D and Parameter Scripts are empty, and the Master Script is very short.
It contains the following line:
call "Zone_stamp_macro" parameters all iStampType = 1			! ZONE_STAMP_2_INT
This means that it is calling a macro, so we will need to look into that GSM file as well.
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-Ac28
Laszlo Nagy
Community Admin
Community Admin
4. Select the name of the macro in the script (the characters between the two parentheses) and press CTRL+SHIFT+O on Windows (the keyboard shortcut for the "Open Object" command to open it for editing). On the Mac, the shortcut is probably CMD+OPT+O, although I am not certain, I don't have a Mac.
5. Save it into the Embedded Library under a new name. It must be done for the same reason as in previous steps. In this example, I save it under the name "Zone_stamp_macro_extended_floor_types".
6. Now we need to find where those Floor Type values are defined. I searched all three Scripts mentioned above for the text "screed", because that is a rare enough text. Indeed, I found only a single occurrence. In the Master Script, I found this code:
dim stFloorCoveringValues[4]
	stFloorCoveringValues[1] = `Parquet`
	stFloorCoveringValues[2] = `Tiles`
	stFloorCoveringValues[3] = `Screed`
	stFloorCoveringValues[4] = `Carpet`

Here we can see that the first line defines an array variable with 4 members, which will store the 4 possible values for Floor Types. (The "Custom" option is added to the list of possible values later, but fortunately, we do not have to deal with that part for this to work.)

So, all we need to do is modify this list to include all the values we wish to use.
I have modified this code to the following:
dim stFloorCoveringValues[10]
	stFloorCoveringValues[1] = `Bamboo`
	stFloorCoveringValues[2] = `Carpet`
	stFloorCoveringValues[3] = `Cork`
	stFloorCoveringValues[4] = `Laminate`
	stFloorCoveringValues[5] = `Parquet`
	stFloorCoveringValues[6] = `Rubber`
	stFloorCoveringValues[7] = `Screed`
	stFloorCoveringValues[8] = `Tiles`
	stFloorCoveringValues[9] = `Timber`
	stFloorCoveringValues[10] = `Vinyl`

I have included 10 possible values and rearranged them alphabetically so they are easier to find.
Then I just saved these changes and I closed the macro GSM file since we are done modifying it.
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-Ac28
Laszlo Nagy
Community Admin
Community Admin
7. Now we need to modify the Master Script of our custom Zone Stamp to call this new macro instead of the default macro. So, in the Master Script of the "Zone Stamp 02 23_Extended Floor Types" file, we take this line of code:

call "Zone_stamp_macro" parameters all iStampType = 1			! ZONE_STAMP_2_INT

and modify it to call the new macro:

call "Zone_stamp_macro_extended_floor_types" parameters all iStampType = 1			! ZONE_STAMP_2_INT


8. Save changes to our custom Zone Stamp and close it as we are finished editing it.
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-Ac28
Laszlo Nagy
Community Admin
Community Admin

9. Now all we need to do is go to the "Options > Element Attributes > Zone Categories" Dialog and make sure our Zone Categories are using the new custom Zone Stamp instead of the default one.
Here is how it looks now with the new fields:

 

CustomZoneFloorTypes.png


The attached ZIP file contains the Zone Stamp and the Macro.
There are two possible scenarios for future use.
You need to make sure you include these GSM files in the Project File by adding them to the Embedded Library, or by placing them into a Linked Library, for example the Office Library. Adding them to the default ARCHICAD Library might not be the best idea because it might get lost when the Library is updated at a later point.

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-Ac28
Anonymous
Not applicable
Thanks you. Very comprehensive explanation. Just wish that they would make it easier to access and adjust info like that through a manager type interface. Not everyone is so capable like you. But I will manage... Thanks.

And how do you do that?

I have answered a similar question in another thread and there I talk about using Properties to define an Option List for Zone Names:

https://community.graphisoft.com/t5/Developer-forum/Change-default-zone-names/m-p/309529#M8862

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-Ac28