There are two ways to traverse upwards in a structure. 


The first is by calling host.GetCurrentNodePath(). The Host object is in the IswItemViewContent class in the SetHost() method. Using this, you can see the parts in the tree and find your way to the item of interest. This way is applicable when users will only be working within the currently shown structure tree.


The second way is by using parameters. An item that you select in a tree may be included in multiple structure trees. So, what you can do is to return a list of all of the structures that the item is a part of (in the form of a drop-down list). Then, the user can select which structure they are interested in.

Here is an example of calling the CurrentItem and returning a list of parameters (ParameterString is an internal class created for this example.):

        internal static List<ParameterString> FindParameterStrings(IswItem item)
            List<ParameterString> parameterStrings = new List<ParameterString>();
            if(item != null)
                var items = item.Broker.Q.GetItems(String.Format(
                            "<Filter>" +
                                "<And>" +
                                    "<ItemTypeEquals sid='{0}'/>" +
                                    "<ItemHasPartOfType sid='{1}'/>" +
                                "</And>" +
                            "</Filter>", Sids.Instance.Vehicle, Sids.Instance.VariantPart)
                for (int i = 0; i < items.Count; i++)
                    parameterStrings.Add(new ParameterString(items[i]));
            return paramaterStrings;