Ursula renames .plb file

Hello,

I’m working on a small system with Teddy and I’d like to export the results to a pdf file. At the end of my file the following line

+sys nowait ursula -printto:"pdf" -page:all +

works when running the whole script (CTRL+F12) but it fails trying to run the module only (SHIFT+F12 with cursor on the line).
The report browser complains that the .plb file does not exists. Actually, in the project folder, the .plb extension of the results file is changed to .pl#, so the .plb file indeed does not exist anymore.

What is happening there?
And how can I print my results from Teddy without running the whole script?

Never got it to work directly from teddy myself.

However you can do via command line or a batch file (and teddy indirectly)
Try this in a command line:
"C:\Program Files\SOFiSTiK\2023\SOFiSTiK 2023\ursula.exe" -printto:pdf -page:all myproject.plb

If you get that to work you can write and call a batch file from teddy:

+Prog Template
<Text,File=print.bat>
"C:\Program Files\SOFiSTiK\2023\SOFiSTiK 2023\ursula.exe" -printto:pdf -page:all $(project).plb
</Text>
End

+Sys print.bat

Then it should also be possible to run the print job only.

However to hide warnings, include a table of contents, etc you have to prepare the .urs files.
There is little guidance in the documentation, but some info here:

@Sofistik:
You should seriously consider adding control over legend/toc/warnings/etc as an option to the exe command.
Or at least the possibility of “standard settings” via def-file.

Thank you for the workaround!

Actually, there is a new glitch, as Teddy doesn’t pass the double quote " to the batch file (single quotation marks and double double quotes "" aren’t passed either). The execution of print.bat then fails, because, well, there are spaces in the path to ursula.exe.

Of course I could add the SOFiSTiK folder to $PATH but it would be interesting to know how to pass quotation marks from Teddy to a text file.

Now, if I add the double quote myself, funnily enough, running print.bat from the command line works as intended, but running it from Teddy with

+SYS print.bat

still changes the extension of the results file from .plb to .pl#!

I’m working with Service Pack 2022-10 Build 1197, in case this should matter.

I don’t think I have had the .pl# problem.

About the quotation marks, try:

  • Using both single and double quotations, e.g. " ‘C:…ursula.exe’ -printto:…"
  • Make sure you don’t start a new line with a quotation mark, but add an extra space in the beginning.

Thank you for the hint, we’re getting there:
To pass the double quotes, it’s necessary to start with single quote and indeed to leave a blank space after it:

+PROG TEMPLATE
KOPF PDF-Ausgabe
<TEXT,FILE=print.bat>
' "C:\Program Files\SOFiSTiK\2022\SOFiSTiK 2022\ursula.exe" -printto:pdf -page:all +'
</TEXT>
ENDE

That creates a print.bat with the line above, which I can run with the command prompt. It starts ursula, which produces a PDF.

However, when running the following line in Teddy

+SYS print.bat

the extension of the .plb file in the project folder in the is changed to .pl#, ursula starts and complains that it can’t find the .plb file. The original problem remains.

Try using $(project).plb (or $(name).plb) instead of +

Otherwise you could work around it by making a copy that you print:

+Sys Copy $(project).plb $(project)_pdf.plb

+Prog Template
<Text,File=print.bat>
 '"C:\Program Files\SOFiSTiK\2023\SOFiSTiK 2023\ursula.exe" -printto:pdf -page:all $(project)_pdf.plb'
</Text>
End

+Sys print.bat

Well, this is really interesting, because it’s working after the two tweaks:

  1. Copy the .plb file under a new name
  2. Create a batch file with the command to print the file to PDF.

Thanks!

Only then, execute the batch file to start Ursula and create a PDF.

+SYS COPY $(project).plb $(project)_pdf.plb

+PROG TEMPLATE
KOPF PDF-Ausgabe
<TEXT,FILE=print.bat>
' "C:\Program Files\SOFiSTiK\2022\SOFiSTiK 2022\ursula.exe" -printto:pdf -page:all $(project)_pdf.plb'
</TEXT>
ENDE

+SYS print.bat

@JFH : Ursula does not change the file extension of $(project)_pdf.plb to .pl# but only of $(project).plb. Is there anything you’d know about this behaviour?