Hi all,
i try to get selected objects from the document with the ObjectTable.
import scriptcontext as sc
import rhinoscriptsyntax as rs
import Rhino as rh
sc.doc = rh.RhinoDoc.ActiveDoc
ObjTa = sc.doc.Objects
Obj = rh.DocObjects.Tables.ObjectTable.GetSelectedObjects(ObjTa,False,False)
sc.doc=ghdoc
print Obj
I dont know how to get the selected geometry from the printed result.
Jess
January 8, 2019, 7:52am
2
Hi flokart, does this help?
objs = sc.doc.Objects.GetSelectedObjects(False,False)
for obj in objs: print obj.Geometry
Of course that Helps …but how i could know that?.
How do YOU know that.
Jess
January 8, 2019, 1:45pm
4
Maybe it is easier to learn python / rhinocommon outside of grasshopper. Then you can set breakpoints and inspect the content of the objects:
OOO WOW i didnt know that the RhinoPython Editor provides so much Info.
Do you know if there are efforts from mcneel to bring this kind of features to the grasshopperPython editor?
Jess
January 8, 2019, 3:05pm
6
The editor-question (IDE) is frequently discussed here. I would not expect too much…
scottd
(Scott Davidson)
May 2, 2024, 10:07pm
7
Rhino 8 has an all new script editor that now matches both in Rhino and Grasshopper:
Debugging, Watcher, breakpoints in both Rhino and Grasshopper.