Revit.SDK.Samples.NewHostedSweep.CS.EdgeFetchForm.InitializeTypes C# (CSharp) Method

InitializeTypes() private method

Initialize the combo box data source with Autodesk.Revit.DB. e.g. FasciaTypes, GutterTypes, SlabEdgeTypes, and so on.
private InitializeTypes ( ) : void
return void
        private void InitializeTypes()
        {
            List<object> objects = new List<object>();
            object selected = null;
            foreach (object obj in m_creationData.Creator.AllTypes)
            {
                objects.Add(obj);
                if (m_creationData.Symbol != null)
                {
                    if ((obj as Autodesk.Revit.DB.ElementType).Id.IntegerValue == m_creationData.Symbol.Id.IntegerValue)
                    {
                        selected = obj;
                    }
                }
            }
            comboBoxTypes.DataSource = objects;
            comboBoxTypes.DisplayMember = "Name";

            if (selected != null)
                comboBoxTypes.SelectedItem = selected;
        }