阅读:1861回复:4
[求助]………………
<P>现在有一幅图形,在程序中(VB+AO)给一个过滤条件得到一部分记录,我想高亮显示得到的这部分记录或者是以不一样的颜色显示或渲染。各位给些建议或是接口方法,程序代码更受欢迎啊<IMG border=0 src="http://www.gissky.net/bbs/images/Emotions/6.gif"> </P>
<P>现在能做到的是这样子:</P> <P> </P> |
|
|
1楼#
发布于:2004-08-27 21:58
<P> Dim ipTopologicalOperator As ITopologicalOperator
Dim ipPolygon As IPolygon Dim ipGeometryCollection As IGeometryCollection ipGeometryCollection = New GeometryBag</P><P> Dim ipFeature As IFeature Dim ipPolyonFeature As IFeature</P><P> Do While Not ipFeature Is Nothing ipTopologicalOperator = ipFeature.Shape ipPolygon = ipTopologicalOperator.Buffer(1.5) ipGeometryCollection.AddGeometry(ipPolygon) ipFeature = ipFeatureCorsor.NextFeature Loop</P><P> Dim ipBufferPolygon As IPolygon ipBufferPolygon = New PolygonClass ipTopologicalOperator = ipBufferPolygon Dim ipEnumGeometry As IEnumGeometry ipEnumGeometry = ipGeometryCollection ipTopologicalOperator.ConstructUnion(ipEnumGeometry) Dim ipBufferEnvlop As IEnvelope ipBufferEnvlop = ipBufferPolygon.Envelope</P><P> AxMapControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, Nothing, ipBufferEnvlop.Envelope)</P><P>楼上的看一下为什么这段代码运行后看不见缓冲区</P><img src="images/post/smile/dvbbs/em02.gif" /><img src="images/post/smile/dvbbs/em02.gif" /><img src="images/post/smile/dvbbs/em02.gif" /> |
|
2楼#
发布于:2004-08-24 18:58
Private Sub UIButtonControl3_Click()
Dim pMxApp As IMxApplication Set pMxApp = Application Dim pMxDoc As IMxDocument Set pMxDoc = Application.Document Dim pLayer As ILayer Set pLayer = pMxDoc.SelectedLayer Dim pRGBColorA As IRgbColor Set pRGBColorA = New RgbColor pRGBColorA.Red = 255 Dim pFLayer As IFeatureLayer Set pFLayer = pLayer Dim pQFilter As IQueryFilter Set pQFilter = New QueryFilter pQFilter.WhereClause = "LEIXING = '水田'" '我的条件,可以根据自己需要定义 Dim pFeatSelection As IFeatureSelection Set pFeatSelection = pLayer pFeatSelection.SelectFeatures pQFilter, esriSelectionResultNew, False pFeatSelection.SelectionChanged Set pFeatSelection.SelectionColor = pRGBColorA pMxDoc.ActiveView.Refresh End Sub |
|
3楼#
发布于:2004-08-20 12:34
<P>用什么方法或接口??</P><P>请赐教啊!</P>
|
|
4楼#
发布于:2004-08-20 12:11
改变被选择到的数据集的颜色就ok了
|
|
|