RevitLookup.Test.EStorageBundle.CreateEntityOfSchema C# (CSharp) Method

CreateEntityOfSchema() public abstract method

Override this method to create an Entity of the Schema created in GetOrCreateSchema.
public abstract CreateEntityOfSchema ( ) : System.Entity
return System.Entity
        public abstract Entity CreateEntityOfSchema();

Usage Example

Example #1
0
        /// <summary>
        /// Called by all methods defined partial classes in .\EStorageSchemaDefinitions.  See EStorageBundle1.cs for an example.
        /// </summary>
        /// <param name="bundle"></param>
        private void AddSchemaAndEntityImplementation(EStorageBundle bundle)
        {
            Transaction tAddEntity = new Transaction(m_revitApp.ActiveUIDocument.Document, "Add Entity of: " + bundle.SchemaName);

            tAddEntity.Start();
            foreach (ElementId id in m_revitApp.ActiveUIDocument.Selection.GetElementIds())
            {
                Element element = m_revitApp.ActiveUIDocument.Document.GetElement(id);
                Entity  entity  = bundle.CreateEntityOfSchema();
                element.SetEntity(entity);
            }
            tAddEntity.Commit();
        }
All Usage Examples Of RevitLookup.Test.EStorageBundle::CreateEntityOfSchema