Object Reference not set to instance of an object
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey Guys
In my current application i populate 2 detail items + a spot coordinate on some views (selected from a form)
while testing the app some times i'm getting the exception in the title but some times not and today i decided to explore it and came to this conclution:
the exception is thrown by Revit API
case 1:
starts Revit, open an existing model, invoke my app command, select a view (or some view for populate) and the 2 detail items family are already loaded in the model, the app works fine.
case 2:
start Revit, open an existing model, delete any existing instances of my detail items, purge the detail items from the database and then invoke my app command, select a view Bom i'm getting the exception. to recover from this i just draw some thing a wall or even a line and the app works.
i enter deep in the code to find from where the exception is coming and it's the view collector.
it seems that after purging the detail items the new created view collector has garbage
does any one here familer with this and has a workaround?
(i am working with R2015 and still do not know what going up)
thanks in advance
Moshe