Exemple #1
0
 public void SendTypeParameters(Autodesk.Revit.DB.FilteredElementIterator iter)
 {
     iter.Reset();
       while (iter.MoveNext())
       {
       sendParameters(iter.Current as Autodesk.Revit.DB.Element);
       }
 }
Exemple #2
0
 public void SendGeometry(Autodesk.Revit.DB.FilteredElementIterator iter, Autodesk.Revit.UI.UIApplication application)
 {
     UIDocument uidoc = application.ActiveUIDocument;
      Application app = application.Application;
      Document doc = uidoc.Document;
      MessageBuffer mb = new MessageBuffer();
      mb.add(1);
      sendMessage(mb.buf, MessageTypes.ClearAll);
      View3D = null;
      if (uidoc.ActiveView is View3D)
      {
      View3D = uidoc.ActiveView as View3D;
      }
      if (View3D == null)
      {
      iter.Reset();
      while (iter.MoveNext())
      {
          if (iter.Current is Autodesk.Revit.DB.View3D)
          {
              View3D = iter.Current as Autodesk.Revit.DB.View3D;
              break;
          }
          // this one handles Group.
      }
      }
       ElementId activeOptId = Autodesk.Revit.DB.DesignOption.GetActiveDesignOptionId(doc);
      iter.Reset();
      while (iter.MoveNext())
      {
      Autodesk.Revit.DB.Element el = iter.Current as Autodesk.Revit.DB.Element;
      if (el.DesignOption == null || el.DesignOption.Id == activeOptId)
      {
          SendElement(el);
      }
     // this one handles Group.
      }
 }
Exemple #3
0
 public void SendGeometry(Autodesk.Revit.DB.FilteredElementIterator iter, List<int> IDs)
 {
     iter.Reset();
      while (iter.MoveNext())
      {
     if (iter.Current is Autodesk.Revit.DB.View3D)
     {
        View3D = iter.Current as Autodesk.Revit.DB.View3D;
        break;
     }
     // this one handles Group.
      }
      iter.Reset();
      while (iter.MoveNext())
      {
     Autodesk.Revit.DB.Element elem;
     elem = iter.Current as Autodesk.Revit.DB.Element;
     foreach (int ID in IDs)   // get the wall type by the name
     {
         if (ID == elem.Id.IntegerValue)
        {
           MessageBuffer mb = new MessageBuffer();
           mb.add(ID);
           sendMessage(mb.buf, MessageTypes.DeleteObject);
           SendElement(elem);
           break;
        }
     }
     // this one handles Group.
      }
 }
Exemple #4
0
 public void SendGeometry(Autodesk.Revit.DB.FilteredElementIterator iter, Autodesk.Revit.DB.Document doc)
 {
     MessageBuffer mb = new MessageBuffer();
      mb.add(1);
      sendMessage(mb.buf, MessageTypes.ClearAll);
       // todo use the current or default view
      iter.Reset();
      while (iter.MoveNext())
      {
     if (iter.Current is Autodesk.Revit.DB.View3D)
     {
         View3D = iter.Current as Autodesk.Revit.DB.View3D;
       break;
     }
     // this one handles Group.
      }
       ElementId activeOptId = Autodesk.Revit.DB.DesignOption.GetActiveDesignOptionId(doc);
      iter.Reset();
      while (iter.MoveNext())
      {
      Autodesk.Revit.DB.Element el = iter.Current as Autodesk.Revit.DB.Element;
      if (el.DesignOption == null || el.DesignOption.Id == activeOptId)
      {
          SendElement(el);
      }
     // this one handles Group.
      }
 }