Order of calls - symbol-hide doesn't work
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@speleo.sk> On Behalf Of Tarquin Wilton-Jones via Therion Sent: Wednesday, 1 July 2020 08:40 To: therion@speleo.sk Cc: Tarquin Wilton-Jones <tarquin.wilton-jones@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@speleo.sk https://mailman.speleo.sk/listinfo/therion
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.
Yes. You may note that "copy" can be used either before or after, depending on whether you want to copy a set of defaults, or copy a specific configuration for symbols. This does mean that my "copies first" method is not always appropriate, and it depends on the specific intention of the copy. Since you will generally know exactly what you are copying, you can presumably work out the approach that works for your case. Just treat "copy" as being replaced with the contents of the layout that you are copying. If your layout and the layout you are copying both try to set a whole load of symbol-set, symbol-assign, symbol-show/-hide etc. then you could be in a world of hurt.
participants (2)
-
Bruce Mutton -
Tarquin Wilton-Jones