Hi,
I dont know anything about this but has MaterialVolume seems plausible to me.
I know this is a field in the revit database exported using DBLink.
Marcel
Hi,
I dont know anything about this but has MaterialVolume seems plausible to me.
I know this is a field in the revit database exported using DBLink.
Marcel
I tried the HasMaterialQuantities property as well, but that will omit a lot of categories that are actually part of the model categories.
Now what if we wanted to save all these out to a folder?
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.
Thoughts?
You can collect them.
in c# it is something like this:
var linkColl= new FilteredElementCollector(DocumentManager.Instance.CurrentDBDocument);
linkColl.OfClass(typeof(RevitLinkInstance));
var elements = linkColl.ToElements();
Oh wonderful that seems to be working for me! Thanks for helping get this off the ground for me John.
Glad to help out!
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.
From the Sastrugi Package.
Please note that this gathers everything! (Model elements, Annotations, Styles etc) so may take a while to run on a larger project. Hope this helps
Hi everyone,
by the way, are there any node that we can collect all categories in linked model ?
or we have to code inside python script
@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
hello, I wish to get all categories of elements placed in a project without getting the elements list.
the package nodes that I see give a full list of built-in categories in the project but I just need to filter the exiting categories used in a project.
Thanks
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)
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
categories = doc.Settings.Categories
model_cat = []
anno_cat = []
ana_cat = []
internal_cat = []
for c in categories:
if c.CategoryType == CategoryType.Model:
if c.SubCategories.Size > 0 or c.CanAddSubcategory:
model_cat.append(Revit.Elements.Category.ById(c.Id.IntegerValue))
elif c.CategoryType == CategoryType.Annotation:
if c.SubCategories.Size > 0 or c.CanAddSubcategory:
anno_cat.append(Revit.Elements.Category.ById(c.Id.IntegerValue))
elif c.CategoryType == CategoryType.AnalyticalModel:
if c.SubCategories.Size > 0 or c.CanAddSubcategory:
ana_cat.append(Revit.Elements.Category.ById(c.Id.IntegerValue))
elif c.CategoryType == CategoryType.Internal:
if c.SubCategories.Size > 0 or c.CanAddSubcategory:
internal_cat.append(Revit.Elements.Category.ById(c.Id.IntegerValue))
OUT = model_cat, anno_cat, ana_cat, internal_cat
how to run that script from a list of Document Revit files instead of the Current document opened?7
Thanks
Read carefully
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
The most important part isnât actually how to take the data out, itâs having the data set up well in the first place. From here a simple set of Element.GetParameterValueByName nodes can do the hard work. Most of the time this is where people will fail - they expect Dynamo/Revit to do all the hard work for them in setting a system up.
My suggested approach is to have at a type level:
Without that itâs pretty pointless getting all the elements in the model. I suggest only specifying the categories you wish to undertake takeoff for, donât get all elements as many will be irrelevant such as Revit levels which can be seen in 3D.
All of this sounds like a lot of work, and it is. Time to roll the sleeves up!
There is a good example of this type of workflow here:
Hi everyone.
I have extracted all the quantities based on the project parameters I need in Excel by running the dynamo script category-wise. Now I want to filter the data within the categories at a first go and then I also want to make a summary by getting the for instance number of âglassâ doors and number of âwoodenâ doors within one excel sheet because one category of âdoorâ extracts all the doors in one Excel file.
Secondly, how can I filter the one category data and summarize it. For example, in specialty equipment I have got the waste bins and washing machines and I want to separate them out within the similar sheet and then summarize them within the same sheet. e.g., no. of bins, no. of machines, etc
As I mentioned earlier, I want to make a category-wise summary in one sheet plus I want to make the overall elements of the projectâs summary which look professionally aesthetic.
I thank you beforehand. If someone could help me out in this.
Good day.