cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
GDL
About building parametric objects with GDL.
SOLVED!

VOLUME3D() in Property Script

jonasm
Contributor

I built a GDL Object to represent a precast concrete object that has a few modifiers, to be adusted to different situations in the building. Now I would like to put the Volume and Total Surface into Parameters to read them through Labels and write them into a IFC File.

 

I discovered Volume3D() and Surface3d(), those produce the desired value. Only problem, they are only executed in The Property Script. I have read somewhere that I could use the TEXT I/O Addon to write the values into a text file, and then read them again in the 2D script. But I can`t get the TEXT I/O Addon to work.

 

Here is what I am trying, but it is not outputting anything:

 

!! 2D Script

ch1 = OPEN ("TEXT", "volumen.txt", "MODE = RO, LIBRARY")
_volumen = input(ch1, 1, 1, var1)
text2 0, 0, _volumen
CLOSE ch1

!! Property Script

ch1 = OPEN ("TEXT", "volumen.txt", "MODE = WO, LIBRARY")
OUTPUT ch1, 1, 1, volume3D()
CLOSE ch1 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

ToperBarrientos_0-1706775368848.png

Hi.

We can also try the Volume (built-in parameters) fr. archicad's properties (property manager)-- can be use in labels, as well as generated in IFC formats. e.g. create a property , then map the "Volume"  to your customed properties (volume as type) and link to all classification...this is faster & easier.

Apple M1 Pro CPU
RAM 32 GB
1 TB OS: Ventura 13.1

View solution in original post

3 REPLIES 3
Solution

ToperBarrientos_0-1706775368848.png

Hi.

We can also try the Volume (built-in parameters) fr. archicad's properties (property manager)-- can be use in labels, as well as generated in IFC formats. e.g. create a property , then map the "Volume"  to your customed properties (volume as type) and link to all classification...this is faster & easier.

Apple M1 Pro CPU
RAM 32 GB
1 TB OS: Ventura 13.1

Hi,

I had tried Volume (gross) first and that does not calculate for gdl object. Wiredly though it does work with Volume (net).

Thanks for pointing me into the right direction.

Peter Baksa
Graphisoft
Graphisoft

Anyhow, the OPEN command doesn't create the file, it has to exist.

 

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest