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: 

How to add selection tree to my own appliction with .Net API?

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
wenchongyun2008
10977 Views, 6 Replies

How to add selection tree to my own appliction with .Net API?

Hi,

    I want to create selection tree in windows forms appliction using Navisworks 2012 .Net API.

    How would I approach this?

6 REPLIES 6
Message 2 of 7

hi,

 

Navisworks .NET API provides the hierarchy of model item. With Windows Form, you just need to traverse the hierarchy and build your own tree node one by one. Please refer to the DevTV  delivered in Chinese (I think you can read Chinese). It introduces the dockpane plugin, in which a Tree control demoed how the code traverses the model hierarchy. The workflow could be used with a .NET control based application.

http://download.autodesk.com/media/adn/SC_DevTV_Navisworks_net_plugin_1.zip

 

 

If you work with WPF, the Tree control of WPF can bind the hierarchy directly. This is a blog:

http://adndevblog.typepad.com/aec/2013/04/use-navisworks-api-with-wpf-binding-model-hierarchy-to-tre...

Message 3 of 7

good! Thank you very much!
Message 4 of 7
swarochisa
in reply to: xiaodong_liang

i am also trying to do something like this and i can't read Chinese. is it available in English?
Message 5 of 7
xiaodong_liang
in reply to: swarochisa

Hi,

you can get the demo project from the zip of that training DevTV. Although it is commented in Chinese, i think it would not be difficult for you to understand. IF you are frustrated, please post the questions in this forum.
Message 6 of 7
xeubskeex
in reply to: xiaodong_liang

Is it possible to apply this selection tree in a windows form app that uses the documentcontrol then selection tree in it or as a separate control?

Thanks

Message 7 of 7
xiaodong_liang
in reply to: xeubskeex

Hi,

you just need to (1)iterate the model items (e.g. store the model item to Node.Tag), or (2)create the node with the relevant conditions (e.g. create a node and store the ID of an object with the Node.Tag), and build your own tree in the tree control of Windows forms. When node is selected in (1), get the model item directly. while for (2), build a Search and find the corresponding model item by ID.

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report