Created
August 2, 2016 21:28
-
-
Save wtertinek/110d2d2b1feb490974f7175e4411e19b to your computer and use it in GitHub Desktop.
Count all entities in all layouts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (var db = AcadDatabase.Active()) | |
{ | |
var allEntities = db.PaperSpace() | |
.SelectMany(ps => ps) | |
.Concat(db.ModelSpace); | |
System.Diagnostics.Debug.WriteLine("There are " + allEntities.Count() + " entities in all layouts"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment