Dear Carlos,
Could you help me out explaining a bit on what are you trying to return ? or what does that method returns?
If I understand it is returning an element id with the integervalue = -2000051,
I don't think I've seen the use of Category like that before. You can take a look at this post by Jeremy Tammik, who is one of my teammates and an expert with Revit API, which could help you a lot with the development of Revit API for future reference.
http://thebuildingcoder.typepad.com/blog/2010/05/categories.html
Can you try something like this
public bool AllowElement(ElementId elem)
{
return elem.IntegerValue == -2000051;
}
Just notice that now in the parameter the ElementId is what is getting passed.
or
public bool AllowElement(Element elem)
{
return elem.Id.IntegerValue == -2000051;
}
So you don't have to change the parameter that is getting passed.
Try it and confirm with me that my assumption was correct please.
Hope this helps you out.
Ps. here is a couple of links for the start of your revip API development that can come in handy 🙂
http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=16849339
http://thebuildingcoder.typepad.com/blog/about-the-author.html#2
http://adndevblog.typepad.com/aec/
Cheers,