Exemple #1
0
 /// <summary>
 /// Transaction wrapper around writing the local streams to the file.
 /// </summary>
 private void WriteStateToFile()
 {
     if (Control.InvokeRequired)
     {
         Control.Invoke(new WriteStateDelegate(StreamStateManager2.WriteStreamStateList), new object[] { File, DocumentStreams });
     }
     else
     {
         StreamStateManager2.WriteStreamStateList(File, DocumentStreams);
     }
 }
Exemple #2
0
 public override async void WriteStreamsToFile(List <StreamState> streams)
 {
     await RevitTask.RunAsync(
         app =>
     {
         using (Transaction t = new Transaction(CurrentDoc.Document, "Speckle Write State"))
         {
             t.Start();
             StreamStateManager2.WriteStreamStateList(CurrentDoc.Document, streams);
             t.Commit();
         }
     });
 }
Exemple #3
0
 public override void WriteStreamsToFile(List <StreamState> streams)
 {
     StreamStateManager2.WriteStreamStateList(File, streams);
 }