First, I have to admit that the dynamo team have provided nodes that could do exactly what I tried to code in python, namely colleting all elements by a list by “Natural Category Name”.
Secondly, have I turned the code collecting elements that has materials into a node named as Element.HasMaterialQuantities". The node are now included in the “DanEDU Dynamo” package.
Working through the solutions provided I am unable to find and access the RVT Links built-in category which (hopefully) would allow access to the reference Revit models in the project and begin creating associations across models. The warning in Dynamo is this:
Warning: Category.ByName operation failed.
The selected category is not valid in this document.
I’m curious what would make a category ‘valid’ ? The only thing that comes to mind is that the underlying code of Revit disallows access to Revit Links through the API at this time. I realize the API can only go so far and hinges on what the engineers at Autodesk reveal to us common folk in the API.
Is there a way to select All of the Elements in the entire Project? I have tried feeding individual categories into List.Create as you have shown. I am concerned that this method is prone to user error if someone forgets to add all of the categories in the project. Additionally I noticed that there are many solutions that involve Python coding. I am new to Dynamo so I am difficulty understanding the posts that use long strings of Python code.
I am creating a script that calculates the volume of all of the Concrete in the entire building. I successfully created a script that can calculate the volume of all the elements on a specific floor. Instead of using “All Elements at Level” I’d like my script to be based on all Elements in the Project. Is it possible to do this without first learning Python coding?
Below is my functioning script, based on materials on a given level:
One major backside on the Sastrugi node is that it takes a lot of elements there is of no relevance in most cases. The exact reason why both @T_Pover and I have made nodes there have better selections than the Sastrugi nodes long before the Sastrugi node was released. This is what is described earliere in the post…
@erfajo You are correct as I used your coding as an inspiration for my intended purpose.
The intention of the node was “Big net, no holes” to catch all the for a total overview of project contents.
(I have a had quite a few projects where more data has been more helpful)
I see how the node name could cause some room for interpretation by the user, I appreciate the issue identification. Perhaps a rename is required, from “Get All Elements in Project” to “Get Everything in Project” (will add this to the list for the next release)
I agree with the earlier postings by @erfajo and @T_Pover that show better targeted element extraction is essential to reduce graph complexity and run-times.
As always, I recommend that you (anyone reading this) check you are using the right tool for the job, in the right way. Any Q? the forum is always here
According to good customs a credit would have been appropriate in cases where the code is copied.
I did also make another node than the “Element.HasMaterialQuantities” that found elements used in the project, this node is called “Element.ByDocument”. It doesn’t get all the fish in the sea but it takes elements there under normal situations is of no interest.
In 95 out of 100 cases will “Element.HasMaterialQuantities” or @T_Pover node give what is needed, while “Element.ByDocument” covers the remaining. If I would have those extra you collect with my code, then it would be such a special case that I would only search for that category. It is using to much computational power and worst of all memory to collect all the fish in the sea.
To be honest and as argued in this post, I do believe that your node is waste of time and memory, and I can be allowed to say that since it is my code when it comes to all and I did abandon it because of that.
It works this way but takes some time (About 2 minutes). Using all the info above (Thanks as always power users T_Pover, Konrad, etc… ) I got it to work (Did not delete room separations however lol). I am going to try to create some views and delete from those It might work faster. will keep you postedworking it out2.dyn (10.6 KB)
Hello man, I hope everything is going well for you. Could you please explain to me how could I take out all the elements I have in my Revit model through nodes/python?
Moreover, I want to use them for taking out the quantity-takeoff and afterward for costing thus it would be better if you could be of any help in this domain too. Thanks