
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I would greatly appreciate if someone could send me some information about Revit API 2011 ceiling thickness data collection.
I would like to share part of C# code how do I get information about wall layers thickness:
CompoundStructure comStruct = aWallType.CompoundStructure;
Categories allCategories = doc.Settings.Categories;
Category wallCategory = allCategories.get_Item(BuiltInCategory.OST_Walls);
Autodesk.Revit.DB.Material wallMaterial = wallCategory.Material;
foreach (CompoundStructureLayer structLayer in comStruct.Layers)
{
double thickness = structLayer.Thickness; // INFORMATION ABOUT WALL LAYER THICKNESS
Autodesk.Revit.DB.Material layerMaterial = structLayer.Material;
if (null == layerMaterial)
{
layerMaterial = wallMaterial;
}
}
This part of code work perfectly for walls but it is impossible to use it in case of ceilings. I found some information about getting celing layer thickness in "Revit 2011 API Developer’s Guide" and it is as follows:
"11.5.2 Ceiling
Ceiling does not have a specific class, so you can‘t create it using the API. The Ceiling object is an Element in the OST_Ceilings category.
The Ceiling element type is HostObjAttributes using the OST_Ceilings category with its CompoundStructure available." [Revit 2011 API Developer’s Guide, page 124]
but I do not know how to impement it.
Solved! Go to Solution.