Planetside Software Forums

Support => Terragen Support => Topic started by: nakajimaakinari on December 05, 2018, 01:34:43 AM

Title: CommandlineRendering: Cannot open file: "(filename).tgd"
Post by: nakajimaakinari 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
Title: Re: CommandlineRendering: Cannot open file: "(filename).tgd"
Post by: Oshyan 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
Title: Re: CommandlineRendering: Cannot open file: "(filename).tgd"
Post by: nakajimaakinari 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?
Title: Re: CommandlineRendering: Cannot open file: "(filename).tgd"
Post by: KlausK 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

Title: Re: CommandlineRendering: Cannot open file: "(filename).tgd"
Post by: Oshyan 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
Title: Re: CommandlineRendering: Cannot open file: "(filename).tgd"
Post by: nakajimaakinari on December 06, 2018, 12:12:03 AM
KlausK-san, Oshyan-san!
It worked :D
Thank you so much!