Message 1 sur 14
Reload Link CAD

Non applicable
02-10-2016
12:55 AM
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Lien permanent
- Imprimer
- Signaler
Hi there,
I wonder if we could programmatically reload linked CAD in Revit
This need comes from my actual works since I usually reload linked CAD to keep track of the changes every time the linked CAD is revised. And I found it extremely annoying when I need to repeatedly open the Manage Links >> switch to CAD Formats >> find a link in the very long list of Linked CAD >> Reload
I skimmed through many posts related to this issue but none of them seem to be able to address this issue
I am playing around with the outline idea shown in the below code
Hope to some can help me out
Thank you
Nguyen Duy Hoa
public void ReloadLinkedCAD(Document doc) { IList<ImportInstance> importIntaces = new FilteredElementCollector(doc).OfClass(typeof(ImportInstance)).Cast<ImportInstance>().Where(i => i.IsLinked == true).ToList(); using (Transaction t = new Transaction(doc, "Reload Imports")) { t.Start(); foreach (ImportInstance ints in importIntaces) { if (ints.Category.Name.EndsWith(".dwg")) { ElementId typeId = ints.GetTypeId(); CADLinkType cadLink = doc.GetElement(typeId) as CADLinkType; //How to reload cadLink? } } t.Commit(); } }