[Therion] Order of calls - symbol-hide doesn't work
Bruce Mutton
bruce at tomo.co.nz
Wed Jul 1 10:44:37 CEST 2020
Thanks for that insight Tarquin
I have intuitively followed the principles you set out, for the most part, but not entirely, and I would not have thought that setting a symbol-set would override symbol-show -hide statements.
I had written a few words about this some years ago here
https://therion.speleo.sk/wiki/bds?s[]=order#order_of_layout_functions_called
but I see that it is not quite best practice. I will rewrite it soon.
I think I have always got away with less than perfect layout statement ordering, because I tend to have layouts that are tightly constrained to particular topics. ie scales, statistics, northarrows or whatever.
Anyway, symbol-set, symbol-assign, symbol redefinitions, then specific symbol-hide or -show with layout file copys somewhere in the middle seems like a sensible rule of thumb.
Bruce
-----Original Message-----
From: Therion <therion-bounces at speleo.sk> On Behalf Of Tarquin Wilton-Jones via Therion
Sent: Wednesday, 1 July 2020 08:40
To: therion at speleo.sk
Cc: Tarquin Wilton-Jones <tarquin.wilton-jones at ntlworld.com>
Subject: Re: [Therion] symbol-hide doesn't work
Your problem is the order of your statements:
layout local
symbol-hide group centerline
symbol-set UIS
These directives are processed in order, so if the second one overrides the symbol hiding, it will win. "symbol-set UIS" includes centreline symbols defined as a line. It is defined second, so it overrides the line before it. You need to swap the lines around:
layout local
symbol-set UIS #overall symbol set
symbol-hide group centerline #override specifics
In the same way, your .thconfig file's "layout local" says "copy LayoutScalebar1".
I guess that is defined in:
F:\Omri\Therion\Layout\StdFiles\LayoutStandards.thc
You did not share that file, so I cannot be certain if it also could cause problems. You copy that layout *after* you set the symbol-hide. If
LayoutScalebar1 overrides the symbol hiding, it will win. This is risky:
layout local
symbol-hide group centerline
...
copy LayoutScalebar1
This is better:
layout local
copy LayoutScalebar1
symbol-hide group centerline
This is probably not causing problems in your particular case, but this is why I always do my "copy" statements first, then the local layout settings afterwards, so I never bump into this kind of hidden problem.
Hope this helps.
Tarquin
_______________________________________________
Therion mailing list
Therion at speleo.sk
https://mailman.speleo.sk/listinfo/therion
More information about the Therion
mailing list