Select/Pick object in a detail from within a layout view

just to answer my own question, i guess this would do it to get the object without activated detail:

import Rhino
import rhinoscriptsyntax as rs
    
def DoSomething():
    
    gp = Rhino.Input.Custom.GetPoint()
    gp.SetCommandPrompt("Pick point on object")
    get_rc = gp.Get()
    if gp.CommandResult() != Rhino.Commands.Result.Success:
        return
    
    objref = gp.PointOnObject()
    if objref: 
        rs.SelectObject(objref.ObjectId)
    
DoSomething()

c.