Seejay, thanks very much — I had overlooked thinking about the pattr family for this. That said, I have never tried to use pattr to get/set some of these "common box attributes", and after mucking about for a while I still can’t seem to do it. Can you give an example of how you can query a pattr for its bound-to object’s patching_rect for example?

Not all the attributes can be bound, I don’t think, but probably most can. You could keep track of whatever info you want about your objects, and it updates as you edit, kind of the reverse of what we generally do—we use the mouse to move and resize, or send messages/use the Inspector to change attributes of objects. Now we’re getting the info from the "other side", so we can mess with it or store it if we want… make different object layouts, appearance presets, restrict edit values to a range, fun stuff.

– Pasted Max Patch, click to expand. –

Copy all of the following text. Then, in Max, select New From Clipboard.

Attachments:

Wow, that’s very cool – I never knew that pattr could do that! But now another question – all of my pattr bindings are taken care of by an autopattr object in my patches. Do you know how I can specify a specific attribute of my objects to bind to using an autopattr? Or am I really going to have to bind all my UI objects manually using this pattr syntax?

Not sure if this is especially helpful for you, as you can’t really bind to the object to make a preset in the same way that you can using pattr, but you can use pattrstorage/autopattr to send get and set attributes of bound objects:

– Pasted Max Patch, click to expand. –

Copy all of the following text. Then, in Max, select New From Clipboard.

you can take it a bit further, it’s nice to be able to get/set all the attributes from one place (pattrstorage). You could use [route] on the values that come out and are sent back in, and keep everything hidden away in a subpatch. And the same [pattrstorage] which remembers the attributes of certain numbers can also remember the values of other numbers, like the ones that set those attributes:

– Pasted Max Patch, click to expand. –

Copy all of the following text. Then, in Max, select New From Clipboard.