# Instanceobject selection object

**URL:** <https://discourse.mcneel.com/t/instanceobject-selection-object/36025>\
**Category:** Rhino Developer\
**Created:** [August 18, 2016, 12:34pm UTC](https://discourse.mcneel.com/t/instanceobject-selection-object/36025 "2016-08-18T12:34:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![serdem](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/serdem/32/495239_2.png) [@serdem](https://discourse.mcneel.com/u/serdem)\
**Post date:** [August 18, 2016, 12:34pm UTC](https://discourse.mcneel.com/t/instanceobject-selection-object/36025/1 "2016-08-18T12:34:45Z")

</div>

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

```

 ![](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/e/9/e91602a7ce93f116865ed4b66c8fd8a354b56a6d.png)

Thanks

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/685184_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [August 22, 2016, 3:37pm UTC](https://discourse.mcneel.com/t/instanceobject-selection-object/36025/2 "2016-08-22T15:37:44Z")

</div>

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:

```auto
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

---

<div class="post-metadata">

**Author:** ![serdem](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/serdem/32/495239_2.png) [@serdem](https://discourse.mcneel.com/u/serdem)\
**Post date:** [August 23, 2016, 1:45pm UTC](https://discourse.mcneel.com/t/instanceobject-selection-object/36025/3 "2016-08-23T13:45:34Z")

</div>

Thanks Dale,
