protected _OdDb.ObjectIdCollection BakeGhGeometry(File3dm tmpFile)
 {
     _OdDb.ObjectIdCollection dbObjects = null;
     if (tmpFile.Objects.Count != 0)
     {
         string tmpPath = Path.Combine(Path.GetTempPath(), "BricsCAD", "fromrhino.3dm");
         tmpFile.Write(tmpPath, new File3dmWriteOptions());
         using (var objects = Bricscad.Rhino.RhinoUtilityFunctions.ImportRhinoFile(tmpPath, true))
         {
             foreach (var entity in objects.OfType <_OdDb.Entity>())
             {
                 AssignTraits(entity);
             }
             dbObjects = DatabaseUtils.AppendObjectsToDatabase(objects, GhDrawingContext.LinkedDocument.Database, false);
         }
     }
     return(dbObjects);
 }