bsamc2000 Posted May 22, 2009 Posted May 22, 2009 This should be simple but my brain has already gone on holiday for the weekend. I am simply trying to count the total number of viewports in the active drawing. Each time I try this I only show "1", which is the active viewport. Any information would be greatly appreciated. Quote
SEANT Posted May 22, 2009 Posted May 22, 2009 Are you refering to Pviewports? Something like this perhaps: [CommandMethod("PVP")] static public void test() { Document doc = Application.DocumentManager.MdiActiveDocument; Database db = doc.Database; Editor ed = doc.Editor; ObjectIdCollection oidc = db.GetViewports(false); ed.WriteMessage("\nThe number of pviewports is " + oidc.Count.ToString()); } Quote
bsamc2000 Posted May 27, 2009 Author Posted May 27, 2009 Thank you. That worked great. I was trying to over complicate it. Sometimes simpler is better. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.