Application: DeleteObject
Revit product and version: All
Last Modified: 19/12/2006
Modified By: KY Autodesk HSL
Programming Language: VB.NET

Subject: This sample is used to delete the objects selected by user.

Classes: 
Autodesk.Revit.IExternalCommand
Autodesk.Revit.Document
Autodesk.Revit.SelElementSet

Project Files: 
DeleteObject.vb
Class DeleteObject Implements the IExternalCommand interface and it deletes the selected objects.

Description: 
-	What the sample does is to get the objects selected and delete them, highlight objects which can not be deleted.
-	Use Document.Delete(Element) to delete an element.
-	Use elements.Insert(Element) to highlight the element after return cancel or failed, elements is the parameter of the function Execute of IExternalCommand.

Instructions: 
1.	Select element(s) which you want to delete.
2.	Run this command.