Update keynote of link models

Update keynote of link models

manuel_f_perezii
Participant Participant
102 Views
0 Replies
Message 1 of 1

Update keynote of link models

manuel_f_perezii
Participant
Participant

Hello Everyone.

 

I am trying to update keynote of each family of all the linked models of the host file.

 

However I get this exception upon stepping on the using transaction clause.

 var linkInstances = new FilteredElementCollector(doc).OfClass(typeof(RevitLinkInstance)).Cast<RevitLinkInstance>();
  
foreach (var linkInstance in linkInstances)
  {
     using (Transaction txLink = new Transaction(linkDoc, "Assign Keynote to Linked Model Family Types"))
     {
        //update keynote here
     }
}

 

Document is a linked file. Transactions can only be used in primary documents (projects or families.)

 

Is this a limitation and what are my options? 

 

Thank you in advance.

0 Likes
103 Views
0 Replies
Replies (0)