The current .NET API does not provide the related objects. But you can take advantage of COM API by COM interop. The chapter 10 of
private void addProperty()
{
ComApi.InwOpState10 state;
state = ComApiBridge.ComApiBridge.State;
// get current selection
ModelItemCollection modelItemCollectionIn =
new ModelItemCollection(
Autodesk.Navisworks.Api.Application.ActiveDocument.
CurrentSelection.SelectedItems);
// get the selection in COM
ComApi.InwOpSelection comSelectionOut =
ComApiBridge.ComApiBridge.ToInwOpSelection(modelItemCollectionIn);
// get paths within the selection
ComApi.InwSelectionPathsColl oPaths = comSelectionOut.Paths();
ComApi.InwOaPath3 oPath = (ComApi.InwOaPath3)oPaths.Last();
// get properties collection of the path
ComApi.InwGUIPropertyNode2 propn =
(ComApi.InwGUIPropertyNode2)state.GetGUIPropertyNode(oPath, true);
// create new property category
// (new tab in the properties dialog)
ComApi.InwOaPropertyVec newPvec =
(ComApi.InwOaPropertyVec)state.ObjectFactory(
ComApi.nwEObjectType.eObjectType_nwOaPropertyVec, null, null);
// create new property
ComApi.InwOaProperty newP =
(ComApi.InwOaProperty)state.ObjectFactory(
ComApi.nwEObjectType.eObjectType_nwOaProperty, null, null);
// set the name, username and value of the new property
newP.name = "demo_Property_Name";
newP.UserName = "demo_Property_UserName";
newP.value = "demo_Property_Value";
// add the new property to the new property category
newPvec.Properties().Add(newP);
// add the new property category to the path
propn.SetUserDefined(0, "demo_PropertyTab_Name",
"demo_PropertyTab_InteralName", newPvec);
}