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.

Change tree species without changing size of tree

R Muller
Enthusiast
I can't find any way to change tree species while keeping the current spread and height of the tree, other than writing down the current spread and height and then resetting them from the standard values after changing the species. I would like to change the 3d appearance of 350 trees of varying sizes at the same time, but have concluded it can't be done. I have to do them one at a time.

I was hoping the new element transfer settings would allow this, but no luck. I can retain the element ID and layer settings, and the elevation of the bottom of the tree, but the other tree dimensions are changed when I choose a different library part for the tree.

I'm not looking forward to changing 350 trees one tree at a time. Is there a way to do this more efficiently?
R Muller
AC 28 USA (20+ years on ArchiCAD)
MBP 64GB Apple M1 Max OS 15 Sequoia
3 REPLIES 3
Anonymous
Not applicable
If you are using a library part like Deciduous Trees 21 then no...its a feature of the code.

The coding says when the type of tree is changed, then read the default values from a table...and apply them to A(Width), B(Length), ZZYZX(Height)

If you want to edit the library part to stop this, all you need to do is to override the default table with the current A(Width), B(Length), ZZYZX(Height) values.

The Default values are stored in an array DefSizeValues

As a test I made a parameter
Auto_Change_Tree_Size (Boolean)

In the Master Script I added

if Auto_Change_Tree_Size = 0 then
DefSizeValues[1][1] = A
DefSizeValues[2][1] = A
DefSizeValues[3][1] = A
DefSizeValues[4][1] = A
DefSizeValues[5][1] = A
DefSizeValues[1][2] = B
DefSizeValues[2][2] = B
DefSizeValues[3][2] = B
DefSizeValues[4][2] = B
DefSizeValues[5][2] = B
DefSizeValues[1][3] = ZZYZX
DefSizeValues[2][3] = ZZYZX
DefSizeValues[3][3] = ZZYZX
DefSizeValues[4][3] = ZZYZX
DefSizeValues[5][3] = ZZYZX
DefSizeValues[1][4] = A
DefSizeValues[2][4] = A
DefSizeValues[3][4] = A
DefSizeValues[4][4] = A
DefSizeValues[5][4] = A
endif

Then saved it as a new library part.

This will work for:
Deciduous Trees 21
Evergreens 21
Houseplants 21
Palm Trees 21
Pine Trees 21
Shrubs 21


In Tree model detailed 21:
if Auto_Change_Tree_Size = 0 then
for i_loop = 1 to 10
sizeDefaultA[i_loop] = A
sizeDefaultB[i_loop] =B
sizeDefaultZzyzx[i_loop] = ZZYZX
next i_loop
endif

(using a loop for the values)

The other trees in the Archicad 21 library it is coded in the parameter script directly, no neat arrays to control.

If you want to create your own library parts, or edit the Archicad 21 library, it is a little bit of work, but potentially better for you in the long run if this is a common problem.

There is no work around to fix this...
R Muller
Enthusiast
Allan-

Thank you for this. It actually looks doable, even for someone like me who avoids GDL. I will definitely give it a try. I am using the AC21 trees, so it should work.

I also thought of creating an interactive schedule of all the trees, and modifying them from the schedule. Do you think this could work?
R Muller
AC 28 USA (20+ years on ArchiCAD)
MBP 64GB Apple M1 Max OS 15 Sequoia
Anonymous
Not applicable
If you want to change all the trees so the match, it can be done in a schedule.

If you choose the drop down from "Add Fields" add a "Library Parts Parameter", and browse from
Archicad library 21/Object Library 21.lcf/Object Library 21/ 2.Visualization 21/ 2.2 Site Improvments 21/ Garden 21/ Deciduous Trees 21.gsm
choose
iTreeType
(that is where it is in the AUS Library)
This will give you the different tree types to choose from

You can merge identical in the schedule so you get all the identical trees
(as long as you don't have the "Element ID" or" Hotlink and Element ID" in the schedule)

This would speed up changing of trees without editing the library parts.