Run Descoder.exe from command-line without dialogue?

Bricscad 18.2, Descoder 2.7:

I tried to compile a PRV with descoder from command-line, without displaying the dialogue. I tried from

CMD-dialogue:
s:: "s:\my progs\Kompilierungen\Definitionen\DESCoder.exe" "s:\my progs\Kompilierungen\Definitionen\gefaelle_erzeugen.prv"
and
s:: "s:\my progs\Kompilierungen\Definitionen\DESCoder.exe" -project "s:\my progs\Kompilierungen\Definitionen\gefaelle_erzeugen.prv"

Lisp-comands from Autocad:
(startapp "s:\my progs\Kompilierungen\Definitionen\DESCoder.exe" "\"s:\my progs\Kompilierungen\Definitionen\gefaelle_erzeugen.prv\"")

Result: It starts only the Descoder-dialogue, but doesnot compile in background as expected.
What's wrong?

Comments

  • hmmm - should work, indeed;
    personally I also compile several sources into DES, from a batch file ...
    also BLADE uses such commandlines / arguments when running DEScoder in background.

    Since v2.7, there is also the "-dialog" switch to enforce the dialog version, that is just the opposite.

    Is the given PRV/PRJ file shown in DEScoder dialog then ?
    If not, it would indicate that the prv/prj file given was not found (spelling ?).

    many greetings !

  • no, the dialogue does not show the defined PRV, it shows the last-used one. I will test "finding the file"

  • Seem to be a problem of Descoder, handling spaces in paths although they are "quoted".

    a) The calling of Descoder.exe works fine - without spaces or with quoted blanks: "s:\my test\descoder.exe"

    b) The path to the file is the problem:
    Example: s:\my test\test.prv

    descoder.exe "s:\my test\test.prv" -> calls dialogue, no result
    descoder.exe s:\my test\test.prv -> calls dialogue, no result

    type s:\my test\test.prv -> expected alert from CMD: "Cannot find file s:\my
    type "s:\my test\test.prv" -> file is found, expected result

    dir s:\my test\test.prv -> expected alert from CMD: "Cannot find file s:\my
    dir "s:\my test\test.prv" -> file is found, expected result

    Removing the blank from the path:
    descoder.exe "s:\my_test\test.prv" -> fine compiling in background
    descoder.exe s:\my_test\test.prv -> fine compiling in background

    Can someone confirm the behaviour?

  • Dear Peter,

    many thanks !
    I will verify and fix this here, to have an updated DEScoder, as usually included in "Lisp Developer Support Package" (freeware download in our ApplicationDialog).

    Will update you here.
    many greetings !

  • Dear Peter,

    I think I found it (at least, a clear issue) :smile:

    See
    (startapp "s:\my progs\Kompilierungen\Definitionen\DESCoder.exe" "\"s:\my progs\Kompilierungen\Definitionen\gefaelle_erzeugen.prv\"")

    Inside strings, the backslash of the pathes needs to be "escaped" ... same way, as you "escape" the " apostrophe :
    (startapp "s:\my progs\Kompilierungen\Definitionen\DESCoder.exe" "\"s:\my progs\Kompilierungen\Definitionen\gefaelle_erzeugen.prv\"")

    or
    you can replace "\" with "/" via Lisp

    The improper backslash is also in DEScoder.exe path - but likely, DEScoder.exe is found by coincidence.

    Please try with "\" or "/" for the backslashes in the path ...
    many greetings !

  • Note: '\' is also used as an escape character by the forum software. The get double backslashes inside 'normal' text you need the enter four.

    The OP's problem may also be related to faulty paths in the PRV file.

  • Dear Roy,
    many thanks :-)
    Indeed ... I should have placed that code snippet into the "as code" marks ...
    I hope, Peter will understand anyway ...

    "The OP's problem may also be related to faulty paths in the PRV file."
    yes, could be ... but Peter mentioned, that even the PRV/PRJ file itself is not displayed in DEScoder, at the file name field ...
    many greetings (hope to see you in London ! a good beer is waiting :smile: )

  • Hmm - now I'm confused ...

    Maybe the problem with the escaped and non-escaped backslashes or the code/non-formatting lead you to a wrong path, but my as written in the first posting "It starts only the Descoder-dialogue, but doesnot compile in background as expected."

    And this brings us to the problem that Torsten already confirmed: "The exe does not understand the path of the prv."
    So not the "startapp-call" is the problem, but the descoder. Right?

  • Thanks Torsten. But I won't attend the conference so I'll have to take a rain check.

  • Dear Peter,

    most likely, DEScoder does not get a correct path - if the backslash is not written as double-backslash :-)

    A backslash as you enter in any Windows application, or prompt, needs to be "escaped" when such a backslash is inside the string ...
    that means, you need to use double-backslash inside the string - same as you do with the apostrophes, those are also written with preceeding backslash.

    Same is needed for a backslash inside a string ...
    Or, you simply replace the backslash with a forward-slash ... :-)

    hope this explains better ?

  • I can confirm its working properly, with spaces in path and all.
    Here is an example lisp line:
    (startapp "C:\\CAD_SUPPORT\\Bricscad DesCoder\\DESCoder.exe" "\"C:\\+Storage\\Programming\\Lisp\\HAForge\\+HA Forge-R19.prv\"")
    You must always use double \'s, ans also add the extra quotes on prv path.
    If only the acad vlide could do this!

  • I'm desperated - maybe my German System is the reason for the problem? I tried with local and network based EXE and local and network based PRV, with backslash and slash, with and without quotes, ..

    Result - as written above:

    • The calling of the EXE is easy
    • The calling of the PRV is impossible when there is a space

      (startapp "c:/Program Files/Bricsys/BricsCAD V18 de_DE/DESCoder.exe" d:\xxx\dd.prv) -->> missing quotes
      nil

      (startapp "c:/Program Files/Bricsys/BricsCAD V18 de_DE/DESCoder.exe" d:/xxx/dd.prv) -->> missing quotes
      nil
      (startapp "c:/Program Files/Bricsys/BricsCAD V18 de_DE/DESCoder.exe" "d:/xxx/dd.prv") -->> working, but no blanks
      28848
      (startapp "c:/Program Files/Bricsys/BricsCAD V18 de_DE/DESCoder.exe" "d:/xxx/a b/dd.prv") -->> only dialogue, because of blanks
      19896
      (startapp "c:/Program Files/Bricsys/BricsCAD V18 de_DE/DESCoder.exe" d:\xxx\dd.prv) -->> missing quotes
      nil
      (startapp "c:/Program Files/Bricsys/BricsCAD V18 de_DE/DESCoder.exe" "d:\xxx\dd.prv") --->> working, but no blanks
      14320
      (startapp "c:/Program Files/Bricsys/BricsCAD V18 de_DE/DESCoder.exe" "d:\xxx\a b\dd.prv") -->> only dialogue, because of blanks
      19752
      (startapp "c:/Program Files/Bricsys/BricsCAD V18 de_DE/DESCoder.exe" "\"d:\xxx\a b\dd.prv\"") -->> only dialogue, because of blanks
      9944
  • Dear Peter,

    yes, I can reproduce the problem :-(
    Going to fix that ...

    Besides, please have a close look at v2.7 dialog - it now has an option "-dialog" to enforce the dialog version, when a valid lisp/prj/prv file is specified;
    this allows background "compilation" (when used without -dialog switch), but also dialog mode (when -dialog is specified);
    it is shown in the dialog explanations.

    So with latest DEScoder v2.7, as included in V18.2.20, you will need to specify "-dialog" if you want to have it.

    The problem is, that (startapp) allows only 2 arguments - the application file (.exe), and the command argument line ...
    this means, you will need to include "-dialog" then :

     (startapp "DESCoder.exe" "-dialog \"E:/folder1/folder2/Problem-1.prv\"")
    

    Once fixed, I will attach the DEScoder.exe here ... for the time being, the only option is to not use folders with spaces in it.
    many greetings !

This discussion has been closed.