{\rtf1\fbidis\ansi\ansicpg1252\deff0\deflang1033\deflangfe1033\deftab420{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}} {\info{\horzdoc}{\*\lchars ([\'7b}{\*\fchars !),.:\'3b?D]\'7d}} \viewkind4\uc1\pard\ltrpar\nowidctlpar\kerning2\b\f0\fs20 Application:\b0 DeleteObject\line\b Revit Platform:\b0 All\line\b Revit Version:\b0 2011.0\line\b First Released For:\b0 9.0\line\b Programming Language:\b0 VB.NET\line\b Skill Level:\b0 Beginning\line\b Category:\b0 Basics\line\b Type:\b0 ExternalCommand\line\line\b Subject:\b0 Delete Objects.\line\b Summary:\b0 \line This sample is used to delete the objects selected by user.\par \par \b Classes:\b0 \par \pard\ltrpar\nowidctlpar\fi360 Autodesk.Revit.UI.IExternalCommand\par Autodesk.Revit.DB.Document\par Autodesk.Revit.UI.Selection.SelElementSet\par \pard\ltrpar\nowidctlpar\par \b Project Files:\b0 \par DeleteObject.vb\par \pard\ltrpar\nowidctlpar\li359 Class DeleteObject Implements the IExternalCommand interface and it deletes the selected objects.\par \pard\ltrpar\nowidctlpar\b\par Description:\b0 \par \pard\ltrpar\nowidctlpar\fi-360\li360\tx360 -\tab What the sample does is to get the objects selected and delete them, highlight objects which cannot be deleted.\par \pard\ltrpar\nowidctlpar\fi-360\li360 -\tab Use Document.Delete(Element) to delete an element.\par -\tab Use elements.Insert(Element) to highlight the element after return cancel or failed, elements is the parameter of the function Execute of IExternalCommand.\par \pard\ltrpar\nowidctlpar\par \b Instructions:\b0 \par 1.\tab Select element(s) which you want to delete.\par 2.\tab Run this command.\par }