I need my script to create a control curve and add an atribute named "nelson"... (it first should check if the name exists... ok... till here). But if I run the script again it should find the "nelson" attribute and create a "nelson1", "nelson2", "nelson3"... and so on. And Iīm failing on figuring this out.

If it was only a Maya object... maya would automatically rename it for me. What doesīt happen with custom attribute names.

Thanx for the quick code... I think I can adapt the idea to solve my problem... just have to figure out a way about checking the existing attributes, because if I create a new control after running the script several times and run the script on this new control... the naming will start on "nelson7" (for example).

I added a line to show the attribute on the channel box either. Hereīs how itīs looking so far. But I didnīt have free time to get the thing done. Just wanted to thank you for the help.