Sample Code
#1
Posted 25 November 2008 - 05:10 PM
#2
Posted 25 November 2008 - 06:48 PM
#3
Posted 25 November 2008 - 06:58 PM
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
Posted 26 November 2008 - 03:02 AM
#5
Posted 26 November 2008 - 11:00 AM
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.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
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users


Sign In
Create Account
No Country Selected
Back to top
United States
Sweden









