Maya provides a plug-in for importing and exporting animation to a separate file. This facilitates copying animation from one scene to another. For example, you could animate a scene with a lightweight representation of a character and then transfer the animation to the final rendered version of the character in another file.
Internally, the plug-in imports and exports to the API clipboard. As part of the import and export process, the plug-in executes the copyKey or pasteKey MEL commands to transfer the anim curves from the API clipboard to the Maya objects. Using the plug-in will not change the contents of the Maya animation clipboard.
Import lets you set the same options as Edit > Keys > Paste Keys which are used when the animation is applied to the selected object(s).
Exporting anim curves uses the copyKey MEL command to copy the keys to the API clipboard and then exports the clipboard contents to the anim file. The entire operation is contained in the file export.
The File > Export Selection options window lets you set the same options as Edit > Keys > Copy Keys which are used to export the animation from the selected object(s).
When an anim file is exported, any information previously on the API clipboard is replaced with the new anim curves after the file export.