<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>morning,</div>

<div> </div>

<div>finally got time to test the modified macro and it works perfectly, thanks a lot!<br/>
It's also good to know what is causing the issue. Not that I understand whats happening inside Therion, but it feels better anyway :D</div>

<div> </div>

<div>have a nice Sunday,<br/>
Axel</div>

<div>
<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Sonntag, 24. Januar 2021 um 12:17 Uhr<br/>
<b>Von:</b> "Martin Budaj" <m.budaj@gmail.com><br/>
<b>An:</b> "List for Therion users" <therion@speleo.sk><br/>
<b>Betreff:</b> Re: [Therion] specific which label appears in output</div>

<div name="quoted-content">On Sun, Jan 17, 2021 at 8:02 PM Axel <dropstone@gmx.de> wrote:<br/>
> for an overview map I need to specific the labels I want to have in the output. Just sorting them by size is not possible. After searching I found a label re-definition at <a href="http://marcocorvi.altervista.org/caving/tbe/m_07/m_072.htm" target="_blank">http://marcocorvi.altervista.org/caving/tbe/m_07/m_072.htm</a> (7.2.10).<br/>
><br/>
> Works like a charm in a small cave but taken to my project it behaves odd:<br/>
> If I compile, Therion (5.5.6) gives this error (and creates no map):<br/>
> converting scraps ... done<br/>
> making map ... C:\Program Files (x86)\Therion\therion.exe: error -- Can't open file data.8bbox!<br/>
<br/>
Therion expects to find a *bbox file for each scrap containing labels.<br/>
It is generated by metapost when the labels are processed. In your<br/>
case, you instructed metapost to skip all the labels in a scrap (so no<br/>
*bbox file was produced), but therion knows there were some labels<br/>
defined for that scrap (if you displayed at least one label in the<br/>
scrap, the *bbox file would be generated). The easiest solution is to<br/>
create an empty *bbox file if there is none by writing an empty string<br/>
to it. Here is a modified Marco's macro:<br/>
<br/>
vardef p_label@#(expr txt,pos,rot,mode) =<br/>
if known ATTR_visibility:<br/>
if ATTR_visibility="on": % ADDED CONDITIONS<br/>
if (mode=1) or (mode=7):<br/>
interim labeloffset:=(u/8).<br/>
fi;<br/>
lab:=thelabel@#(txt, pos);<br/>
if mode>1: pickup PenD fi;<br/>
if mode=1: % altitude<br/>
pickup pencircle scaled (u/6);<br/>
drawdot(pos);<br/>
process_label(pos,0);<br/>
elseif mode=2: process_uplabel; % passage height<br/>
positive<br/>
elseif mode=3: process_downlabel; % passage height<br/>
negative<br/>
elseif mode=4: process_updownlabel; % passage height both<br/>
elseif mode=5: process_circledlabel; % passage height<br/>
unsigned.<br/>
elseif mode=6: process_boxedlabel;<br/>
elseif mode=7: process_label(pos,rot); % station name<br/>
elseif mode=8: process_filledlabel(pos, rot);<br/>
else: % mode=0 date<br/>
process_label(pos,rot);<br/>
fi;<br/>
else:<br/>
write "" to jobname & "." & decimal(charcode) & "bbox";<br/>
fi;<br/>
else:<br/>
write "" to jobname & "." & decimal(charcode) & "bbox";<br/>
fi; % END OF CONDITIONS<br/>
enddef;<br/>
<br/>
<br/>
> However, if I put in the –d command it compiles and produces the warning:<br/>
> warning -- cavern exit code – 1<br/>
> But it creates a nice map showing the labels I want.<br/>
<br/>
There was surely some old data.8bbox file in the thTMPDIR, as therion<br/>
doesn't clean this directory between runs in the debug mode. Check the<br/>
timestamps of the files.<br/>
<br/>
Best wishes<br/>
Martin<br/>
_______________________________________________<br/>
Therion mailing list<br/>
Therion@speleo.sk<br/>
<a href="https://mailman.speleo.sk/listinfo/therion" target="_blank">https://mailman.speleo.sk/listinfo/therion</a></div>
</div>
</div>
</div></div></body></html>