Error: Deferencing a Non Pointer. Room Number Script

I am trying to make a script so that I can assign a new parameter to elements that are in a room. I want the element in the room to have the parameter ‘Room Number’ of the room its in. I have a script however keep getting the issue saying dereferencing a non pointer. Any thoughts how to get rid of the error?

Hi @Aaron.woo,

Could you drop here complete screenshot/images of your graph?

@Kulkul see above. Hopefully it is legible.

@Aaron.woo Try this:

@Kulkul Unfortunately no luck. Still coming up with the same errors. I am using Dynamo 1.0.1. Trying to assign the room number to the plumbing fixtures.

@Aaron.woo Try this DYN file RoomElements.dyn (7.8 KB)

1 Like

Looks like your “Room.AtPoint” node is not collecting anything.
I used your script in Revit 2016 using Dynamo 1.1.0, and Archilab package v.2016.5.27.
It would most likely be the Python script inside the “Room.AtPoint” node is calling a function that is newer/older than the version you are using. Try copying the Python node from inside the “Room.AtPoint” node directly into your definition and use that instead of the “Room.AtPoint” node. This should tell you what is failing in the script.

Hope this helps

1 Like

@Alisder_Brown Yeah its not collecting anything that’s why i gave him the python so that to find out the reason.

@Aaron.woo Here is another possible way to assign using Rhythm’s “Element.Room” custom node


@Kulkul @Alisder_Brown
Alisder I agree it seems that the Room.AtPoint Node was having problems. Im only just beginner with Dynamo so not so clued in on troubleshooting with Python Script however I did try your alternative with Rhythm’s Element. ode and it worked! My new favourite node.

Just wondering though the Room.AtPoint node could be having issues with referencing function that is newer/older. Could the Element.Room node have the same issue as packages and Dynamo update? just want to know so I know what to look out for to prevent this.

Thanks a lot for the help guys.