Object reference not set to an instance of an object and dereferencing to a non-pointer


Hello everybody,
Since yesterday i get this issue from the ImportInstance.LayerNamesInUse node. The previous node “Import DWG” gives out a ‘null’ value to me this explains why the issued node doesn’t work. My question is the following:

The script worked the day before and I haven’t changed anything to the script since then. Sometimes the script works when i close and open Dynamo and Revit, but most times it doesn’t. Is there a solution for this problem?

I’ve seen other people wih this topic but the solutions i found don’t work in my case.

I’m using GeniusLoci and BimmorphNodes in revit 2021.

Thanks in advance

Hi @jooteman,

For some reason the DWG can’t be imported. Are you sure about the active view and the scale ?
You can verify the which view is your active view with 2 OOTB nodes.
Can you share the DWG to try this behaviour ?

Hi @Alban_de_Chasteigner,

Thanks for the quick response!

Yes I can share the DWG. But what I find very weird is the fact that after I posted yesterday the script worked fine again. Now I’m back at the office it doesn’t work anymore.

Drawing floor plan Idnia V4.dwg (244.7 KB)