public void ImportDwg()
{
// get input file of type DWG
System.Windows.Forms.OpenFileDialog dbox = new System.Windows.Forms.OpenFileDialog();
dbox.CheckFileExists = true;
dbox.Multiselect = false;
dbox.AddExtension = true;
dbox.DefaultExt = "dwg";
dbox.Filter = "DWG Files (*.dwg)|*.dwg";
dbox.Title = "DWG file to import";
if (dbox.ShowDialog() == DialogResult.OK)
{
DWGImportOptions opts = new DWGImportOptions();
opts.Placement = ImportPlacement.Origin;
ElementId newElementId;
m_revitApp.ActiveUIDocument.Document.Import(dbox.FileName, opts, m_revitApp.ActiveUIDocument.ActiveView, out newElementId);
}
}