Due to a scheduled maintenance, a maximum 20 minutes license delivery outage may be expected on July 6 2024 (Saturday) between 6PM to 8PM (CEST).
GDL
About building parametric objects with GDL.

Master Layout / Layout view type check

Piotr Walerysiak
Contributor

Hi All

 

I'm developing title block object that will be placed on master layouts.

I'm looking for a way to display different content when user is looking at master layout and different when looking on actual layout. I'm not successful to find any variable that could be used as the a trigger to differentiate between layout and master layout.

 

I tried:

n = REQUEST ("HomeDB_info", "", homeDBIntId, homeDBUserId, homeDBName, homeContext)

IF homeContext = 4 THEN

   .....

and :

IF glob_view_type = 8 THEN
   ...


but both do not work. First check where object was placed, so it is always true as it is placed on master layout. Second is also always true as it check if view type is layout (seems that it treats master layout as layout).

 

Is there any way to do it ?

 

Thank you

1 REPLY 1
Barry Kelly
Moderator

I don't think you will have much luck.

GLOB_VIEW_TYPE does not differentiate between master layout and actual layout - they are all just layouts.

 

If you want different appearance on the master (I can't imagine why you would need this though), maybe just add a boolean parameter for 'master mode'.

When you turn it on, use the script for the slightly different looking title block.

You just have to remember to turn it off, so you go back to the regular title block for the layouts.

 

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