Are you certain
is called within the scope of
? The error strongly suggests it isn't - we use this function successfully in a number of add-ons.
I can't comment on
– we haven't used it for anything yet. I have some recollection that properties attached to attributes are still limited compared to elements, but I can't remember the specifics.
Ralph Wessel BArch