View Full Version : Command?
04-15-2010, 04:07 AM
I'm trying to write a script that will Pipe around a set of curves that I select.
This is a script that seems like it should work...
import rhinoscriptsyntax as rhino
foo = rhino.GetObject("select an object")
print "got an object: " + str(foo)
rhino.Command("_SelID " + str(foo))
rhino.Command("_Pipe 0.5 _Enter _Enter")
It seems to select an object ok, and if I comment out the last line and run it, it says "1 curve added to selection" so I think that the penultimate line is working. However, then the Pipe command doesn't seem to think that the object is still selected and asks "Object ID to select _Pipe".
What am I doing wrong?
04-15-2010, 11:30 AM
I can just say it works for me (windows 32 bit , last week WIP of Rhino 5) so I guess there's something wrong in the Mac version.
04-15-2010, 04:52 PM
Also works in Windows 64 bit. Off to test on Mac:)
04-15-2010, 05:44 PM
I'm seeing the problem on the Mac. I'll have to dig into the source code to figure out what is going on.
04-15-2010, 08:35 PM
Great! Looking forward to a solution!
04-20-2010, 04:58 PM
Just wanted to let you know that I'm still looking into this. It looks like something in the core OSX command parser that needs to be fixed. I consider the rhino.Command(...) function to be one of the most important functions available and want to make sure if works everywhere.
04-20-2010, 05:03 PM
Right, as long as Command works, you can do almost everything. By the way, I couldn't seem to find something for adding spheres using a rhino.python command on Mac (I ended up adding points and making the spheres by hand, there were only 12 of them for that project). If Command worked then I'd be able to work around any unimplemented things like that.
07-11-2010, 01:21 PM
Some recent changes seem to have broken the script in the first post. I get this error:
Exception Occured: CRhinoObject_NextRuntimeObjectSerialNumber
Traceback (most recent call last):
07-20-2010, 09:15 PM
Hmm... I must have broken something. Looks like Marlin is going to push out a new build soon and my tests with the latest in-house build work for your script.
Sorry about that,
07-21-2010, 12:11 PM
Powered by vBulletin™ Version 4.0.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.