Bring to front (detail items)

Hi, I am trying to bring to front detail item using method as described here Bring forward / send back (detail items) by @gduncan74 and @Einar_Raknes

but I get an error saying:
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 29, in
TypeError: ‘FamilyInstance’ object is unsubscriptable!

How do I solve this?
SOLVED. bring to front_by_Gduncan74.dyn (7.5 KB)

You copied the 2nd python script in the thread you linked, where the IN[0] was a list of lists, but you didn’t copy the nodes. Instead, your input is a list of single items.

So in your script, at line 29 (v = viewmatch[1]), viewmatch isn’t a list with an index of 1, it is a single item, and the script fails.

1 Like

obviously, I was blind. Now it works. bring to front_by_Gduncan74.dyn (7.5 KB)
Thanks

1 Like