Revit 2022_Design Automation_shows no elements in Plan/3D view

Revit 2022_Design Automation_shows no elements in Plan/3D view

ombhagwat29
Participant Participant
392 Views
1 Reply
Message 1 of 2

Revit 2022_Design Automation_shows no elements in Plan/3D view

ombhagwat29
Participant
Participant

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.

ombhagwat29_1-1641906739767.png

 

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.

ombhagwat29_0-1641906391056.png

Level 1 view of the file generated by DA on cloud.

ombhagwat29_0-1641908145340.png

 

 

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

0 Likes
393 Views
1 Reply
Reply (1)
Message 2 of 2

jeremy_tammik
Alumni
Alumni

Unfortunately, this is not the best place to ask such a question.

 

Please note that this discussion forum is dedicated to programming desktop Revit using the desktop Revit API.

 

For all Forge and Design Automation API related questions, you should ask through the dedicated Forge help channels:

 

https://forge.autodesk.com/en/support/get-help

 

I hope this clarifies.

 

Thank you for your cooperation and understanding.

 

Best regards,

 

Jeremy

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes