POST
|
I would like to create a set of unique values from a shapefile contained within an arcmap project. Most of the codes I see do this with feature classes and point to a geodatabase. I prefer not to point to anything outside of my current layers in the project window. How do I go about doing this? I would like to do the following: get unique values from a shapefile table save the unique values to an array (for use in a loop) print the unique values out to the screen For this example we'll call the shapefile in the map "location" and the field name "points"
... View more
06-07-2017
02:16 PM
|
0
|
4
|
3040
|
POST
|
"The other thing I changed significantly is I use definition queries to subset my layers now instead of selecting them and making a new layer each time." Do you have a sample of how you approached this? It sounds like a perfect solution for my project. As far as switching from a cursor approach to a dictionary approach - this is a good idea. For now though we only need to run 100 maps at a time so cursors might be a better alternative for our project. I will check into both solutions.
... View more
03-30-2017
04:54 PM
|
0
|
1
|
1176
|
POST
|
Hi thank you Ian - this is enough to get me started. If you think there is anything that would build on this then share when you have a chance. I really appreciate your code from the previous thread. Best, Bryan
... View more
03-29-2017
11:31 AM
|
0
|
3
|
1176
|
POST
|
Hi Ian - thank you for your response & suggestions regarding Search Cursor. It sounds very close to what we are aiming to achieve. Yes - please share some starting code if you don't mind doing so. You could post here or send an email to me at bmcpherson@landactive.com Best, Bryan
... View more
03-28-2017
12:04 PM
|
0
|
5
|
1176
|
POST
|
Hi Brent - thank you kindly for all the suggestions. I have taken a look and think that is plenty to get me started. I'm a little confused on question #4. For each PIN a map needs to be created that is zoomed to the full extent. This map has symbology, surround text and other items associated with it in the map (mxd). The project needs an mxd to be created for each PIN. Is there not a simple method to either save or export the mxd by the PIN name & then move on to the next record? Best Bryan
... View more
03-24-2017
11:51 AM
|
0
|
7
|
1176
|
POST
|
Hi - It's been 10 years since programming something .. in desperate need of assistance from this community. I have a project that seems like an easy assignment but I forget the names of objects, calls, procedures, functions, etc. However programming theory is still ingrained into my head through years of doing it. There are 4 questions related to a project. I'm not sure if ArcObjects or Python is the best way to approach it (advice here is also appreciated). Context & questions below. --- Context: The project invlolves selecting a COMMUNITY name with multiple features located on a map. The data is stored in 3 separate shapefiles (points, lines & polys). For each COMMUNITY there are multiple IDs - we'll call them PINs. I want to create a series of maps (mxds) for all the PINs associated with that COMMUNITY. Let's say the PIN is 8199. Since a PIN can be the form of a point, line & poly then all these features will be selected & zoomed to and appear on a map titled 8199 & saved to a directory. Then it moves onto the next PIN - 8200 and does the same thing. I am aiming to do the following: 1) Have a button in the arcgis window that opens a msgbox (or combobox on the toolbar). The pulldown box will ask the user to select a COMMUNITY name. This will then set a COMMUNITY name for each of the 3 shapefiles. Question # 1 -> How does one create a pulldown msgbox (or combobox on the toolbar) populated either from an existing feature table? There are duplicate values for each COMMUNITY - is there a way to filter this to show only one instance (unique values) of each for the pulldown? 2) Select all the features for each point, line & poly layer (PIN = 8199). Maybe it is selected through a recordset, or managed through a definition query .. I'm not sure - just looking for the easiest method. Question # 2 -> What function, command or procedure is needed to do this? 3) Once all features are selected (PIN - 8199) it zooms to the extent of all the features selected. Question # 3 -> What function, command or procedure is needed to zoom to all selected features? 4) Save the mxd based on 4 digit PIN selected into a directory. Question # 4 -> What function, command or procedure is needed to save the mxd? At this point it will move on to the next record in the recordset and do the same thing until the last record (maybe 50 or more in total maps). Ideally I would have a message box that states # of mxd's saved to the pathname (ex: "47 maps saved to c:\gis\communitymaps") --- I will be modifying this code and adding more bells & whistles as I go - but this is the start of it. Any help or support from this forum is greatly appreciated. Thank you. - Bryan
... View more
03-22-2017
03:25 PM
|
0
|
9
|
2398
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|