Author Topic: CommandlineRendering: Cannot open file: "(filename).tgd"  (Read 88 times)

Offline nakajimaakinari

  • Member
  • *
  • Posts: 3
CommandlineRendering: Cannot open file: "(filename).tgd"
« on: December 05, 2018, 01:34:43 AM »
hi, i'm trying to render a scene via command line
so i checked web site, set the TERRAGEN_PATH, and wrote the render command below ...
"%TERRAGEN_PATH%/tgdcli" -p (filename).tgd -r ...
then error occurred and nothing rendered; the command line says " ERROR: ReadXMLFile: Cannot open File: "(filename).tgd" "

of course i can open the error file directly from the Terragen 4 open menu,
but i cannot open it from the command line like " %TERRAGEN_PATH%/tgdcli" -p (filename).tgd "

is anyone familiar with the issue?
thanks

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 12665
  • Holy snagging ducks!
Re: CommandlineRendering: Cannot open file: "(filename).tgd"
« Reply #1 on: December 05, 2018, 04:52:52 AM »
Are you specifying the path name in quotes, if it has spaces in it? Note that the placement of quotes in your example is confusing.

- Oshyan

Offline nakajimaakinari

  • Member
  • *
  • Posts: 3
Re: CommandlineRendering: Cannot open file: "(filename).tgd"
« Reply #2 on: December 05, 2018, 05:25:48 AM »
>Note that the placement of quotes in your example is confusing.

sorry about that ...
then i'm gonna upload the capture image, could you please see this?

Offline KlausK

  • Member
  • *
  • Posts: 434
  • Land ho!
Re: CommandlineRendering: Cannot open file: "(filename).tgd"
« Reply #3 on: December 05, 2018, 12:52:40 PM »
Hi, setting the TERRAGEN_PATH environment variable only seems to let you start TG from every command prompt you are in.
But it does not find the project file you want to open like that.
When you do it like this:
"%TERRAGEN_PATH%/tgdcli" -p C:\tg_projects\filename.tgd
it works.
(C:\tg_projects\ just means the full path to where your project/scene file is stored)

The default.tgd which Terragen opens in any case is a file you specify in the Preferences. That is why TG finds it, I guess.
I have not found a way to tell TG the folder to my project files. Adding the path to the "Asset Search Folders" in the Preferences does not help.
And I do not know where to put a xml file to read the information.
Maybe it could find Project files you have added to the Library. Never have used the Library, so I can`t tell.
Hope that helps.

CHeers, Klaus

/ ASUS WS Mainboard / Dual XEON E5-2640v3 / 64GB RAM / NVIDIA GeForce GTX 780 / Win7 Ultimate

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 12665
  • Holy snagging ducks!
Re: CommandlineRendering: Cannot open file: "(filename).tgd"
« Reply #4 on: December 06, 2018, 12:01:21 AM »
Klaus is correct, you need to always specify the full path to your file unless you are *in* the directory where your TGD is, in which case it may work (assuming you have a Terragen path variable set, or you specify the *full path* to tgdcli.exe).

- Oshyan

Offline nakajimaakinari

  • Member
  • *
  • Posts: 3
Re: CommandlineRendering: Cannot open file: "(filename).tgd"
« Reply #5 on: December 06, 2018, 12:12:03 AM »
KlausK-san, Oshyan-san!
It worked :D
Thank you so much!