Revit API

Posts: 5
Registered: ‎11-11-2013
Message 1 of 2 (284 Views)
Accepted Solution

List all the families n types in a project.

284 Views, 1 Replies
01-22-2014 11:50 AM

I want to list out all the families and family types used in a specific project. i want specific parameters like dimensions and materials used of these families.


what commands can i use to retrieve data.


can i use 'Autodesk.Revit.UI.Selection.SelElementSet' for all the elements of a project?


Please help me.


i m new to revit API.

Thank u

Distinguished Contributor
Posts: 135
Registered: ‎12-07-2012
Message 2 of 2 (266 Views)

Re: List all the families n types in a project.

01-22-2014 11:28 PM in reply to: bhagya.108

What you can do is use the elementcollectionhelper



Document doc = commandData.Application.ActiveUIDocument.Document;

List<Element> elems = ElementCollectionHelper.GetAllProjectElements(doc).ToList(); //get alle elements

List<Element> elems = ElementCollectionHelper.GetAllProjectElements(doc).Where(c => c.GetType() == typeof(Material)).ToList() //only get the materials;



Then loop over the collection and search for parameters.


Kind regards,

Remy van den Bor
ICN Solutions b.v.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community

Revit Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Revit helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Revit