Display Manager elements represent the different layers in the map. Elements can be of the following types, all subclassed from DisplayManagement.Element:
- DisplayManagement.BaseElement
- DisplayManagement.LayerElement
- DisplayManagement.AttachedDwgsQueryElement
- DisplayManagement.TopologyElement
- DisplayManagement.TopologyQueryElement
- DisplayManagement.FeatureElement
- DisplayManagement.RasterElement
The following iterates through the elements in a map:
Dim iterator As IEnumerator = currentMap.NewIterator(True, True)
Dim elementType As Type = GetType(DisplayManagement.Element)
Dim groupType As Type = GetType(DisplayManagement.Group)
Do While (iterator.MoveNext())
Dim itemId As ObjectId = iterator.Current
Dim thisItem As Object = _
trans.GetObject(itemId, OpenMode.ForRead)
If (thisItem.GetType().Equals(elementType) Or _
thisItem.GetType().IsSubclassOf(elementType)) Then
Dim mapElement As Item = thisItem
' Process element (layer)
ElseIf (thisItem.GetType().Equals(groupType)) Then
Dim thisGroup As DisplayManagement.Group = thisItem
' Process group
Else
' Not a Display Manager object, probably contains FDO data
End If
Loop
The BaseElement layer represents the Map Base.
LayerElement objects display drawing objects from an AutoCAD layer.
AttachedDwgsQueryElement objects represent layers containing data queried in from attached drawings.
TopologyElement objects represent Display Manager layers that contain topology from the current drawing. TopologyQueryElement objects represent layers that contain topology queried from attached drawings.
FeatureElement objects represent layers that contain classified drawing objects.
RasterElement objects are not generally used. Instead, use FDO data with the Geospatial Platform API.