Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use BuiltInCategory.OST_Wall ?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
2114 Views, 2 Replies

How to use BuiltInCategory.OST_Wall ?

Hello,

I have four structural walls in my project but given code showing zero. Where am I making mistake? However if I replace OST_Walls with OST_StructuralColumns, it works perfectly.  Also from where can I get description of all members of BuiltInCategory enum? Revit Api docs just provide members without details.

public void Trial1()
		{
			Document doc = this.ActiveUIDocument.Document;
			string info = String.Empty;
			int a=0;
			foreach (Element e in new FilteredElementCollector(doc)
.OfClass(typeof(FamilyInstance))
.OfCategory(BuiltInCategory.OST_Walls)) { a++; } TaskDialog.Show("Count",a.ToString()); }
2 REPLIES 2
Message 2 of 3
MarryTookMyCoffe
in reply to: Anonymous

If you look for walls you write ofclass(Wall) not a familyInstance.

Try this, install revit look up and see there what object is which class.

-------------------------------------------------------------
--------------------------------|\/\/|------------------------
do not worry it only gonna take Autodesk 5 years to fix bug
Message 3 of 3
jeremytammik
in reply to: Anonymous

Thanks to MarryTookMyCoffe for the helpful answer. This is the link to download and install RevitLookup:

 

https://github.com/jeremytammik/RevitLookup



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Customer Advisory Groups


Rail Community