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

Python export script use "Space" in file name

$
0
0

@kyle_faulkner wrote:

I have a python script that exports a block and uses a name specified earlier in the script, as shown below

rs.Command("!_-Export “+filename+” _Enter")

This works fine, but if the name has a space in it, Rhino cuts the name of the file off at the “Space” and the name is shortened.

For example:

path = “C:\Users\kyle\Desktop”)
name = “Test Export”
filename = path + name
rs.Command("!_-Export “+filename+” _Enter")

I would expect the exported file to be “C:\Users\kyle\Desktop\Test Export.3dm”
Instead, I get “C:\Users\kyle\Desktop\Test.3dm”

What am i doing wrong?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5873

Trending Articles