因為版本問題 原:foreach(Element elem in selections.Elements){ } 現: ElementSet selections = new ElementSet(); foreach (ElementId elementId in commandData.Appl ...
因為版本問題
原:
foreach(Element elem in selections.Elements)
{
}
現:
ElementSet selections = new ElementSet();
foreach (ElementId elementId in commandData.Application.ActiveUIDocument.Selection.GetElementIds())
{
selections.Insert(commandData.Application.ActiveUIDocument.Document.GetElement(elementId));
}
foreach (Element elem in selections)
{
}