Revit Elements sometimes get deleted

revit
clockwork
lunchbox
python
dynamo

#1

Guys.

I’m working on a script that takes a string from Excel and sets several parameters on generic model elements in Revit. Most of the time they get edited just fine, but once in a while some elements get deleted.

I have no idea on where to start looking for the orgin of the problem.

My steps:

  1. Set parameter values in Excel and save
  2. Run script, script looks for elements with certain “id’s”.
  3. Script edits values to Revit elements (family types, materials…)
  4. Script matches parameters with elements
  5. Scripts sets all parameters and changes some family types

I do this a a couple of times sometimes. Setting the same settings on the elements after changing parameter values in excel. All elements are generica models.

Screencast to get an idea of what I’m doing (no problems):
https://knowledge.autodesk.com/community/screencast/c44f70dd-14a4-4720-8309-1cceea8a7f54

https://www.dropbox.com/s/ev23pfxeolctdmv/detail%20generator%20screenshot.png?dl=0 (updated)

Does anybody have a clue on how I can find the source of this problem. Bug?


#6

@erfajo, @Marcel_Rijsmus I got some messages of you two in mijn mail, but couldn’t reply directly.
I didn’t have the time to update the right screenshot last week. It should be fine now.


#7

I will leave it to @Marcel_Rijsmus. I have to withdraw myself from helping this issue. None mentioned, none forgotten.


#8

All i can think of is that changing the family type makes it loose its host?
Or needing one where there is none.


#9

Hoi Marcel, thanks. It seems to happen at random. Most of the time there is no issue changing type. The elements are all hosted by a level. I’ll see if I can break it, with changing parameters only.

Im working on two project and haven’t been working on this issue for a while again. Sorry again, and thanks for your time.