I want to use trail files for converting files.
Right now every time I issue a trail command
which opens the file dialog it starts up always inside /users/<name of user>/documents
Is there a way to avoid and have creo use the directory form which it was run from, or maybe even specify the directory from where file open will start.
When I start creo using the command line, its working directory is the local directory from which the executable was called but the file open command always opens up inside /users/<name of user>/documents which makes it impossible to choose local files.
Thanks in advance
Solved! Go to Solution.
Are you trying to call Creo with the -nographics option?
Why don´t you just include in the beginning of the trailfile the "set working directory" command?
I did not even know that there is a -nographics option... Right now creo openup normaly and shuts down again. This seams like a nice option. Do you supplu it on the command line? What other command line parameters can I use?
According to @Doug and from what i have read I can use the file_open_default_folder inside a config.pro file.
Are you suggesting setting as a command right into the trail file? If yes this is even better since the trail file will be self contained and not need a external config.pro file to function correctly.
How is the syntax of this command? Is there a doc for all available trail file commands?
Yes, is a good option if you are concerned with performance. Creo is much more faster working with this option on.
I have a aplication for batch processing too and is possible to run it in background. The disavantage is that you can´t see what is happening
I think this is how I called it from command line:
C:\Program Files\PTC\Creo 2.0\Parametric\bin\Parametric.exe -g:no_graphics trail_file.txt
In the beginning of the trailfine I define the working directory and that´s it, it works fine for me.
Doesn´t exist a document with trail file commands. These commands are generated when you are working with creo, and trailfiles were initialy created for recovery purposes, not for programming.
I suggest to read some articles at:
inversionconsulting dot blogspot dot com/2008/05/proe-anatomy-of-trail-file-part-1.html
Some good and rare info there.
Thanks for the link.
How do you define the working direcotry? Do you use the recorded trail comands?
Idealy I would like to specify the directory myself or be able to change it before runnign the trail file.
This way the trail file will be more generic and usable for more situations.
As Jose suggested, there is no documentation for trail files available from PTC.
Some of the inversionconsulting material is a bit off. For example, I never had problems resulting from combining lines; in fact I wrote a processor that did exactly that to cut the length of the files and increase their readability.
More critical, entering names and selecting things by name may be a better idea. For a while the trail file was only recording the item number in lists of items, a number that can't be counted on if the list contents change. I don't know what Creo does.
The way to start off is to start simple. Start Pro/E, open a file, then exit. Check the trail file to see what lines you can identify as targets for change and which are Pro/E setting up the commands. Like learning any language, practice reading will make it easier.
To progress fastest, change the trail file suffix to .txa, so that Pro/E won't crash because of an error, but will just stop.
From inversionconsulting, this is also a help: "using the config.pro option CMDMGR_TRAIL_OUTPUT set to YES" I assume it is still true for Creo.
The next step is to make a list of options you are interested in so that you can step through them in sequence while recording a trail file and make identifying them in the trail file easier.
Perhaps someone can help - I know I came across a utility that would display text as it was added to the end of a file as it is added. It is usually used to read log files so that an administrator doesn't need to constantly check file size. "Tail" seems something like it, but I know it came with another program. This would be helpful for monitoring the trail file when running in no-graphics mode.
The idea of using a tail command for incremantaly looking at the trail file is nice.
tail -f /path/thefile.log for example gives you a realtime view.
If you have a git bash shell or cygwin installed you have this utility also in Windows.
Look at the config optio "file_open_default_folder". I beleive the default is "my_documents", you want it set to "working_directory".