FamilyInstance.ByPointAndLevel in conjunction with Data.ImportExcel

I have a script which maintains families in a Revit model based on rows of data in a spreadsheet. Based on the content of the spreadsheet it:

  • Creates new family instances (and sets parameter values)
  • Modifies existing instances (updating parameter values)
  • Deletes existing instances

This all worked fine Dynamo 1.3, but I’m finding that with 2.0.1 it behaves as follows on first run:

  • It correctly deletes instances that are no longer required
  • It correctly updates existing instances
  • If fails to create new instances

With my test data one new family instance should be created. If I track through the nodes all of the input data to FamilyInstance.ByPointAndLevel is correct but the output from the list is one “empty” item in the list as per the screenshot attached.

If I immediately re-run the script it works fine.

I’ve also noticed that if I repeat the above but freeze nodes that interact with Revit, run the script, unfreeze the nodes and rerun the immediate re-run still works.

Any ideas on what’s going wrong here?

Sounds like an element binding issue. Can you post the file?