Message 1 of 3
Not applicable
06-18-2021
01:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone
In a lot of my commands in my plugin, I'm using an ISelectionFilter to control what elements the user can select, and it all works fine in the live versions, but I'm getting an NullReferenceException before I select anything in debug mode on the following line:
return (e.Category.Id.IntegerValue.Equals((int)BuiltInCategory.OST_RoomTags));
in this class:
public class RoomPickFilter : ISelectionFilter
{
public bool AllowElement(Element e)
{
return (e.Category.Id.IntegerValue.Equals((int)BuiltInCategory.OST_RoomTags));
}
public bool AllowReference(Reference r, XYZ p)
{
return false;
}
}
Am I missing something?
I'm wondering how to handle this, because it never returns and error in the live projects.
Solved! Go to Solution.
Developer Advocacy and Support +