Creating Revit components sometimes get "Deleted Revit Component"

Hi all,

I’m trying to create hangers for ducts at required spacing by using RiR.

In my test model, it works well on every duct segments except one. (see pic below)

After some testing, I find that:

  1. When selecting only this duct element, the script works well.
  2. When selecting this segment and others at the same time, it works sometimes but most of the time the result of this segment shows “Deleted Revit Component” and does not create anything.

My environment is:

  1. Rhino.Inside Revit: 1.21.8913.17015 (2024-05-27T09:27:10)
  2. Rhino: 7.37.24107.15001 (Rhino 7)
  3. Revit: 2020.2 (20200210_1400(x64))
  4. CLR: 4.0.30319.42000 (4.8.9261.0)
  5. OS: Microsoft Windows NT 10.0.22631.0

Sample .rvt model and .gh are below:

HangerTest.rvt (9.7 MB)
CreateHangerTest.gh (44.9 KB)

Not sure if it’s a bug or not, any hints would help, thanks in advance.

1 Like

In isolation they work fine, i think your issue is with the parameter inputs for those elements.

1 Like

Thanks @Japhy,

I found the reason. It’s because Set Element Parameter update element in different sequences, in some cases that the element parameter combinations cannot create elements properly.

So I make them done in proper sequence to make sure elements can be created.
Thank you :smile: