Sup' I would like to link an IFC file with Revit Design-Automation, not to directly open it because opening causes troubles: Working with IFC files? Elements missing, limited functionality?, so I'm OMW 2 link it using code from that article:
ModelPath mp = ModelPathUtils.ConvertUserVisiblePathToModelPath(@"C:\input.ifc");
RevitLinkOptions rlo = new RevitLinkOptions(false);
var linkType = RevitLinkType.Create(RevitDoc, mp, rlo);
var instance = RevitLinkInstance.Create(RevitDoc, linkType.ElementId);
The first step is to be able to create a new empty document, however what I'm seeing so far is that NewProjectDocument
is available on Application
but not on ControlledApplication
which is the object available when running in DA.
My question then, is there a way to create a new document from DA? Alternatively is there a way to link the input ifc instead of directly opening it in DA?
Thanks for the insights.