<?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 custom Arcreader and zooming to selected features in ArcReader Questions</title>
    <link>https://community.esri.com/t5/arcreader-questions/custom-arcreader-and-zooming-to-selected-features/m-p/39165#M47</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am building a custom ArcReader app that has a few buttons in a toolstrip across the top of the axArcReaderControl map&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in a Windows form.&amp;nbsp; One of the buttons is used to launch a second windows form that contains 3 comboboxes; one for&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;county, one for community, and one for street name.&amp;nbsp; The 2nd form also has OK and Cancel buttons.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The OK button is supposed to query a layer meeting the criteria in the 3 drop-down boxes and it does correctly return&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the correct number of selected features.&amp;nbsp; However when I try to zoom to or highlight the selected features nothing happens.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Below is the code I have in the click event of the OK button on the 2nd form.&amp;nbsp; Its as if the 2nd form knows enough about&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the first to do the query and get results, but not enough to zoom and highlight.&amp;nbsp; Any thoughts on how to get zoom and highlight&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;working from the 2nd form?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope someone can help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Carl&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Form1 frmMain = new Form1();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ARFeatureSet pFSelSet;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Build the ARSearchDef&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcReaderSearchDef arSearchDef = new ArcReaderSearchDef();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Build WhereClause that meets search criteria&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;string sWhereClause;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sWhereClause = "COUNTY = '" + cmbCounty.Text + "' AND COMM_NM = '" + cmbCommunity.Text + "' AND STREET_NM = '" + cmbStreetName.Text + "'";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arSearchDef.WhereClause = sWhereClause;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pFSelSet = frmMain.axArcReaderControl1.ARPageLayout.FocusARMap.get_ARLayer(0).QueryARFeatures(arSearchDef);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//MessageBox.Show(pFSelSet.ARFeatureCount.ToString());&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pFSelSet.ZoomTo();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pFSelSet.Highlight(true,3);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//&amp;nbsp; I've tried this too, but it doesn't work either&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//frmMain.axArcReaderControl1.ARPageLayout.FocusARMap.get_ARLayer(0).QueryARFeatures(arSearchDef).ZoomTo();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//frmMain.axArcReaderControl1.ARPageLayout.FocusARMap.get_ARLayer(0).QueryARFeatures(arSearchDef).Highlight(true, 3);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Feb 2013 14:32:44 GMT</pubDate>
    <dc:creator>CarlBrydon</dc:creator>
    <dc:date>2013-02-21T14:32:44Z</dc:date>
    <item>
      <title>custom Arcreader and zooming to selected features</title>
      <link>https://community.esri.com/t5/arcreader-questions/custom-arcreader-and-zooming-to-selected-features/m-p/39165#M47</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am building a custom ArcReader app that has a few buttons in a toolstrip across the top of the axArcReaderControl map&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in a Windows form.&amp;nbsp; One of the buttons is used to launch a second windows form that contains 3 comboboxes; one for&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;county, one for community, and one for street name.&amp;nbsp; The 2nd form also has OK and Cancel buttons.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The OK button is supposed to query a layer meeting the criteria in the 3 drop-down boxes and it does correctly return&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the correct number of selected features.&amp;nbsp; However when I try to zoom to or highlight the selected features nothing happens.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Below is the code I have in the click event of the OK button on the 2nd form.&amp;nbsp; Its as if the 2nd form knows enough about&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the first to do the query and get results, but not enough to zoom and highlight.&amp;nbsp; Any thoughts on how to get zoom and highlight&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;working from the 2nd form?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope someone can help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Carl&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Form1 frmMain = new Form1();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ARFeatureSet pFSelSet;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Build the ARSearchDef&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcReaderSearchDef arSearchDef = new ArcReaderSearchDef();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//Build WhereClause that meets search criteria&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;string sWhereClause;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sWhereClause = "COUNTY = '" + cmbCounty.Text + "' AND COMM_NM = '" + cmbCommunity.Text + "' AND STREET_NM = '" + cmbStreetName.Text + "'";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arSearchDef.WhereClause = sWhereClause;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pFSelSet = frmMain.axArcReaderControl1.ARPageLayout.FocusARMap.get_ARLayer(0).QueryARFeatures(arSearchDef);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//MessageBox.Show(pFSelSet.ARFeatureCount.ToString());&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pFSelSet.ZoomTo();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pFSelSet.Highlight(true,3);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//&amp;nbsp; I've tried this too, but it doesn't work either&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//frmMain.axArcReaderControl1.ARPageLayout.FocusARMap.get_ARLayer(0).QueryARFeatures(arSearchDef).ZoomTo();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;//frmMain.axArcReaderControl1.ARPageLayout.FocusARMap.get_ARLayer(0).QueryARFeatures(arSearchDef).Highlight(true, 3);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 14:32:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcreader-questions/custom-arcreader-and-zooming-to-selected-features/m-p/39165#M47</guid>
      <dc:creator>CarlBrydon</dc:creator>
      <dc:date>2013-02-21T14:32:44Z</dc:date>
    </item>
  </channel>
</rss>

