Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

GDL - different 2d view according to scale?

Bawar Tanay
Booster

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
6 REPLIES 6
Solution
Xandros
Advocate

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 26 GER / Win10
Intel i9-9900K / 64GB RAM / nVidia GeForce RTX 2080 Ti
Bawar Tanay
Booster

@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
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

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
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

@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 26 GER / Win10
Intel i9-9900K / 64GB RAM / nVidia GeForce RTX 2080 Ti

Start a new conversation!

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!