Community
Navisworks API
Welcome to Autodesk’s Navisworks API Forums. Share your knowledge, ask questions, and explore popular Navisworks API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding custom props to Category

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
gennadyKhkh
407 Views, 4 Replies

Adding custom props to Category

Hello, forum,

found lack of information for Navisworks SDK COM portion, wonder if somebody already figure out the issue below.

One of CADWorx tab got property "Name" with internal name LcOaSceneBaseUserName.

I'm creating a user defined clone and need to add this prop. Odd thing: this prop is not part of Category collection (ie it is not in InwOaPropertyColl Properties()).

As a workaround by now i'm using "standard" approach:

 

InwOaProperty newProp = (InwOaProperty)cdoc.ObjectFactory(nwEObjectType.eObjectType_nwOaProperty,//nwEObjectType.eObjectType_nwOaNameAttribute,
null, null);
newProp.name = "Name";
newProp.value = categoryName;
category.Properties().Add(newProp);

 

Output looks like "regular" string prop Name (Name) instead of Name (LcOaSceneBaseUserName).

Attached screen shots along with project to perform "Add Category" plug-in for "CADWorx" tab.

 

"public enum nwEObjectType" got bunch of object to create in Navisworks. Is any doc or tutorial to handle most important ones?

 

Regards,

Gennady

4 REPLIES 4
Message 2 of 5

Hi @gennadyKhkh ,

 

Please take a look at this below code

 newProperty.name = "LcOaSceneBaseUserName";
 newProperty.UserName = "Name";
 newProperty.value = "Pipe";

Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 3 of 5

Hello, naveen.kumar,

Yes, it is working but why this prop is so special? What is a meaning for "Scene Base"? is it involved in spatial search queries?

 

So far I got following results from Navisworks API SDK COM-portion investigation:

1. all "default" Category tabs are locked for modifications, all are ReadOnly;

2. it is possible to create "default extended" Category version by copying original props and add custom defined ones.

3. props values in "default" Category tabs came from hardcoded OE reading for specific applications.

 

In regards to last item, what kind of interface can be created (if not exists yet) on OE side to publish user defined Categories properties? Similar to dwgInFields/dwgOutFields? 

 

Thank you,

Gennady

Message 4 of 5
gennadyKhkh
in reply to: gennadyKhkh

To finalize the question: creating DBX COM wrapper will bring props in both Acad Property Palette and in Navisworks Manage Property Tab automatically.

Message 5 of 5
gennadyKhkh
in reply to: gennadyKhkh

To finalize the question: creating DBX COM wrapper for OPM will bring props in both Acad Property Palette and in Navisworks Manage Property Tab automatically.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report