Update a parameter value - Several elements in multiple categories

I’m trying to update a parameter value for several elements in Revit that involves multiple categories.

I was able to apply this routine to all elements of a category. So when I try to apply to the various categories I get this error message:

Warning: Internal Error, Report: Dereferencing a non-pointer.

If anyone can help me with these warnings, I will be very grateful !!

Hello !

Have you tried to clean the list before or after the “Element.type” ?

1 Like

I’m new to Dynamo… I think I’m not doing this correctly, the null is still on the list …

Thank you for the quick reply @imbert !

Delete the boolean, I think it will delete nulls

I removed the boolean but the error still continues @imbert


If you are just looking to filter the nulls out, you can use an == node connected to a filterbyboolmask.


List.Cean, with a false for maintain indices also does this.


Ah yeah, what @JacobSmall said. Didn’t notice that. Your List.Clean returns nulls because you had preserve indices set to true. This adds nulls to where you remove elements so it maintains the list structure.
If it is set to true, an element at position 10 will still be at position 10 if elements 1-9 are removed, because it replaces them with nulls.
If false, an element at position 10 will become position 1 when the previous 1-9 are removed, effectively removing nulls in the process.

1 Like

It was cool !! All nulls have been removed from the list! Thank you so much for this @JacobSmall @kennyb6

A new type of error has appeared and only a few spaces are empty:

Notice: Element. The SetParameterByName operation failed.
No parameters were found with this name.

That just means exactly what it says. Some element in your list does not have the parameter with the name you listed.


I’m filtering only the categories that have this parameter. Should not all elements have the parameter?

All elements that haven’t the parameter have 2 different IDs only. Selecting them by ID in Revit:

Is there any way to run without errors or I just ignore that error?

Once again, thank you @kennyb6 !!!

You can filter by the selection earlier in the graph by the lack of that parameter with an if statement. But in this case i’d keep it simple and ignore it.


Sorry for the inconvenience, I’m new to Dynamo and I do not know how to do what you said … Could you demonstrate an instruction through an image @JacobSmall ?

Thank you very much !!!

Unfortunately I cannot do an image/example (too busy - I’m doing this on my phone between meetings). Maybe later this week when I have time. As I noted before, in this case I would just ignore it.

OK, no problem @JacobSmall ! In this case it will be ignored as you said. I have tested in other files and have been having this error with other elements, I am afraid that this will hurt the work.

Anyway, thank you so much for helping !!