To create a named selection set, use the Add method. This method requires only a single parameter—the name of the selection set.
If a selection set of the same name already exists, AutoCAD returns an error message. It is a good programming practice to delete a selection set when you no longer need it. Use the Delete method to delete a selection set, as in the following example:
ThisDrawing.SelectionSets.Item("NewSelectionSet").Delete