Hi @preeti.kumari9TBN6 ,
I created a simple Furniture elements in Revit.
I placed one furnitue in Level 0 and another one in Level 1 and exported the file to nwc.
I can see the level property category.From the property category, I can get the Elevation data property. Please see the attached images.
My Suggestion to you is
1)Get an element with category "Level" via search API
2)From "Level" property category, access the "elevation" data property and get it's value.
I think search API will help you to achieve what you want.
Here is the sample code
private void SimpleCode(Document doc)
{
string itemAndElevation = "";
Search search = new Search();
search.SearchConditions.Add(SearchCondition.HasCategoryByDisplayName("Level"));
search.Selection.SelectAll();
ModelItemCollection collection = search.FindAll(doc, true);
foreach(ModelItem item in collection)
{
DataProperty dataProperty=item.PropertyCategories.FindPropertyByDisplayName("Level", "Elevation");
string elevationValue = dataProperty.Value.ToString();
itemAndElevation = itemAndElevation + "\n" + item.DisplayName + " -- " + elevationValue;
}
MessageBox.Show(itemAndElevation);
}
You can then access the "elevationValue" and create your bounding box.
Naveen Kumar T
Developer Technical Services
Autodesk Developer Network