OK, so this might be a little convoluted, but maybe there is more that one way to solve my problem.
I am creating geometry in rhino, and am going to export it to sketch-up. My biggest issue is that, when the object is exported into sketch-up, all the discrete objects get all melded together in that very sketch-upy way. I have found that, objects stored inside their own blocks become individual components in sketch-up, which is exactly what I’d like to have in that case.
So I thought I’d be clever and write a rhinoscript that takes selected objects, and iterates through them, creating a new block for each list item. Unfortunately…
My script:
import rhinoscriptsyntax as rs
theObjs = rs.SelectedObjects()
for obj in theObjs:
rs.AddBlock(obj,(0,0,0))
and I get the error:
Message: iteration over non-sequence of type Guid
Traceback:
line 29, in AddBlock, "C:\Users\User\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\rhinoscript\block.py"
line 5, in <module>, "C:\Users\User\AppData\Local\Temp\TempScript.py"
I presume something akin to the GUID reference is somehow lost when iterating through the list, but I can’t figure out how to work it out.
Any ideas?
Thanks!!