/// <summary> /// Clear the selection /// </summary> public void Clear() { Elements.Clear(); Nodes.Clear(); Loads.Clear(); SectionFamilies.Clear(); BuildUpFamilies.Clear(); Materials.Clear(); Sets.Clear(); }
/// <summary> /// Add the specified object to the selection, if possible /// (i.e. if it is of a selectable type and does not already exist within the current selection) /// </summary> /// <param name="mObject">The object to select</param> /// <returns>True if the item was successfully added to the selection</returns> public bool Select(ModelObject mObject) { if (mObject == null) { return(false); } else if (mObject is Element) { return(Elements.Add((Element)mObject)); } else if (mObject is Node) { return(Nodes.Add((Node)mObject)); } else if (mObject is Load) { return(Loads.Add((Load)mObject)); } else if (mObject is SectionFamily) { return(SectionFamilies.Add((SectionFamily)mObject)); } else if (mObject is BuildUpFamily) { return(BuildUpFamilies.Add((BuildUpFamily)mObject)); } else if (mObject is Material) { return(Materials.Add((Material)mObject)); } else if (mObject is ModelObjectSetBase) { return(Sets.Add((ModelObjectSetBase)mObject)); } else { return(false); } }
/// <summary> /// Default constructor /// </summary> public SelectionSet() { SectionFamilies.MonitorElementSelectionSection(Elements); BuildUpFamilies.MonitorElementSelectionFamily(Elements); }