Rhino Scripting Job - Please Provide Quote

RhinoScript does not have the ability to select object in a detail when a layout is active.

But with Rhino.Python and RhinoCommon (Rhino 5 only), you can.

See if this gets you any further:

import scriptcontext
import rhinoscriptsyntax as rs
import Rhino

def BlockLeader():
    go = Rhino.Input.Custom.GetObject()
    go.SetCommandPrompt("Select block instance to annotate")
    go.GeometryFilter = Rhino.DocObjects.ObjectType.InstanceReference
    go.EnablePreSelect(False, True)
    go.InactiveDetailPickEnabled = True
    rc = go.Get()
    if rc == Rhino.Input.GetResult.Object:
        prompt0 = "First point of leader"
        prompt1 = "Next point of leader. Press Enter when done"
        points = rs.GetPoints(True, True, prompt0, prompt1)
        if points is not None:
            objref = go.Object(0)
            obj = objref.Object()
            name = rs.BlockInstanceName(obj.Id)
            rs.AddLeader(points, None, name)

if __name__ == "__main__":
    BlockLeader() # Call the function defined above