TransmissionData Does not Include Revit Links

TransmissionData Does not Include Revit Links

smharch
Advocate Advocate
529 Views
5 Replies
Message 1 of 6

TransmissionData Does not Include Revit Links

smharch
Advocate
Advocate

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();

 

0 Likes
530 Views
5 Replies
Replies (5)
Message 2 of 6

jeremy_tammik
Alumni
Alumni

Weird. I asked the development team for you. 

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 6

smharch
Advocate
Advocate

Thank you, Jeremy, please let me know if you need anything from me. 

0 Likes
Message 4 of 6

smharch
Advocate
Advocate

I have another file that I started testing on. This one I know came from BIM360 as its links still have their BIM360 path. Neither of the two links show in ReadTransmissionData. Are BIM360 links stored elsewhere? 

scubaman120_0-1668799501169.png


Edit:
I just reread the documentation on ReadTransmissionData and it does say the below. Is BIM360 considered an external server? 


"The TransmissionData returned by this function contains data about all ExternalFileReferences in the document. ExternalResourceReferences to extenal servers will not be returned by this function. TransmissionData contains information about local or Revit Server references only."


If BIM360 is considered an external server and a file is eTransmited from BIM360 and links repathed would the links still be considered from an external server until the file is opened and saved with the new non-BIM360 path? 

0 Likes
Message 5 of 6

jeremy_tammik
Alumni
Alumni

Question: If BIM360 were considered an external server and a file is eTransmited from BIM360 and links repathed,  would the links still be considered from an external server until the file is opened and saved with the new non-BIM360 path?

 

Answer: BIM 360 eTransmit package zip file is repathed to relative path. So it would no longer be considered external server.

 

If the link path is `BIM360://`, it’s not accessible via `TransmissionData` from my research a while ago.

 

Maybe The Building Coder article on Access BIM360 Cloud Links will help?

 

https://thebuildingcoder.typepad.com/blog/2019/06/accessing-bim360-cloud-links-thumbnail-and-dynamo....

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 6 of 6

smharch
Advocate
Advocate

Thank you for the reply, Jeremy. That solves my later posts but not the OP as those links were from a C drive.

 

My end goal is to unload all links prior to opening a file. If transmission data is unavailable for BIM360 links is there a way to set them to unload? 

0 Likes