Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Remove links without opening the model

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
skeletank
3367 Views, 2 Replies

Remove links without opening the model

Is there any way in the Revit API to remove links from a model without opening it?

I know that I can use the transmission data class to modify the paths of links with opening the models but I would like to remove the links as well without needing to open the models.  Is this possible?

 

NOTE: I am using Revit 2014 API.  

2 REPLIES 2
Message 2 of 3
Joe.Ye
in reply to: skeletank


Removing links is not supported.
As the document for TransmissionData class says, TransmissionData cannot add or remove references to external files.. Set the last parameter to false.

But you can use this class to prevent Revit from loading some references by this method:
public void SetDesiredReferenceData(
ElementId elemId,
ModelPath path,
PathType pathType,
bool shouldLoad
)



Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
Message 3 of 3
skeletank
in reply to: Joe.Ye

Hi Joe,

 

I am aware that you cannot remove the links using the TransmissionData class but I was hoping that there was a way to do it without opening the document by using a separate part of the API.  However, I missed the part about setting the links up so that they are unloaded by default.  That can be useful in itself.

 

Thanks,

Matt 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community