ArcObjects Library Reference  (Carto)    

esriCarto IBoundsProperties Example

[Visual Basic 6.0]

This sample function returns the geometry of an element. It uses IBoundsProperties to check if the element size is fixed in which case it will return its outline.

Public Function GetElementGeometry(pElement As IElement, _
pScreenDisplay As IScreenDisplay)
  Set GetElementGeometry = pElement.Geometry
  If TypeOf pElement Is IBoundsProperties Then
    Dim pBoundsProps As IBoundsProperties
    Set pBoundsProps = pElement
    If pBoundsProps.FixedSize Then
      Dim pPolygon As IPolygon
      Set pPolygon = New Polygon
      pElement.QueryOutline pScreenDisplay, pPolygon
      Set GetElementGeometry = pPolygon
    End If
  End If
End Function


[Visual Basic .NET, C#, C++]
No example is available for Visual Basic .NET, C#, or C++. To view a Visual Basic 6.0 example, click the Language Filter button Language Filter in the upper-left corner of the page.