Hi Everyone i have a simple script that generates a text file.
---------------------Text file--------------------------------
Dir1 = gp_mainPath
out_name = (fileName.text + ".txt")
out_file = createfile out_name
format "%-" ("D")to:out_file
format "%-" (print polyList.count/257)to:out_file
format "%" (Stonecount.text = RStyle2.text)to:out_file
---------------------Text file--------------------------------
i figured out how to generate the text name but cant set the directory to gp_mainPath
any help will be appreciated.
thanks
Comments (6)
Comment policy
1
.
Something like this:
thanks for the quick reply the problem with that script is it adds the last folder name to the file name.
so lets say "C:\\Users\Workstation\\Documents\\3dsMax" is my directory and i put the name test it generates "3dsMaxtest.txt" as the name and places it in a folder "C:\\Users\Workstation\\Documents\\
thats why i am trying to remove the direcotry from the out_name
any idea how to fix it?
.
If I understand you correctly you want to save the file one llevel up, not in the last fgolder, but in the folder that contains the last folder.
Great thanks
1 last question how can i add a new line in the text file for this code. format "%-" ("SP")to:out_file
like this
D-20-40
SP
Not like this
D-20-40 SP
`
just "\n" character
format "%-\n" ("SP")to:out_file