On 8/05/2013 4:39 a.m., Richard Heck wrote:
On 05/07/2013 10:17 AM, Stephen Brooking wrote:
Hi,

I have specified a new converter to convert Visio drawings into PDF
(using
some VBScript borrowed from elsewhere on the web), but have run into
issues.
  My converter is specified like this:

cscript <path>/vsd2pdf.vbs "$$i" "$$o"

When Visio runs, it can't access the file to convert because the current
directory is not the temp directory that LyX created (I'm not familiar
enough with VBScript to know why or where).

So my question is this: is there a '$$' variable that specifies the
temporary directory in use, so that I can form an absolute path to the
$$i
and $$o files?

No, but you should not need this. LyX ought to be running the converter
in the temporary directory, but perhaps the cscript thingy resets the
current directory?

Richard


No? I hesitate to contradict you Richard but in my tinkering with Python scripts I've run converters using *all* the following:

$$i Input file

$$o Output file

$$f The filename with extension but without directory path of the LyX file, e.g. myfile.lyx

$$r The full path to the original LyX file being processed, e.g. D:/Documents/LyX/

$$p The full directory path of the LyX temporary directory. On my Windows system one day this was

C:/Users/Andrew/AppData/Local/Temp/lyx_tmpdir.gq2540/lyx_tmpbuf5/

$$b Base name in the temporary directory: the path with filename but no extension in the LyX temporary directory. On that same day this would be

C:/Users/Andrew/AppData/Local/Temp/lyx_tmpdir.gq2540/lyx_tmpbuf5/myfile

And I understand there are also $$s the LyX system directory,
$$l the `LaTeX name', and $$e the encoding, although I haven't used these three.

Andrew

Reply via email to