The DeleteNoteIfExists method on the CustomSupportDefinition (CSD) class deletes an existing note on a support. This method takes the note name as an input argument. This method is used in AIR to delete the required notes if the ExcludeNotes option on the support is set to TRUE.
For example,
//Get the ExcludeNotes Property from DataBase.
bool excludeNote;
if (support.SupportsInterface("IJUAhsExcludeNotes"))
excludeNote = (bool)((PropertyValueBoolean)support.
GetPropertyValue("IJUAhsExcludeNotes", "ExcludeNotes")).PropValue;
else
excludeNote = false;
//Create Note if ExcludeNotes is False and Delete note if ExcludeNotes is True
if (excludeNote == false)
note = CreateNote("Elevation Callout", HOR_SECTION, horSecPort, new Position(0.0, 0.0, 0.0), "EL", false, 2, 51, out controlPoint);
else
DeleteNoteIfExists("Elevation Callout");
//DeleteNoteIfExists deletes the note if it is already created.