auto adding new attributeID to Custom Attribute

HI everybody,

I am trying to do a function that add a custom attribute to an object, but I can't figure how to add automatically the attribute ID.

I have try to put it into avariable like this:

id = genclassid()

My_CA = attributes myCAinterface attribID:id

but It still give me an error.

Is it a way to do that?