Text field with name of parent block

Hi. Would it be possible to get the name of a parent block displayed as text in a text field?


Hi - That can probably be scripted but I’ve added your request to our list as item RH-49498.

1 Like

Hi Anika - you can fake it by adding UserText to the block instance and then setting that user text as the ‘fX’ in Text

import rhinoscriptsyntax as rs

def test():
    id = rs.GetObject("Selct a block instance", filter = 4096, preselect=True)
    if not id: return

    rs.SetUserText(id, 'BlockName', rs.BlockInstanceName(id))
1 Like

Hi Wim, hi Pascal. Cool, just tried the Usertext work around with the script… that seems to work fine, thanks a lot…

1 Like