About InwOpUserSelectionTreePlugin

By Xiaodong Liang

The last post introduces InwSelectionTreePlugin and InwOpUserSelectionTreePlugin. In this post, we will talk more about InwOpUserSelectionTreePlugin, in terms of some questions:

  • What is the functionality of InwOpUserSelectionTreePlugin?

    It is to provide a way  to build a custom tree based on the whole tree of Navisworks. That is something like a sub-tree of the whole tree, give the conditions (like Find). Each tree will correspond to one tab of Selection Tree. So the behavior of the node is still managed by Navisworks. SDK sample plugin_07  demonstrates how to implement InwOpUserSelectionTreePlugin. Note: this sample is available in the SDK before 2013. But it is not provided in 2013 SDK.

  •  

    image

     

  • How to register plugin_07
  • Because plugin_07 is an ActiveX EXE, you need to firstly register it by running ‘LwuserSelTreeEditor.exe’ or running the following prompt in DOS command.

          c:\plugin_07\LwuserSelTreeEditor.exe /regserver

    After register it by running ‘LwuserSelTreeEditor.exe’ or running the following prompt in DOS command, please add a key in register so that Nw can know to load it.

     

    image

     

  • why the program needs to traverse all the plugins before it begins to create the selection tree?

    It is to collect all plug-ins of userSelectionTree. Every such kind of plug-in corresponds to one tab in Selection Tree of GUI. e.g. as below, on my machine, there is only one user selection tree.

  • image

     

  • what does "InwOpUserSelectionTreeSpec" represent? and "InwOpUserSelectionTreeSpec" ?

      InwOpUserSelectionTreeSpec specifies what is to be displayed in the user selection tree. It could be understood as a result with some Find conditions. e.g. in the figure above, the tree just lists the items whose entity handle is 16C17. Plugin_07 is a tool for you to set up / manage the user selection tree. Please follow the introduction text on the right of the dialog for more details.

  •  

    image

     

  • can you give some explanation on RebuildTree()?

    This function iterates each user selection tree plug-in and their UserSelectionTreeSpec. Next it lists each plug-in as one node and UserSelectionTreeSpec as sub node. Then it lists all properties of the UserSelectionTreeSpec. You can change the properties (like changing find conditions) on rune time.

  •  

    image


    Comments

    One response to “About InwOpUserSelectionTreePlugin”

    1. I am wondering if it is possible to make the InwOpUserSelectionTreePlugin interactive with the current selection.
      In other word, is there any way to make the sub-tree generated by InwOpUserSelectionTreePlugin expand and highlight selected objects similar to main selection tree?

    Leave a Reply

    Discover more from Autodesk Developer Blog

    Subscribe now to keep reading and get access to the full archive.

    Continue reading