# Picking objects from Layout space

**URL:** <https://discourse.mcneel.com/t/picking-objects-from-layout-space/73015>\
**Category:** Scripting\
**Created:** [October 12, 2018, 10:36pm UTC](https://discourse.mcneel.com/t/picking-objects-from-layout-space/73015 "2018-10-12T22:36:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ejolley](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ejolley/32/762396_2.png) [@ejolley](https://discourse.mcneel.com/u/ejolley)\
**Post date:** [October 12, 2018, 10:36pm UTC](https://discourse.mcneel.com/t/picking-objects-from-layout-space/73015/1 "2018-10-12T22:36:33Z")

</div>

Hi I’d like to adapt this snipet to work in Layout space on objects that are in model space. I don’t have any experience with the methods that allow picking model space objects from layout space. I’d appreciate anyone pointing me in the right direction. (I’m not yet in Python world unfortunately)

Thanks,  
Eric

```auto
Dim strObj, strBlkName, arrObjects

Call LabelBlock()

Sub LabelBlock()

	'get block
	strObj = Rhino.GetObject ("Select Part Block:", 4096, True)

	If Rhino.IsBlockInstance(strObj) Then

		strBlkName = Rhino.BlockInstanceName(strObj)
		rhino.print(strBlkName)

		Rhino.Command "-Leader Pause Pause Pause Enter " & chr(34) & strBlkName & chr(34)
		
		arrObjects = Rhino.LastCreatedObjects

		If IsArray(arrObjects) Then

			Rhino.SelectObjects arrObjects
			
			Rhino.Command "BringForward"

		End If

	End If
	
End Sub

```

---

<div class="post-metadata">

**Author:** ![Ncik](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ncik/32/761232_2.png) [@Ncik](https://discourse.mcneel.com/u/Ncik)\
**Post date:** [October 18, 2018, 11:39pm UTC](https://discourse.mcneel.com/t/picking-objects-from-layout-space/73015/2 "2018-10-18T23:39:38Z")

</div>

I’m afraid you’ll need to learn python and a bit of rhinocommon. It isn’t particularly hard. See this link…

> [@Select/Pick object in a detail from within a layout view](https://discourse.mcneel.com/t/select-pick-object-in-a-detail-from-within-a-layout-view/41995):
>
> Hi, I’m looking for a way to pick/select an object within a detail while working in a Layout view. Specifically I’d like to pick a single object visible in the detail to use for annotating usertext with a leader. Can anyone point me in the right direction how to do this with python/rhinocommon? Thanks -Willem

---

<div class="post-metadata">

**Author:** ![Ncik](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ncik/32/761232_2.png) [@Ncik](https://discourse.mcneel.com/u/Ncik)\
**Post date:** [October 18, 2018, 11:46pm UTC](https://discourse.mcneel.com/t/picking-objects-from-layout-space/73015/3 "2018-10-18T23:46:31Z")

</div>

and here is another link…

> [@Technical drawings - Is LAYOUT the best way?](https://discourse.mcneel.com/t/technical-drawings-is-layout-the-best-way/11614/79):
>
> I know we all want in-built functionality like this, but it was surprisingly easy to script a company specific solution for this based on this example… It’d be nice if it was a little smarter like solidworks note tool, but the script is perfectly functional and the boss was impressed with the initiative and result. Obviously the usertext must be present for it to work, so I developed a another script for adding usertext.

---

<div class="post-metadata">

**Author:** ![ejolley](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ejolley/32/762396_2.png) [@ejolley](https://discourse.mcneel.com/u/ejolley)\
**Post date:** [October 18, 2018, 11:57pm UTC](https://discourse.mcneel.com/t/picking-objects-from-layout-space/73015/4 "2018-10-18T23:57:47Z")

</div>

That’s exactly what I’m wanting to do, thanks.

Eric
