Does Bentley Map allow creating sub feature (not primary feature) which is a collection feature? I see, taht it is not possible in Geospatial Administrator. When I create XLM myself (in notepad i.e.), then Map seems to work fine until I try to create (in VBA) a component of such a collection sub feature. At that moment I get an error in ApplyAttributeChanges function (VBA) of primary feature after creating any component of such a collection sub feature.
Component path just before error is as follows: myMainFeature/mySubFeature_Collection/mySubFeature (GetPathFromRoot function).
Here is example VBA code fragment I expected to work:
‘ myMainFeature is already created, mySubFeature is a collection-polygon sub feature, myGeometry is a shape elementPrivate Sub Add_mySubFeature(myGeometry As ShapeElement) Dim mySubFeature_Collection As New xft.Feature mySubFeature_Collection.Name = "mySubFeature_Collection" mySubFeature_Collection.SetParentFeature myMainFeature mySubFeature_Collection.AddSelfToParent Dim mySubFeature As New xft.Feature mySubFeature.Name = mySubFeature.GetFeatureDefinition.CollectionName mySubFeature.SetParentFeature mySubFeature_Collection mySubFeature.AddSelfToParent mySubFeature.Geometry = myGeometry myMainFeature.ApplyAttributeChanges '(here error raises) myMainFeature.Write False myMainFeature.Display msdDrawingModeNormalEnd Sub
Robert,
Use of collections in sub-features is not currently supported.
Regards,
Jeff Bielefeld [Bentley]