Hello, I’ve been trying to find a way to unload All CAD Links in the current document. Here is my code so far.
ALLCADTypesInDocument =
FilteredElementCollector(document)
.OfClass(CADLinkType)
.Where(c => c.IsExternalFileReference())
.ToList()
for type in ALLCADTypesInDocument:
extFileRef = type.GetExternalFileReference()
if (extFileRef == None or extFileRef.GetLinkedFileStatus() != LinkedFileStatus.Loaded) :
continue
//type.Unload(positions) Not working... this method does not exist for cad link
This seems to get all link types… however… i couldn’t find a way to unload then. Is there a way to do so?
Thank you all in advance