Revit 2022_Design Automation_shows no elements in Plan/3D view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I am facing a problem while using DA in cloud. I have revit blank project and I am trying to generate some plans and documentation. I get different results when DA code is debugged locally (right result) and when ran on cloud (wrong result). See attached images.
1) Revit file generated using DA locally using DesignAutomationBridge.dll and DesignAutomationHandler.dll gives result as expected.
2) Revit file Generated using Forge DA on cloud. I am running the same code however downloaded .rvt file does not have "Level 1" view elements on sheet. Plan("Level 1") view and 3d is completely blank visually, there are no elements visible (Graphics overrides seems to be right ). This feels super weird as i can see section and elevation but no plan and 3D.
Level 1 view of the file generated by DA on cloud.
This is what I have in method. May be this is not so relavant but anyway.
public void HandleDesignAutomationReadyEvent(object sender, DesignAutomationReadyEventArgs e)
{
var data = e.DesignAutomationData;
if (data == null) throw new ArgumentNullException(nameof(data));
Application rvtApp = data.RevitApp;
if (rvtApp == null) throw new InvalidDataException(nameof(rvtApp));
string modelPath = data.FilePath;
if (String.IsNullOrWhiteSpace(modelPath)) throw new InvalidDataException(nameof(modelPath));
LogTrace("Design Automation Ready event triggered...");
e.Succeeded = true;
DocHolder.doc = data.RevitDoc;
if (DocHolder.doc == null) throw new InvalidOperationException("Could not open document.");
double ExteriorWallWidth = 0.23;
double wT = 7.5;
double lT = 6.5;
double w = wT - ExteriorWallWidth;
double l = lT - ExteriorWallWidth;
double h = 3.3528;
IBHKHouse house = new OneBHK_OptionA(l, w, h);
Transaction tra = new Transaction(DocHolder.doc, "Bake Data");
tra.Start();
house.SetBHKInfo();
house.BakeHouse();
tra.Commit();
ClientInfo clI = new ClientInfo();
Transaction tt = new Transaction(DocHolder.doc, "Sheet Layout");
tt.Start();
SheetLayout sheet = new SheetLayout(house, clI);
sheet.PlaceAllViewsOnSheet();
tt.Commit();
ModelPath path = ModelPathUtils.ConvertUserVisiblePathToModelPath("result.rvt");
DocHolder.doc.SaveAs(path, new SaveAsOptions());
//House.CreateHouse(data.RevitDoc);
}
Any help in this regard is much appriciated.
Thanks,
Om