Message 1 of 6
TransmissionData Does not Include Revit Links
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
I am trying to set all Revit links to unloaded prior to opening a document. I have read through an old Building Coder article and achieved my desired outcome in a test file. I then went to test it on an actual file and it failed. So I started to dig in.
I listed all external links and there is not a single Revit link in the list. The only types in the list are KeynoteTable, AssemblyCodeTable, and CADLinks. The file has about 15 Revit links though.
The file has been transmitted already (not sure if this affects anything or not). If I open and save in place and then run my script it successfully finds and unloads all links.
Does anyone know why the following would not return any Revit links?
TransmissionData transData = TransmissionData
.ReadTransmissionData( location );
if( transData == null )
{
content += "does not have any transmission data";
}
else
{
// collect all (immediate) external references in the model
ICollection<ElementId> externalReferences
= transData.GetAllExternalFileReferenceIds();