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