BuildingCoder.Creator.DrawPolygons C# (CSharp) Méthode

DrawPolygons() public méthode

public DrawPolygons ( List loops ) : void
loops List
Résultat void
        public void DrawPolygons(
            List<List<XYZ>> loops)
        {
            foreach( List<XYZ> loop in loops )
              {
            DrawPolygon( loop );
              }
        }

Usage Example

Exemple #1
0
        public Result Execute(
            ExternalCommandData commandData,
            ref string message,
            ElementSet elements)
        {
            UIApplication app   = commandData.Application;
            UIDocument    uidoc = app.ActiveUIDocument;
            Document      doc   = uidoc.Document;

            // retrieve selected floors, or all floors, if nothing is selected:

            List <Element> floors = new List <Element>();

            if (!Util.GetSelectedElementsOrAll(
                    floors, uidoc, typeof(Floor)))
            {
                Selection sel = uidoc.Selection;

                message = (0 < sel.GetElementIds().Count)
          ? "Please select some floor elements."
          : "No floor elements found.";

                return(Result.Failed);
            }

            Options opt = app.Application.Create.NewGeometryOptions();

            List <List <XYZ> > polygons
                = GetFloorBoundaryPolygons(floors, opt);

            int n = polygons.Count;

            Debug.Print(
                "{0} boundary loop{1} found.",
                n, Util.PluralSuffix(n));

            Creator creator = new Creator(doc);

            using (Transaction t = new Transaction(doc))
            {
                t.Start("Draw Slab Boundaries");

                creator.DrawPolygons(polygons);

                t.Commit();
            }

            return(Result.Succeeded);
        }
All Usage Examples Of BuildingCoder.Creator::DrawPolygons