I’m turning to you today because I’m having a little problem with the Room To Element node…
My aim here is to create a script that will retrieve the room name and impute it into a parameter (created for the occasion).
I’ve done a test on a simple Revit (without a linked model) and it works very well, as shown in the following image:
But on a larger project with linked models, I don’t get any results (and this isn’t because the script isn’t taking the right document) and I get this:
We can already see that on the ʳʰʸᵗʰᵐ|Elements.GetParameterValueByNameTypeOrInstance node we don’t have the same type of result…
I confess I’m not sure how to do this…
And with the Element In Room node it doesn’t work with walls/floors and ceilings…
Here’s my problem, does anyone have any bright ideas?
If I understand correctly, the rooms and tjhe elements are in the same project.
Try with a small portion of your room list and see if you get results. If so, continue with another part of your rooms list until you find the culprit.
Is this the same machine and the same version of Revit/Dynamo? Can you copy the contents of the Room ToElement node and run it in the workspace to get whatever errors it’s running into?
Have you pulled out the contents of the custom node to see what the error is? That should tell you what the issue is and give us a much better idea of what needs to happen.
You can edit a custom node by double clicking on it. This will open up the node workspace with all of the contained nodes (which may just be a single python node with inputs and outputs). You can copy all of those nodes back into your graph workspace and run them like normal. Sometimes you have to adjust your input list structure if the custom node handles lists automatically, but you can then run the graph and see what errors you’re having with the custom node contents.
Having a linked model won’t change anything unless the rooms are from the linked model, which you stated they were not.
Remove the input code blocks and replace them with your actual inputs. It would also help if we could see the whole code instead of just some of it. Copy/paste the python code as preformated text so we can read it.
Im using the “Element ToRoom” node in my script that gets the room number (rooms are in a link) and assign the value to a parameter for elements (elements in current model) inside that room.
its working fine, and the models are quite large.
I dont know though if this is exactly what you want, or have i misunderstood you.
On the other hand, there is a node in BIMORPH package called “BoundingBox.GetElementssInside” should also do the trick, might be worth it to check it out.
Please use preformatted text (</>) for code, otherwise the formatting is lost and the code is worthless. Also show us the inputs you’re providing the node. We need all the context of what’s going on, not just some of it.
You’re getting a null reference. You have at least one instance of an invalid object somewhere.