Layout User Text Attributes not working

I’m seeing a few issues with using Layout User Text not updating automatically.

First Issue:

I create a Key/Value under Layout User Text with the Page Number and another with the Page Name. Then I copy the layout. The values automatically change in the new layout. When I go back to the previous layout, the values have also changed to match the new layout, which is incorrect. If I enter and exit a detail, the values change back to the correct ones.

Second Issue: Now I want to reference these key values to make a table of contents. When I use the Text Field Dialog - LayoutUserText and select layouts on Selected Layout Dropdown menu, the Key Value table doesn’t update when I change the selected layout. I’m unable to reference the pages.

I have a screen recording and can share.

Hi Bryce,

Page fields saved as layout user text get worked out on whatever layout is showing them, not the layout they are stored on, so the values follow the active layout and a contents table reads the contents page on every row.

Keep the layout user text as plain values (a sheet title for example) and put the fields in the text itself. On each sheet %<PageName()>% and %<PageNumber()>% work as is, and on the contents page each row points at its sheet by id: %<PageName("layout id")>% and %<LayoutUserText("layout id","Title")>%, plus %<ObjectPageNumber("object id")>% on any object on that sheet for its page number. Here is a working example..

you didn’t specify a Rhino version..

layout-contents-example.3dm (70.0 KB)
layout-contents-example-R8.3dm (68.8 KB)

Script to build the contents..

contents_table.py (4.4 KB)

I’m using Rhino 8 latest version.

I’m not sure I understand the purpose of Layout User Text if formulas are not in reference to the page they are on. The key value pair should remain fixed the the layout they correspond to, rather than re-evaluating the information when looking at another page, otherwise it just appears to behave in a buggy way. I understand the directions you’ve given and its how I’ve done a table of contents in the past, but for referencing page number, I don’t want to have to go reference an object on that page, I want to use the layouts key value pair because its much easier to reference, especially with the Text Field menu.

Only workaround I’ve found is Using ObjectPageName and ObjectPageNumber to reference my titleblock in the Layout User Text, but then when I duplicate a sheet it references the old object so I’d then have to manually rereference each time.