Opening a text file and writing ascii data to it via script
Singular3D
Posts: 529
I searched around and didn't find a clear answer for that.
I use the print function to make specific output of coordinates and angles of joints to the log file. I'd like to put them into an generic ascii file (eg. *.txt). The name and the directory of the file should be selected by the user via file dialog.
Is there such a generic example somewhere?
Are doFileDialog and DZFile the right way to go?
Thanks, Walter
Comments
I have used those in the past, but Rob has a couple of relevant sample scripts you may wish to look at:
for writing to a text file http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/file_io/install_manager_config/start (the writeInstallManagerConfig function)
for getting a file http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/file_io/save_mapped_paths/start
Thanks a lot to you both. I'll have a look at it.