GDL
About building parametric objects with GDL.

Resizing 2D objects from library par maker

Pablo68650
Participant

Hi everyone,

 

I recently draw few 2D plan trees with the library part maker (Archicad 26), witch is an amazing tool. I know there is other ways to create 2D object, but I wanted to get trees that can be simplified depending on the scale and the precision of the project (schematic, low and full resolution).

 

Once I created the trees, I realized that I couldn't modify the 2d dimensions of it, witch is quite embarrassing. Could somebody help me to fix this problem with or without the GDL skills? 

 

Capture d’écran 2024-01-18 à 12.34.52.png

 

Capture d’écran 2024-01-18 à 12.38.08.png

 

5 REPLIES 5
easyDoesIt
Booster

Hi Pablo,

 

I havent used the library part maker but can do in 2d script.

 

Depends a bit how the script is setup, happy to look at one for you if you post it here. Or a simplified version is ok too. Else attached is a simple example to review, have a look at 2d script.

Cheers,
Mark
Brisbane, Australia

Hello!

 

Thank you for the answer, indeed it supposed to be solved with the 2D script, but as I sayed, I don't have any skills with the script! so here is my tree .gsm.

 

Thanks a lot!

Hi Pablo,

 

Maybe someone on the forum with knowledge of the library part maker will solve this easier, there must be a way to do it without scripting.

 

The part you sent me also calls a second library part called "SRC Arbre 2" so I cant test it.

 
Anyway try this. Change this line in the 2d script

 

call    "SRC Arbre 2",
    PARAMETERS A =     6.046339, B =            1, gs_list_cost =            0,

 

with this

 

call    "SRC Arbre 2",
    PARAMETERS A =     A, B =            B, gs_list_cost =            0,

 

it should stretch what i assume is the tree object to the size of A & B.

Cheers,
Mark
Brisbane, Australia
Pablo68650
Participant

Oh yes, my bad, I attached the wrong tree, here is the good one! 😅

Actually, the solution I found was to save the Library part maker object as an object a second time, but it means that I have to keep the library part maker object as a source file, which mean having 2 time more object in my library, and I don't want that haha!

 

Also, I found the begining of a solution : in the tree you posted in your first answer, I found in the 2D script these lines :

 

Capture d’écran 2024-01-29 à 09.59.45.png

 

So I copied and pasted them in the beginning of the 2D script of my tree, replaced this :

 

!these values are coped and pasted from the original A and B in parameters script, they should match the size of the object when not stretched.
mul2 A/3.003683, B/4.402504

 

by this :

 

!these values are coped and pasted from the original A and B in parameters script, they should match the size of the object when not stretched.
mul2 A/6.046339, B/1

 

and it created a tree with 4 size points but they are at the wrong place and I cannot modify the size :

Capture d’écran 2024-01-29 à 10.15.28.png

 

So I suppose that these lines are the good one, but I don't know which values I should change to place the size points at the right place!

 

Thank a lot for your help anyway!