Instanceobject selection object

Hello,
I want to get a curve in a instanceobject, is there a way to get it (like objrf.selectionobject)? I select the block from the curve on it, and i want to use it.

Dim rc = Rhino.Input.RhinoGet.GetOneObject("Select instance", False, Rhino.DocObjects.ObjectType.Curve, objref)
If rc IsNot Rhino.Commands.Result.Success Then
  Return rc
End If
Dim iref = TryCast(objref.Object(), Rhino.DocObjects.InstanceObject)
If iref IsNot Nothing Then
  Dim idef = iref.InstanceDefinition

Thanks

Hi Serdem,

Sub-components of a block instance cannot be selected in Rhino 5. The Rhino WIP, however, does support this. Thus, you should be able to do something like this:

Dim go As New Rhino.Input.Custom.GetObject()
go.SetCommandPrompt("Select curve")
go.SubObjectSelect = True
go.Get()
If (go.CommandResult() <> Rhino.Commands.Result.Success) Then
  Return go.CommandResult()
End If

Dim curve As Rhino.Geometry.Curve = go.Object(0).Curve()
If (curve IsNot Nothing) Then
  ''' TODO...
End If

The best you can do is Rhino 5 is to select the block instance and then dig through the block definition geometry looking for your curve.

– Dale

Thanks Dale,