I am looking for a simple way to activate a DrawableOverrule on objects contained in modelspace, as opposed to all entities in the database.
I have figured out how many of the filters work, but I can't seem to figure ou how to do this simple task. In the case I am working on, the exemple drawing is VERY large, with tens of thousand of block references, over 1000 block definitions, adding polylines and other objects, I probably have around 300k object in my database. But in what I am trying to do, I do not need to modify the block contents... witch is why I am trying to exclude them.
My problem is abviously with performance. Right now I am including/exculding them in the IsApplication (CustomFilter), but this is still VERY slow. I don't think I can go faster than that:
public override bool IsApplicable(RXObject overruledSubject)
{
Entity vEnt = (Entity)overruledSubject;
string vBlockName = "";
try
{
vBlockName = vEnt.BlockName.ToUpper();
}
catch (System.Exception ex) { }
return (vBlockName == BlockTableRecord.ModelSpace);
}
I there any way I can completly exclde them from the overrule so I can save this processing time?
Thanks in advance for any ideas / inputs!