I’m am currently working with a project where a need to make a list of all elements in the project, with there name and classification code,
At this point I know how to do that with one category, but I would like to know if any of you knew a way , so I can select all the categories in the project.
import clr
# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
doc = DocumentManager.Instance.CurrentDBDocument
OUT = [i.Name for i in doc.Settings.Categories]
This will also get you all annations families though. If you want to use this for take-off then you’re better of creating seperate category nodes and combining those into a single list like so:
project is that i need all the elements used in the project, an make a control, if this elements have a certain parameter ore not, and after that see what there is written in that parameter
I know it might be frustrating to run into people that know very little coding, but at the same time where do they learn the basics if not here. I would say that its quite to the contrary: This is the forum to learn some Python basics. Of course there are others like Stack Overflow or simply picking up an online course and/or a book. Everyone learns in a different way. It’s all good mate.