GDL
About building parametric objects with GDL.

How to get value of sea level in GDL?

LeeJaeYoung
Virtuoso

How to get value of sea level in GDL?
1. Builtin.General_ElevationToSeaLevel (introduced in ARCHICAD 25) Should I use this?
(How should I use it?)
2. SEALEVEL - GLOB_HSTORY_ELEV = SLevel
I need to find the sealevel, but I can't.

AC27 on window 11
1 ACCEPTED SOLUTION
12 REPLIES 12
Solution
danielk
Booster

I believe you need to use the "REFERENCE_LEVEL_DATA" request:

https://gdl.graphisoft.com/reference-guide/request-options#:~:text=n%20%3D%20REQUEST%20(%22REFERENCE....

 

n = REQUEST ("REFERENCE_LEVEL_DATA", "", name1, elev1, name2, elev2, name3, elev3, name4, elev4) 

 Those names and elevations refer to the 4 reference levels from the project preferences.

thank you so much. ^^

But what I don't understand is that elev4 is a negative number.
I set 12.5, but the answer I get is -12.5, which is perplexing.

AC27 on window 11
danielk
Booster

Sea Level is tricky. When you enter it in the Project Location settings, you enter the height your project 0.00 is from the sea.

So, if the project zero (ground floor 0.00) is 500 m above the sea, you enter "500 m". But then when you enter the "Project Preferences > Reference Levels" settings, your origin/base level is the ground floor 0.00 level, and the other reference levels are measured from there. so if you open this dialog, you will see that the sea level is a negative number here (because 0.00 is ground floor, and the sea is 500 m below this level, in other words: -500 m).

 

Long story short: In the Project Location settings you have to enter it as a positive number, but other than that, it is always negative (as long as the building is above sea level of course).

thank you so mucn . ^^

I will study harder.

 

Is Builtin.General_ElevationToSeaLevel not available?

AC27 on window 11
danielk
Booster

I have no idea what that is, but it doesn't look like GDL to me. 🙂

Where did you read about it? Can you send me a link?

These built in properties were introduced in version 25.

But his concerns me.

 

BarryKelly_0-1701996811624.png

 

I probably wouldn't use them unless you really had to, or they are better in some way.

I have never used them yet.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
danielk
Booster

Oooh, I see. As far as I understand these were designed specifically to make it easier to reference Archicad Properties in Label objects. (so this is something completely different from what you are looking for)

 

When you place a label on something and want to display its Property values, you need a REQUEST command, and then one of the parameters in that request will be the Global Unique ID of the Property. This is a difficult-to-remember string of letters and numbers, but if you are referencing a builtin property, you can use these keywords instead of that number.

 

It looks like "Builtin.General_ElevationToSeaLevel" keyword would tell you how high above the Sea Level is the object you labeled. E.g. if the Sea Level is at -100 m, and a chair is placed 1 m above the ground floor 0.00 m, then then this should return "101 m".

I would be grateful if you could tell me the object containing the code that I can study.
I didn't tell you the value of this.

LeeJaeYoung_0-1702040717622.png

 

text2 0,-3,Builtin.General_ElevationToSeaLevel

 

 

AC27 on window 11

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!