PDA

View Full Version : Problem with AddObjectToGroup



Dan_K
08-24-2010, 01:22 AM
Hi,

When I try to add a new object to a group:

import rhinoscriptsyntax as rs

groupName = "group1"
cent = 0,0,0

rs.AddGroup(groupName)
sphereId = rs.AddSphere(cent,1)
rs.AddObjectToGroup(sphereId, groupName)

I get an error message:

Message: Find() takes exactly 2 arguments (1 given)

Traceback (most recent call last):
line 58, in AddObjectToGroup, "C:\Documents and Settings\Compaq_Administrator\Application Data\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\group.py"
line 7, in <module>, "C:\Documents and Settings\Compaq_Administrator\Local Settings\Temp\TempScript.py"

Is it a bug? or what am I doing wrong?

Dan

Steve Baer
08-24-2010, 06:05 PM
Hi Dan,
It's a bug. The fix will appear in the next WIP. You can also get the fix at
http://code.google.com/p/rhinopython/source/browse/trunk/scripts/rhinoscript/group.py

Thanks,
-Steve

Dan_K
08-24-2010, 08:12 PM
Thanks for the quick fix Steve.

It is working just fine now.

Dan