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

How to enter spacebar into a command in python

$
0
0

@siemen wrote:

I’m trying to automate the Text object command using python and am running into 2 issues which I think are related to the same problem. I don’t know how to enter a spacebar with the commandline options. In the example below I’m trying to enter “Hello font” as the text for the textobject and I want to set the font to “American typewriter” (a font with a spacebar in it). This is what I have which obviously doesn’t work. Is this not possible perhaps?

import rhinoscriptsyntax as rs

txt = “Hello font”

commStr="-_TextObject "
commStr+="_Font “+“American_Typewriter”+” "
commStr+=""+txt+""

rs.Command(commStr, True)

This is what I’m in the above example am trying to get for positioning

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5791

Trending Articles