Getlayoutusertext

Hello,

I saw that there is layout user texts in layout propriety, how can I acces to this fields with rhinosrciptsyntax? GetUserText(), and GetDocumentUserText(), is possible but not GetLayoutUserText()…

Maybe it can help, i scripted something to acces to:

#! python 3
import scriptcontext as sc

def get_layout_user_text(layout_name, key):
    doc = sc.doc
    for p in doc.Views.GetPageViews():
         if p.PageName == layout_name:
            layout = p.MainViewport
            value = layout_vp.GetUserString(key)
            return value
    return None