Skip to content

Instantly share code, notes, and snippets.

@wtertinek
wtertinek / CountAllEntities.cs
Created August 2, 2016 21:28
Count all entities in all layouts
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");
}

Keybase proof

I hereby claim:

  • I am wtertinek on github.
  • I am wtertinek (https://keybase.io/wtertinek) on keybase.
  • I have a public key whose fingerprint is 7FB5 5A57 77E2 5E83 B883 FF32 3CDC 8D18 129A C318

To claim this, I am signing this object: