So I understand a space between characters in script is equivalent to pressing Enter key in command line. But how do I get command line to recognize spaces in strings? For example,
f = "\0 White Reflective"
Call Rhino.Command("-visApplyMaterial " + f)
The ‘f’ string above is read as “\0” because of the space.
Strings with spaces should be surrounded by double-quote characters.
Functions can very useful. For example:
Function Quote(ByVal s)
Quote = Null
If (VarType(s) = vbString) Then
Quote = Chr(34) & CStr(s) & Chr(34)
s = Quote("Hello Rhino!")
Hi Dale, this is funny… a function to put a string in quotes but in order to send the string to the function you have to put it in quotes…
What is the stuff you guys are smoking? I want that too!
I noticed that this doesn’t work for setting the view to a named view. The commands go as follow:
The last “View 1” command does not get recognized. To emulate, try creating a named view with a space, and it will fail.
SetView command does not restore named views. For this, use the
_-NamedView _Restore "View 1" _Enter