Can I have a string in a custom attribute?

When I make a custom attribute, for the data type, I get a choice of Vector, Integer, Float, and Boolean. What I really need is String. For example, I need to add a custom Attribute in which alpha, bravo, and Charlie are the 3 possible values. I

the "addAttr" command is what you

I've looked in the docs regarding this several times over the course of 2 years. The doc's aren't very helpful on this particular mel command. All I see is French. If I were a programmer, I'm sure it would make since. All I need is for someone to post a simple example, and I can go from there.

select your object and:

addAttr -ln mystring -dt "string"

'-ln' designates the attribute name and '-dt' the data type
Its right there in the docs. "string" must be in quotes to differentiate it from the reserved mel word string.

/*In theory there is no difference between theory and practice
In practice they are very different*/

Thanks for the response, but I tried your example, and nothing seems to happen. I tried using

addAttr -ln mystring -dt "string"
The above is adding the attribute. As a test try this:
1: Create a polygon sphere.
2: use the mel command: addAttr -ln mystring -dt "string"
3: Open the attribute editor (cntrl A). Make sure that the tab you are on is the node that was selected the moment the addAttr command was executed (ie. the transform node, not the shape node).
4. Twirl down the Extra Attributes (the bottom section). You should now see your newly added attribute with a blank box ready for you to enter your "string".
5. If you add a string it will always be there as part of the object.
6. You won't ever see your string in the Channel box because the channel box only shows keyable attributes and a string attribute is impossible to keyframe.

You could build a UI with mel that would:
Put up a window,
Find the name of the currently selected object,
test to see if it has the "myAttr" attribute and if so,
display in a text field what the attribute is currently set to.

Good Luck,
Randy Stebbing

Cool. Thanks for the example. I