waterblue
路人甲
路人甲
  • 注册日期2004-09-02
  • 发帖数72
  • QQ
  • 铜币387枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1723回复:1

刷新效率的问题,清除上次的选择

楼主#
更多 发布于:2005-04-30 20:25
<P>自己做了选择工具,然后需要实现点击空白的地方实现清空上次选择结果的功能</P>
<P>采用</P>
<P>    ' Refresh the selections
    '实现点击空白的地方,去除选择结果
    
    Dim flag As Boolean
    flag = False
    
    Dim pFeaSelection As IFeatureSelection
    
    Dim oid As Integer
    
    For i = 0 To pMap.LayerCount - 1
        Set pFeatureLayer = pMap.Layer(i)
        Set pFeaSelection = pFeatureLayer '接口结果查询
        oid = pFeaSelection.SelectionSet.IDs.Next
        If oid > -1 Then
            flag = True
            Exit For
        End If
    Next i
    
    If flag Then
        pActiveView.PartialRefresh esriViewGeoSelection, Nothing, Nothing '局部刷新
    Else
  pFeaSelection.SelectionChanged
     pActiveView.refresh , Nothing, Nothing     ' 当选择是空的时候完全刷新
    End If
 <b>   功能是可以实现,但显示的结果会很慢,原因是采用refresh的方法,请问这种情况下采用什么方法做到很快能刷新</b></P>
<P>谢谢!</P>
喜欢0 评分0
http://www.geostar.com.cn(吉奥 公司) http://www.waterblue.com.cn(水之灵,蓝之静 个人)
waterblue
路人甲
路人甲
  • 注册日期2004-09-02
  • 发帖数72
  • QQ
  • 铜币387枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2005-04-30 20:45
<P>我已经找到了,在选择操作前刷新一次,选择操作后刷新一次即可</P><P>但我还是有疑问:</P><P><TABLE cellSpacing=4 cols=3 cellPadding=4><TR vAlign=top><TD class=t width="43%"><B>esriViewNone</B></TD><TD class=t align=left width="25%">0</TD><TD class=t align=left width="32%">Draws nothing.</TD></TR><TR vAlign=top><TD class=t width="43%"><B>esriViewBackground</B></TD><TD class=t align=left width="25%">1</TD><TD class=t align=left width="32%">Draws the background.</TD></TR><TR vAlign=top><TD class=t width="43%"><B>esriViewGeography</B></TD><TD class=t align=left width="25%">2</TD><TD class=t align=left width="32%">Draws the geography.</TD></TR><TR vAlign=top><TD class=t width="43%"><B>esriViewGeoSelection</B></TD><TD class=t align=left width="25%">4</TD><TD class=t align=left width="32%">Draws the selected geography.</TD></TR><TR vAlign=top><TD class=t width="43%"><B>esriViewGraphics</B></TD><TD class=t align=left width="25%">8</TD><TD class=t align=left width="32%">Draws the annotation.</TD></TR><TR vAlign=top><TD class=t width="43%"><B>esriViewGraphicSelection</B></TD><TD class=t align=left width="25%">16</TD><TD class=t align=left width="32%">Draws the selected annotation.</TD></TR><TR vAlign=top><TD class=t width="43%"><B>esriViewForeground</B></TD><TD class=t align=left width="25%">32</TD><TD class=t align=left width="32%">Draws the foreground.</TD></TR></TABLE></P><P>具体怎么样用?</P>
http://www.geostar.com.cn(吉奥 公司) http://www.waterblue.com.cn(水之灵,蓝之静 个人)
举报 回复(0) 喜欢(0)     评分
游客

返回顶部