页面载入中....
Google


放大到一个图层的选择集合的方法(zz) 
zdq 发表于 2007-4-24 17:47:00

在ESRI网站偶得之,共享。应该是比较高效的一种办法。

    1. Dim pDoc As IMxDocument
      Set pDoc = ThisDocument
      Dim pMap As IMap
      Set pMap = pDoc.FocusMap

      Dim pLayer As IFeatureLayer
      Dim pFSel As IFeatureSelection
      Set pLayer = pMap.Layer(0)
      Set pFSel = pLayer

      'Get the selected features
      Dim pSelSet As ISelectionSet
      Set pSelSet = pFSel.SelectionSet

      Dim pEnumGeom As IEnumGeometry
      Dim pEnumGeomBind As IEnumGeometryBind

      Set pEnumGeom = New EnumFeatureGeometry
      Set pEnumGeomBind = pEnumGeom
      pEnumGeomBind.BindGeometrySource Nothing, pSelSet

      Dim pGeomFactory As IGeometryFactory
      Set pGeomFactory = New GeometryEnvironment

      Dim pGeom As IGeometry
      Set pGeom = pGeomFactory.CreateGeometryFromEnumerator(pEnumGeom)

      pDoc.ActiveView.Extent = pGeom.Envelope
      pDoc.ActiveView.Refresh

  • 阅读全文 | 回复(0) | 引用通告 | 编辑
    发表评论:
    页面载入中....

     

    页面载入中....

      公告
    页面载入中....

      我的分类(专题)
    页面载入中....
      日志搜索
        最近日志
    页面载入中....

      最新评论
    页面载入中....

      留言板
    页面载入中....

      链接

      Blog信息
    页面载入中....





    Powered by Oblog.