private void ListDisplayProperties(DisplayProperties dp) { Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("List Display Properties: \nName:" + dp.Name + "\n"); System.Collections.Specialized.StringCollection sc = new System.Collections.Specialized.StringCollection(); DisplayComponent[] components = dp.GetDisplayComponents(out sc); if (components == null || components.Length == 0) { return; } //foreach (DisplayComponent obj in components) for (int i = 0; i < components.Length; i++) { DisplayComponent obj = components[i]; string name = sc[i]; DisplayComponent dc = (DisplayComponent)obj; Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("List Display Components: " + name + "\n"); Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Is Applicable? : " + dc.IsApplicable.ToString() + "\n"); Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Is Inherited?: " + dc.IsInherited.ToString() + "\n"); if (dc is DisplayComponentEntity) { Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("It is a Display Component Entity. \n"); } if (dc is DisplayComponentHatch) { Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("It is a Display Component Hatch. \n"); } } }