Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Currently, I would select a bunch of polylines in a fgdb, using Selection > Selection by Location. I will then be using a "AOI" (Area of Interest) polygon to help me select the polylines in a fgdb that are within AOI (usually, i will choose "are completely within" option), and these selected polylines will appear on one of my mxds.

I would like to have a script that can help me do this: running the selection of polylines using AOI polygon as a reference. So, whenever i open up that mxd, i will be able to see the updated polylines on it. enter image description here

FYI, the feature class in fgdb will be updated monthly (names of fgdb and its dataset remain unchanged), and there might be a increase or decrease in the number of polylines every month (there are to be captured as long as there are within the AOI.

share|improve this question
    
All this you may do with Python and ArcPy, see help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//…? A lot of materials in this regard you'll find on this forum and ESRI website. –  Tomek Feb 10 '12 at 10:20
    
ArcPY is not available for ArcGIS 9.3.1. –  artwork21 Feb 10 '12 at 14:10
    
Do you want to script this in Python? –  Chad Cooper Feb 10 '12 at 15:27
    
@Chad, I do not mind python, if it works in 9.3.1 and you can show me a website on how to write a script for this. Ptython and GIS beginner here . –  gleeks Feb 14 '12 at 1:11
add comment

1 Answer

up vote 1 down vote accepted

You can try to make a VBA script for ArcMap 9.3.1

Take a look at this post on esri forum as an example:

http://forums.esri.com/Thread.asp?c=93&f=992&t=146845

share|improve this answer
    
thanks, Alex. But i do not know much abt VBA. can you advise which lines are the input for AOI and the selection elements (polylines)? and what do they mean by saying "Did you try using ISpatialIndex.AllowIndexing = true, then calling ISpatialIndex.Invalidate on the geometry bag before putting it into the spatialfilter?"? –  gleeks Feb 14 '12 at 1:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.