Design forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating an object to do some calculations with zones

Anonymous
Not applicable
Hi. First of all I'm not ver familiar with GDL but got a little experince with coding.

What I want to do is some get total area of a one type zones, and multiply it with 0,3 and print out as a text based object. How can I do that?

Thx.
1 ACCEPTED SOLUTION

Solution
Karl Ottenstein
Moderator
Hy yrguner,

Just checking to make sure that you are aware that no GDL object can know anything about any other object ... except in the case of labels, which know about the one object that they are associated with. So, if you want info about a type of zone in a GDL solution, you would need to create a Zone Label that calculates what you want - for that one zone. While it could write a single number to a text file, I don't think that's what you want.

You can create a schedule of those zones that has all of the calculated values for all zones ... and then can Publish that to a text file. You cannot actually "print" other than to a log file.

GDL is a language just for creating objects, not for automating anything about ARCHICAD itself. The C/C++ API (see the Developer Forum here) is what lets you program solutions that go beyond that.
One of the forum moderators   •   AC 25 USA and earlier   •   MacOS 11.6.5, iMac Pro

View solution in original post

3 REPLIES 3

Wait for 22... and You will not need any GDL to do that 😜

Piotr

Anonymous
Not applicable
Yes I have checked the new features of AC22, but the thing is i am still asking for GDL method, because i want to create a more complex calculations with GDL from the exam i gave. For example i will put some conditions, and if it is satisfied i will do some calculations, if not gonna do some another calculations etc.

i think i can deal up with the mathematical and conditional part, but first i need to read and list areas of one type zone(they also in an seperate layer, maybe i can use for filtering?)

thx.

Solution
Karl Ottenstein
Moderator
Hy yrguner,

Just checking to make sure that you are aware that no GDL object can know anything about any other object ... except in the case of labels, which know about the one object that they are associated with. So, if you want info about a type of zone in a GDL solution, you would need to create a Zone Label that calculates what you want - for that one zone. While it could write a single number to a text file, I don't think that's what you want.

You can create a schedule of those zones that has all of the calculated values for all zones ... and then can Publish that to a text file. You cannot actually "print" other than to a log file.

GDL is a language just for creating objects, not for automating anything about ARCHICAD itself. The C/C++ API (see the Developer Forum here) is what lets you program solutions that go beyond that.
One of the forum moderators   •   AC 25 USA and earlier   •   MacOS 11.6.5, iMac Pro

Didn't find the answer? Start a new discussion

Labels

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!