How to read custom properties from navisworks file.

How to read custom properties from navisworks file.

Anonymous
Not applicable
7,361 Views
41 Replies
Message 1 of 42

How to read custom properties from navisworks file.

Anonymous
Not applicable

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

7,362 Views
41 Replies
Replies (41)
Message 41 of 42

sampath.jeedigam
Enthusiast
Enthusiast

@xiaodong_liang Any update?

0 Likes
Message 42 of 42

sampath.jeedigam
Enthusiast
Enthusiast

Hi @xiaodong_liang 

 

May i know the status of 

NW-57053: API wish: expose LcOdpDBDatabaseReadLink with .NET Control API. Any plans in which version of Navisworks Simulate, autodesk is going to release this feature?

 

Regards

Sampath. 

0 Likes