namespace Autodesk.AutoCAD.DatabaseServices.MyExtensions
{
public static class LayerTableRecordExtensionMethods
{
public static bool HasObjects(this LayerTableRecord ltr, Editor ed)
{
bool hasObjects= false;
TypedValue
[] tvs
= new TypedValue
[] {
new TypedValue
((int)DxfCode
.LayerName, ltr
.Name) };
SelectionFilter filter
= new SelectionFilter
(tvs
);
PromptSelectionResult psr = ed.SelectAll(filter);
if (psr.Status == PromptStatus.OK)
hasObjects= true;
return hasObjects;
}
}
}