private static void GenerateRevitFile(DesignAutomationData daData) { var rvtApp = daData.RevitApp; Document newDoc = rvtApp.NewProjectDocument(UnitSystem.Imperial) ?? throw new InvalidOperationException("Could not create new document."); var osmServie = ContainerStore.Resolve <OsmService>(); using (Transaction t = new Transaction(newDoc, "Build City")) { t.Start(); MapBounds mapBounds = MapBounds.Deserialize(File.ReadAllText(MapBoundsFile)); OsmStore.Geolocate(mapBounds); osmServie.Run(newDoc); t.Commit(); } newDoc.SaveAs(ResultFile); }