Detach a model for transmital

Detach a model for transmital

Hernan.Echevarria
Explorer Explorer
488 Views
2 Replies
Message 1 of 3

Detach a model for transmital

Hernan.Echevarria
Explorer
Explorer

Hello,

I have a tool that batch detaches models, cleans them and saves them to send them to other consultants.

Revit saves a new central file in our "Out" folder but when we send the file to others, they receive the message that this file was moved and it doesn't find the central file. So far I was not very concerned about this because they can just do a "save as" to create a new central file. However, I noticed that if I use the eTransmit plugin, when opening the file it doesn't give the same warning.

 

I was wondering if there is a way to replicate what eTransmit does with the Revit API.

I have seen that there are some properties that seem to be related to this: ClearTransmittedSaveAsNewCentral, and ClearTransmitted, but I can't make this work, are these related to what I want to achieve?

 

Many thanks in advance

0 Likes
Accepted solutions (1)
489 Views
2 Replies
Replies (2)
Message 2 of 3

RPTHOMAS108
Mentor
Mentor
Accepted solution

1) TransmissionData.ReadTransmissionData

2) TransmissionData.IsTransmitted

3) TransmissionData.WriteTransmissionData

 

1 & 3 are static members.

 

So would try setting the IsTransmitted to true as I assume that is what the eTransmit does to avoid the issue noted.

Message 3 of 3

Hernan.Echevarria
Explorer
Explorer

Hello,

This worked, thank you very much!

Here is my code:

ModelPath outModelPath = ModelPathUtils.ConvertUserVisiblePathToModelPath(outputFolder + @"\" + m.RVTName + ".rvt");
TransmissionData transData = TransmissionData.ReadTransmissionData(outModelPath);
transData.IsTransmitted = true;
TransmissionData.WriteTransmissionData(outModelPath,transData);

This code runs once the model is saved in the desired location and closed. outModelPath is the full path of that saved model.

 

For those who don't know what is the message that I was looking for, this is the desired message:

2022-05-13_09h05_56.png

Thanks!