Lighting Fixtures read room name inside the linked files and add it to their custom parameter value

Dear Dynamo Experts,

I found amazing dynamo script from Cesar Escalante in youtube. I tried to rewrite an script however, I got some error.
You can find the original script from the below link:

  • I got this error form Elements in Room nod: Traceback (most recent call last): File “”, line 68, in AttributerError: 'List[object] has no … . Do anyone know the reason. How can I solve it?

  • I also do not understand what do Count node and List.Map node do in the script. I amm not sure whether I set them right.

My script:

thanks in advance


From a brief look, the count and map nodes are being used along with the cycle to repeat the parameter values, and I presume that this is because there are multiple lighting fixtures within 1 room, so you need to repeat the parameter value “Room name” for the number of light fittings within the room.

I have not watched the video, but there are a few possibilities why it doesn’t work.

  1. Have you checked the Revit link room bounding is on?
  2. Elements in Room may need to use longest or cross-product lacing.

Try these and let us know how you get along. However, I have a feeling a script like this will need to use node “levels”. So if you havent used these before, i suggest reading up on them on dynamoprimer or similar.

Many thanks Daniel for your answer.

The longest lacing helped a lot.

I still have an error for Elements in Room node. The error is: Traceback (most recent call last): File “”, line 68, in AttributerError: 'List[object] has no … .

I also got another error for Elements Set Parameter by Name node. The error is: Dereferencing the non-pointer.

The current situation of my script:

I am now trying to read about these errors in the forum.If you can tell me some resources about these error specially _Dereferencing the non-pointer, That would be great

All the best

@hossein.kashfi, I’m glad the lacing helped.

However the main problem I can see from your current script is that from the you are using sublists from the “spring collector linked instance elements”. If you could use a “watch” node after this node, it would help know exactly what list information is being used.

What I suggest to use in order to remove these sublists is a list.flatten node.

The issue with set.parameter node is likely that you need to apply a cycle to the parameter name list as well as the parameter values.

Hope this helps.