How to read custom properties from navisworks file.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
User is adding additional properties (custom properties) using Navisworks Data Tools. When i am reading the properties from navisworks file using the API's, the API is returning all the properties under "Item", "Material", "Timeliner", "Entity Handle", "Autoplant Component", "Autocad" tabs. But this navisworks file has one more property node called "XYZ"(example, this is user defined name) and this property node has multiple properties user has entered. But the API is not reading these properties. So, the question is how to read Custom or user defined properties from navisworks file?
Here is the piece of code to read the properties i have in my project.
GetValue(oModelItem, null)).GetEnumerator();
while (ePropertyCatIterator.MoveNext())
{
object oPropCatIter = ePropertyCatIterator.Current;
string sCategory = Convert.ToString(oPropCatIter.GetType().GetProperty("DisplayName").GetValue(oPropCatIter, null));
IEnumerator<Object> ePropertyIterator = ((IEnumerable<Object>)oPropCatIter.GetType().GetProperty("Properties").
GetValue(oPropCatIter, null)).GetEnumerator();
while (ePropertyIterator.MoveNext())
{
object oPropIter = ePropertyIterator.Current;
string sValue = Convert.ToString(oPropIter.GetType().GetProperty("Value").GetValue(oPropIter, null));
string sName = Convert.ToString(oPropIter.GetType().GetProperty("DisplayName").GetValue(oPropIter, null));
}
}
Regards
Sampath