s.branca
(S Branca)
January 3, 2019, 9:24am
1
I want to export automaticaly a step file using Phyton.
I am trying
folder = rs.browsefolder()
folder = folder+“\name”
rs.command( “_-Export " + str(folder)+”.step"+“_Enter”)
i allready see this kind of structure but i cannot realy get a hang of it
Hello everyone.
how can I create a folder to export different type of files in rhino python.
right at the start of the script I want to pront the user to select a location and create a folder, that folder will then be used to save the files the script will export.
it will be 2 .csv files and 1 .dwg file
I tried using rs.savefilename but that creates a file, not a folder.
at the moment I’m exporting just by using:
with open(“filename” + ‘.csv’,“w”) as f:
f.writelines(make_csv(matrix))
b…
Thanks for the help
Stefano
DavidLeon
(David Andres Leon)
January 7, 2019, 11:17am
2
Hi Stefano,
There seem to be a few errors in your code. Try the following:
import rhinoscriptsyntax as rs
folder = rs.BrowseForFolder()
file = folder + r"\name"
extension = ".step"
rs.Command("_-Export " + file + extension + " _Enter")