Jump to content

 
Photo

Sample Code

- - - - -

  • Please log in to reply
4 replies to this topic

#1
rednas5

rednas5

    Newbie

  • New Member
  • Pip
  • 2 posts
  • No Country Selected

Hello, I just found this site and believe I'll be visiting here quite often now! Tons of information. I have a problem I'm trying to find sample code for. I built a GUI in ArcMap and am trying to find some code to use that will zoom to a particular section when you input the Section, Township and Range you're looking for. This should be pretty easy but I'm such a poor programmer that I'm having some trouble and thought maybe somebody has already done this. I search through tons of raster data to print off and fill survey crew's information books before they travel to various survey sights in Texas and Oklahoma and know this would save me time. Can anybody point me in the right direction? Thanks

#2
SteveR

SteveR

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 150 posts
  • Gender:Male
  • Location:Utah, USA
  • United States

I think this might be similar to what you're looking for:
http://www.esg.monta...l/trs-data.html

#3
dsl

dsl

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 225 posts
  • Gender:Male
  • Location:Denver
  • United States

Hello, I just found this site and believe I'll be visiting here quite often now! Tons of information. I have a problem I'm trying to find sample code for. I built a GUI in ArcMap and am trying to find some code to use that will zoom to a particular section when you input the Section, Township and Range you're looking for. This should be pretty easy but I'm such a poor programmer that I'm having some trouble and thought maybe somebody has already done this. I search through tons of raster data to print off and fill survey crew's information books before they travel to various survey sights in Texas and Oklahoma and know this would save me time. Can anybody point me in the right direction? Thanks


This easiest way to do this will to have a feature class (layer) of the T&R&Sections in ArcMap preloaded. You can query this layer in a multitude of ways. One would be to create a VBA form that allows for the input of Township Range (and optionally section), this would then use IQueryFilter to identify the features in the feature class that match the search criteria. Optionally you can create a UI tool that allows the user to click a point in the map and then use ISpatialFilter to perform an "intersection" with the T&R feature class to identify which sections intersect the point. Zooming to the feature is a matter setting the current extents to the envelope of the feature. If memory serves, you're after IActiveView.Extent. Check the ArcObjects page, or the user forums for examples.

Hope that Helps,
David

#4
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,299 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

Sounds like you got a good response here, but I would expect more traffic on the ESRI User-to-User forums, or on the ESRI EDN. Although I am not always that impressed with the responses on the ESRI forums - it feels like it is less of a community, and more of people just posting about their problems... (there used to be an ESRI ArcInfo mailing list that was really good, but I think it was focusing on what is now known as ArcInfo workstation)
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#5
rednas5

rednas5

    Newbie

  • New Member
  • Pip
  • 2 posts
  • No Country Selected

Hello, I just found this site and believe I'll be visiting here quite often now! Tons of information. I have a problem I'm trying to find sample code for. I built a GUI in ArcMap and am trying to find some code to use that will zoom to a particular section when you input the Section, Township and Range you're looking for. This should be pretty easy but I'm such a poor programmer that I'm having some trouble and thought maybe somebody has already done this. I search through tons of raster data to print off and fill survey crew's information books before they travel to various survey sights in Texas and Oklahoma and know this would save me time. Can anybody point me in the right direction? Thanks


This easiest way to do this will to have a feature class (layer) of the T&R&Sections in ArcMap preloaded. You can query this layer in a multitude of ways. One would be to create a VBA form that allows for the input of Township Range (and optionally section), this would then use IQueryFilter to identify the features in the feature class that match the search criteria. Optionally you can create a UI tool that allows the user to click a point in the map and then use ISpatialFilter to perform an "intersection" with the T&R feature class to identify which sections intersect the point. Zooming to the feature is a matter setting the current extents to the envelope of the feature. If memory serves, you're after IActiveView.Extent. Check the ArcObjects page, or the user forums for examples.

Hope that Helps,
David

Thanks David, that does help. Basically I have the feature class with the S,T,R in the attributes and I just want to be able to bring the UI up and input the S,T,R and have it zoom to the correct section. Searching for these can be time consuming. I'll try to work on this some and see where I get.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->