I am trying to link multiple DWG files into Revit using the Link Method. I get the error:
TypeError: expected DGNImportOptions, got DWGImportOptions
As I understand it from the Revit API docs, the Link Method can take both of these import options.
How do i make it expect DWGImportOptions?
Here is my code:
doc = DocumentManager.Instance.CurrentDBDocument TransactionManager.Instance.EnsureInTransaction(doc) filepaths = IN view = IN DWGoptions = DWGImportOptions() DWGoptions.Placement = ImportPlacement.Origin DWGoptions.OrientToView = True for filepath in filepaths: loadResult = doc.Link(filepath, DWGoptions, view) TransactionManager.Instance.TransactionTaskDone()
This is how it looks in Dynamo
And here is the RevitAPI link: