Tuesday, 16 June 2009

Background workers and Revit 2010

Now here's an interesting one for you found by my colleague.

Using the Revit 2010 API and a vb.net backgroundworker extracting the Revit links from a drawing causes the an error. To be specific if you are interrogating the model and this is done in the primary thread then all works fine, but the moment you place it in a background thread you get an 'Object not set to an instance' error...

Autodesk have been contacted with a small test app and I'll keep you posted on the outcome...

1 comment:

  1. Hi Martin,

    I am running long run code (batch element creating including columns, walls, slabs, beams...) in the background and report the progress back to the UI thread(in this case, i am using progressbar to report the progress). However, 3 errors occurred when i try to:
    1)load family symbol using Loadfamilysymbol() method. Familysymbol return null.
    2)rotate column instance.
    Critical error message box
    "A serious error has occurred. Please save any work before continue" shown after the code.
    3)assign CompoundStructure to floor type.
    Critical error message box
    "A serious error has occurred. Please save any work before continue" shown after the code.

    Any helps is appreciated.

    ReplyDelete