Overview of selecting with the API
A command usually gets input from the selection list. The result of the MGlobal::getActiveSelectionList() method contains all selected objects and can easily be checked through MSelectionList and MItSelectionList—two API classes you can use to edit selection lists.
MGlobal::setActiveSelectionList()
The global active selection list can be copied through:
This returns an MSelectionList and makes a copy of the list.
Any changes you might make through MSelectionList methods will not affect the global list unless you use:
You can also create your own lists using MSelectionList to merge with other lists, including the global list. You can use this list to create sets of objects (see setObject() method).