Ejemplo n.º 1
0
        public void Execute(UpdaterData data)
        {
            if (data == null)
            {
                throw new ArgumentNullException(nameof(data));
            }

            Document document = data.GetDocument();

            if (!registered)
            {
                registered = true;
                _pilingCoordinator.RegisterDocument(document);
            }

            List <ElementId> modifiedElementIds = new List <ElementId>();

            modifiedElementIds.AddRange(data.GetAddedElementIds());
            modifiedElementIds.AddRange(data.GetModifiedElementIds());

            foreach (ElementId id in modifiedElementIds)
            {
                _pilingCoordinator.UpdateElement(document, id);
            }
        }
Ejemplo n.º 2
0
        public void Execute(UpdaterData data)
        {
            if (data == null)
            {
                throw new System.ArgumentNullException(nameof(data));
            }

            Document document = data.GetDocument();

            if (!registered)
            {
                registered = true;
                _pilingCoordinator.RegisterDocument(document);
            }

            FilteredElementCollector foundationCollection = new FilteredElementCollector(document).OfCategory(BuiltInCategory.OST_StructuralFoundation);

            foreach (Element element in foundationCollection)
            {
                _pilingCoordinator.UpdateElement(document, element.Id);
            }
        }