コード例 #1
0
        public override void GlobalExecute(Document doc)
        {
            var filter   = new ElementCategoryFilter(BuiltInCategory.OST_MEPSpaces);
            var elements = new FilteredElementCollector(doc).WherePasses(filter).ToElements();

            foreach (var e in elements)
            {
                SpaceNaming.TransferData(e);
            }
        }
コード例 #2
0
        public override void InnerExecute(UpdaterData data)
        {
            var modified = data.GetModifiedElementIds();
            var added    = data.GetAddedElementIds();
            var elements = added.Concat(modified).Select(x => doc.GetElement(x));

            foreach (Element e in elements)
            {
                SpaceNaming.TransferData(e);
            }
        }