[ORD 10.10 C#] How to get getting custom item type assigned to Link (Drainage conduit).

im running into a problem im hoping someone could help clarify for me. 

im trying to get a custom item type that is attached to a placed Drainage Conduit pipe. This Link was placed using the Drainage and Utilities Place Conduit tool.

Here is some sample of my code.  

        BD.DgnModel m_activeModel = Bentley.MstnPlatformNET.Session.Instance.GetActiveDgnModel();
        using (ConsensusConnection conConn = new ConsensusConnection(m_activeModel))
        {
            if (conConn != null)
            {
                GeometricModel sdkGeomModel = conConn.GetActiveGeometricModel();
                if (sdkGeomModel != null)
                {
                    foreach (FeaturizedModelEntity curFD in sdkGeomModel.FeaturizedModelEntities)
                    {
                        if (curFD.DgnECInstance.ClassDefinition.Name == "Link")
                        {
                            if (curFD.Name == "D-1A")
                            {
                             //now see if item is attached 
                                BD.Elements.Element test = curFD.Element;
                                BD.CustomItemHost host = new BD.CustomItemHost(test, true);
                                IList<BD.DgnEC.IDgnECInstance> ItemTypes = host.CustomItems;
                                foreach (BD.DgnEC.IDgnECInstance curItemType in ItemTypes)
                                {//do stuff
                                }
                            }
                        }
                    }
                }
            }
        }

the problem is the custom item host is saying there are no custom items.

i did some more testing and it appears to be around the Drainage and Utilities Features. I tested changing the code to do the same thing but get an alignment Feature instead and was able to get the custom item type. So I'm trying to figure out what is different which these drainage and utility features and how to get the Items attached to them.

Parents Reply Children