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.
SOLVED!

GDL - different 2d view according to scale?

Bawar Tanay
Enthusiast

Is there a way to GDL code a 2d view in a way that it becomes automatically different according to the scale?

like for example if below 1:50 = view 1

if above 1:50 and below 1:100 = view 2

above 1:100 = view 3

 

same way as you have with model view options objects detail level?

 

Thanks

Bawar

Archicad 16 - 26
Laptop: Alienware M18 R1 | windows 11 pro | i9-13900HX | RTX 4070 8 GB | 32 GB RAM
PC office 1: windows 11 pro | I7-10700 | RTX 2060 6 GB | 32 GB RAM
PC office 2: windows 11 pro | i7-12700 | RTX A2000 6GB | 32 GB RAM
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Xandros
Advisor

Hi

one way:

IF GLOB_SCALE <= 50 THEN
     ! view1
ELSE
     IF GLOB_SCALE <= 100 THEN
          ! view2
     ELSE
          ! view3
     ENDIF
ENDIF

 

another way would be

IF GLOB_SCALE <= 50 THEN
     ! view1
ENDIF
IF GLOB_SCALE > 50 AND GLOB_SCALE <= 100 THEN
     ! view2
ENDIF
IF GLOB_SCALE > 100 THEN
     ! view3
ENDIF
ArchiCAD 27 GER / Win10
Intel i9-9900K / 64GB RAM / nVidia GeForce RTX 2080 Ti

View solution in original post

6 REPLIES 6
Solution
Xandros
Advisor

Hi

one way:

IF GLOB_SCALE <= 50 THEN
     ! view1
ELSE
     IF GLOB_SCALE <= 100 THEN
          ! view2
     ELSE
          ! view3
     ENDIF
ENDIF

 

another way would be

IF GLOB_SCALE <= 50 THEN
     ! view1
ENDIF
IF GLOB_SCALE > 50 AND GLOB_SCALE <= 100 THEN
     ! view2
ENDIF
IF GLOB_SCALE > 100 THEN
     ! view3
ENDIF
ArchiCAD 27 GER / Win10
Intel i9-9900K / 64GB RAM / nVidia GeForce RTX 2080 Ti
Bawar Tanay
Enthusiast

@Xandros 

 

you are simply the best 😄

 

used the first method. i am a beginner with gdl but it is quite satisfying. that it works:D 

 

if you have tips they are welcome:D

Archicad 16 - 26
Laptop: Alienware M18 R1 | windows 11 pro | i9-13900HX | RTX 4070 8 GB | 32 GB RAM
PC office 1: windows 11 pro | I7-10700 | RTX 2060 6 GB | 32 GB RAM
PC office 2: windows 11 pro | i7-12700 | RTX A2000 6GB | 32 GB RAM

@Bawar Tanay wrote:

if you have tips they are welcome:D


Horse 11 in the fifth race at Ascot.

It's a sure thing. 😉

 

Sorry I couldn't resist.

I was also going to say - "quit while your ahead". 🤣

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Hahahahaha

Will share the price money with you, or split the losing 😄

 

Quitting is not an option hahaha

 

it works quite great, love the logic behind GDL, but there is a lot of learning for me to do.

Especially Graphic User Interface – I just don't understand how that works or the macros for example.

 

Anyway, I figured it is important to sketch the outcome you want

and write all the requirements of that object before you start coding. 

It makes life easier.

Archicad 16 - 26
Laptop: Alienware M18 R1 | windows 11 pro | i9-13900HX | RTX 4070 8 GB | 32 GB RAM
PC office 1: windows 11 pro | I7-10700 | RTX 2060 6 GB | 32 GB RAM
PC office 2: windows 11 pro | i7-12700 | RTX A2000 6GB | 32 GB RAM

GDL is quite simple yet quite complex at the same time.

The best investment I ever made was the GDL COOKBOOK 3 by David Nicholson-Cole.

It is very old (so not up to date) and you can't purchase it any more.

But if you Google it you will find a PDF version (4 which is a little more up to date).

 

The basics in the book are still all applicable - it just doesn't include some of the newer commands.

It has a few bits on the user interface.

I still refer to it some 20 odd years after it was published.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

@Bawar Tanay wrote:

 

you are simply the best 😄


pretty sure, I'm not 😉 but i'm glad to be of help

 


@Bawar Tanay wrote:

 

if you have tips they are welcome:D


besides bets on horseracing i basically use 4 different sources 😉

  • opening random objects in ArchiCAD (select an object and Ctrl + Shift + O) and try understanding how it was written
    • you can find out how GS did the sheep easter egg in the change marker tool 😉
  • ArchiCAD GDL Reference
    • check out the style guide
  • https://www.selfgdl.de/ but it's in german
  • https://gdl.graphisoft.com/

 

ArchiCAD 27 GER / Win10
Intel i9-9900K / 64GB RAM / nVidia GeForce RTX 2080 Ti