RVTDocs.com
Namespace: Autodesk.Revit.UI Class: UIApplication

UIApplication.DoDragDrop(ICollection<String>)

Method
Description:
Initiates a drag and drop operation of a collection of file names on the Revit user interface.
Remarks:
The behavior after the 'dragData' dragged onto Revit is listed bellow:
  • Only one AutoCAD format or image file dragged onto Revit: a new import placement editor will be started for import the file;
  • More than one AutoCAD format or image files dragged onto Revit: a new import placement editor will be started only for the first AutoCAD format or image file;
  • Only one family file dragged onto Revit: the family will be loaded, and an editor will be started to place the family;
  • More than one family files dragged onto Revit: all the families will be loaded;
  • More than one family files including other format files dragged onto Revit: Revit will try to open all the files;
  • If a valid file or list of files is passed, Revit will do its best to use them appropriately. If any files are not usable, failure will be signalled to the interactive Revit user (and will not be signalled to the application with an exception).
Syntax
public static void DoDragDrop(
	ICollection<string> dropData
)
Parameters
Parameter Type Description
dropData ICollection The list of file paths and names.
Return Value
Exceptions
Exception Condition
ArgumentNullException Thrown when dropData is.
FileArgumentNotFoundException Thrown when dropData contains a file that doens't exist.