Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5871

Try to open a file through python

$
0
0

@Freaq wrote:

Hey guys, new to Rhino, and running into an issue straight away, been playing around for a while but jsut can;'t seem to get around it,

I need to do a batch script to convert a set of files,
i have got the folder indexed, I can get all the filenames etc, thats all fine, (I'm familiar with python)

however when I try to open the file through script Rhino always prompts me whether I want to save, and there is something about UpdatePromtUpdateBox etc. which means my file never loads (and even if it would, it does this for every file requiring manual clicking,

I also found a ready made batch convert but it does the same thing.

anyways the most basic thing to test seemed to be this:

import rhinoscriptsyntax as rs
path = 'Y/:test.stp'
rs.Command('_-Open ' + path)

many thanks for all help

edit:

tried some other stuff like

import rhinoscriptsyntax as rs

rs.DocumentModified(False)
rs.Command("_-Open ""Y/:test.stp"" _Enter", 0)

or

rs.Command("_-Open " & "Y/:test.stp" & " _Enter", 0)

still no avail :frowning:

Posts: 6

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5871

Trending Articles