@Rebecca_Napolitano wrote:
Hi! I am trying to export some blocks from rhino using python into .wrl format.
I know that I can supress the diaglog box in Rhino by doing -_Export and then I can enter my parameters through a script in python. What I am confused about though is that the parameters I can access through python are not the same as those I can access through the user interface.
Accessing the interface through python I can only access the parameters for .wrl exporting that you see in my script below but if you do the process out by hand on the user interface on the polygon mesh options dialog box, if you click “detailed controls” there is the option for simple planes. How can I access this “check box” from a python script like I access the other parameters.Thank you!!
My script (which works to export the .wrl file) is as follows
import rhinoscriptsyntax as rs # iterates through layers # select all in current layer rs.Command("-_SelAll ") directory = 'C:\\Users\\Rebecca Napolitano\\Documents\\datafiles\\Romanbondingcourses\\2017_10_25_experiments\\' filename = 'test' filetype = '.wrl' # make cmdstr, include layer if there are multiple layers path = "\"" + directory + filename + filetype + "\"" cmdstr = "-_Export " + path if filetype == ".wrl": cmdstr += " Enter" cmdstr += " Angle 0.0 AspectRatio 0.0 Distance 0.0 Density 0.0 Grid 0.0 " cmdstr += " Enter " #cmdstr += " Enter Enter" # execute command cmd = rs.Command(cmdstr) if not(cmd): success = False rs.Command("-_SelNone")
Here are the options I can script:
Here is the parameter I need to access:
Posts: 4
Participants: 2