getting patching rectangle of an object

quantesizer's icon

Is it possible to get the patching_rectangle of an object??

andrea agostini's icon
Max Patch
Copy patch and select New From Clipboard in Max.

For ui objects you can use pattr

hth!
aa

Emmanuel Jourdan's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Or use getattr:

quantesizer's icon

@andrea stupendo! e pensare che per due giorni ho cercato come un pazzo questa soluzione, trovando complicati modi attraverso java, script e cose del genere, e le persone a cui ho chiesto, proponevano modi assurdi, e ora tu mi fai sta patch! perfetto! :D
You have made my day!
Una cosa però: perchè hai scritto "for UI objects"?

@emmanuel I haven't the object getattr:
no such object getattr
no help file found getattr

quantesizer's icon
Max Patch
Copy patch and select New From Clipboard in Max.

One more thing: is there a way for getting the Patcher's patching_rect?

This is a way for size it, but how can i get patching_rect from it??

vichug's icon

if you give your patcher a name, via its inspector or thanks to the pattrmarker object ; you can then access its patching_rect with the abovementioned methods.
(regarding getattr : are you using latest max ?)

quantesizer's icon

I'm not using latest max. :(

quantesizer's icon

f you give your patcher a name, via its inspector or thanks to the pattrmarker object ; you can then access its patching_rect with the abovementioned methods.

i'm trying this method but i can't do it... can you post some example please?

andrea agostini's icon

Una cosa però: perchè hai scritto “for UI objects”?

I wrote "for UI object" because it won't work for non-UI objects! If that's what you need, I'm afraid you should turn to JavaScript.

aa

quantesizer's icon

User Interface objects ok..

Guybrush's icon

It works ok in the patching mode but nothing happens in the presentation mode... is that normal?