<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic vb.net arcobjects draw a transparent polygon, then perform a spatial query in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-draw-a-transparent-polygon-then/m-p/225281#M5873</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually I am struggle this issue for quick a few days. What I want to develop is to draw a transparent polygon on the map, after that perform a spatial query (get polylines on a layer intersect the polygon drawn). I follow the examples from ESRI and several experts from internet, but still cannot make it work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first step, draw a transparent polygon on map, I followed the bellowing "Draw Polygon Snippet" from ESRI website, but the strange thing is the start point of the polygon always at the top of the map:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Public Sub DrawPolygon(ByVal activeView As ESRI.ArcGIS.Carto.IActiveView)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If activeView Is Nothing Then&lt;/P&gt;&lt;P&gt;&amp;nbsp; Return&lt;/P&gt;&lt;P&gt;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim screenDisplay As ESRI.ArcGIS.Display.IScreenDisplay = activeView.ScreenDisplay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ' Constant&lt;/P&gt;&lt;P&gt;&amp;nbsp; screenDisplay.StartDrawing(screenDisplay.hDC, CShort(ESRI.ArcGIS.Display.esriScreenCache.esriNoScreenCache))&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim rgbColor As ESRI.ArcGIS.Display.IRgbColor = New ESRI.ArcGIS.Display.RgbColorClass&lt;/P&gt;&lt;P&gt;&amp;nbsp; rgbColor.Red = 255&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim color As ESRI.ArcGIS.Display.IColor = rgbColor ' Implicit Cast&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim simpleFillSymbol As ESRI.ArcGIS.Display.ISimpleFillSymbol = New ESRI.ArcGIS.Display.SimpleFillSymbolClass&lt;/P&gt;&lt;P&gt;&amp;nbsp; simpleFillSymbol.Color = color&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim symbol As ESRI.ArcGIS.Display.ISymbol = TryCast(simpleFillSymbol, ESRI.ArcGIS.Display.ISymbol) ' Dynamic Cast&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim rubberBand As ESRI.ArcGIS.Display.IRubberBand = New ESRI.ArcGIS.Display.RubberPolygonClass&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim geometry As ESRI.ArcGIS.Geometry.IGeometry = rubberBand.TrackNew(screenDisplay, symbol)&lt;/P&gt;&lt;P&gt;&amp;nbsp; screenDisplay.SetSymbol(symbol)&lt;/P&gt;&lt;P&gt;&amp;nbsp; screenDisplay.DrawPolygon(geometry)&lt;/P&gt;&lt;P&gt;&amp;nbsp; screenDisplay.FinishDrawing()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And how to select all the features (in a polyline layer) intersect the polygon? All the steps will be perform after clicking a button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody kindly give me advice? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Aug 2014 07:56:10 GMT</pubDate>
    <dc:creator>LiYao</dc:creator>
    <dc:date>2014-08-07T07:56:10Z</dc:date>
    <item>
      <title>vb.net arcobjects draw a transparent polygon, then perform a spatial query</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-draw-a-transparent-polygon-then/m-p/225281#M5873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually I am struggle this issue for quick a few days. What I want to develop is to draw a transparent polygon on the map, after that perform a spatial query (get polylines on a layer intersect the polygon drawn). I follow the examples from ESRI and several experts from internet, but still cannot make it work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first step, draw a transparent polygon on map, I followed the bellowing "Draw Polygon Snippet" from ESRI website, but the strange thing is the start point of the polygon always at the top of the map:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Public Sub DrawPolygon(ByVal activeView As ESRI.ArcGIS.Carto.IActiveView)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If activeView Is Nothing Then&lt;/P&gt;&lt;P&gt;&amp;nbsp; Return&lt;/P&gt;&lt;P&gt;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim screenDisplay As ESRI.ArcGIS.Display.IScreenDisplay = activeView.ScreenDisplay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ' Constant&lt;/P&gt;&lt;P&gt;&amp;nbsp; screenDisplay.StartDrawing(screenDisplay.hDC, CShort(ESRI.ArcGIS.Display.esriScreenCache.esriNoScreenCache))&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim rgbColor As ESRI.ArcGIS.Display.IRgbColor = New ESRI.ArcGIS.Display.RgbColorClass&lt;/P&gt;&lt;P&gt;&amp;nbsp; rgbColor.Red = 255&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim color As ESRI.ArcGIS.Display.IColor = rgbColor ' Implicit Cast&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim simpleFillSymbol As ESRI.ArcGIS.Display.ISimpleFillSymbol = New ESRI.ArcGIS.Display.SimpleFillSymbolClass&lt;/P&gt;&lt;P&gt;&amp;nbsp; simpleFillSymbol.Color = color&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim symbol As ESRI.ArcGIS.Display.ISymbol = TryCast(simpleFillSymbol, ESRI.ArcGIS.Display.ISymbol) ' Dynamic Cast&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim rubberBand As ESRI.ArcGIS.Display.IRubberBand = New ESRI.ArcGIS.Display.RubberPolygonClass&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim geometry As ESRI.ArcGIS.Geometry.IGeometry = rubberBand.TrackNew(screenDisplay, symbol)&lt;/P&gt;&lt;P&gt;&amp;nbsp; screenDisplay.SetSymbol(symbol)&lt;/P&gt;&lt;P&gt;&amp;nbsp; screenDisplay.DrawPolygon(geometry)&lt;/P&gt;&lt;P&gt;&amp;nbsp; screenDisplay.FinishDrawing()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And how to select all the features (in a polyline layer) intersect the polygon? All the steps will be perform after clicking a button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody kindly give me advice? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 07:56:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-arcobjects-draw-a-transparent-polygon-then/m-p/225281#M5873</guid>
      <dc:creator>LiYao</dc:creator>
      <dc:date>2014-08-07T07:56:10Z</dc:date>
    </item>
  </channel>
</rss>

