import Rhino
go = Rhino.Input.Custom.GetObject()
go.SetCommandPrompt("Select objects")
go.GetMultiple(1,1)
go.Objects().InstanceDefinitionPart()
I am trying to get the name of one or more block instance. But this is as far as i can go. Something is definitely missing there.
Can someone point me to the right direction?
I know we can do it in rhinoscriptsyntax like this:
import rhinoscriptsyntax as rs
objs = rs.GetObjects(preselect = True)
for obj in objs:
print rs.BlockInstanceName(obj)
Thanks Naruto.
Thatās a great way to learn RhinoCommon!
really appreciate it!
If you donāt mind me asking againā¦
about the naming convention:
sometimes the in-built python functions start with two underscore __
such as below
__InstanceObjectFromId(object_id, False)
The underscore prefix is meant as a hint to another programmer that a variable or method starting with a single underscore is intended for internal use. Python does not have strong distinctions between āprivateā and āpublicā variables, like other languages, so this convention is often used by programmers.