Hello
I’m trying to find a way to reload all the multiple and single link of a project but there is only information about the revit link
Someone has information about it.
regards
Hello
I’m trying to find a way to reload all the multiple and single link of a project but there is only information about the revit link
Someone has information about it.
regards
Rodrigo,
Unfortunately, the Revit API (and therefore Dynamo) does not have the ability to reload CAD links, just RVT links. Hopefully this capability will be added soon.
Michael
gracias por la informacion.
ojala se pronto la incorporacion de esta funcion.
saludos
The API for Revit 2018 includes a new method called CADLinkType.reload(). I haven’t tested it yet but it should let you reload DWG links.
Hello
thanks for the info.
I’m testing the api
Generates an error in the line …Reload()
Any suggestions?
I appreciate the information
regards
Sub Button5Click(sender As Object, e As EventArgs)
Dim doc As Document = commandData.Application.ActiveUIDocument.Document
Using t As New Transaction(doc, "Reload Imports")
t.Start()
For Each ints As ImportInstance In New FilteredElementCollector(doc).OfClass(GetType(ImportInstance))
If ints.Category.Name.EndsWith(".dwg") Then
Dim typeId As ElementId = ints.GetTypeId()
'How to reload cadLink?
Dim cadLink As Autodesk.Revit.DB.CADLinkType = TryCast(doc.GetElement(typeId), CADLinkType)
MessageBox.Show(cadLink.Name.ToString)
cadLink.Reload() '--------ERROR
End If
Next
t.Commit()
End Using
End Sub
The code works well in revit 2018