|
POST
|
Paula just to help you get started see below. Use a blank arcmap with a layer and create a text element and use below to guide to get you through one. #Get a reference to the current map document
mxd = arcpy.mapping.MapDocument("Current")
#Get a reference to the first dataframe
df = arcpy.mapping.ListDataFrames(mxd)[0]
#Get a reference to the desired layer I'm using "Property Lines"
#but you may use whatever layer you want the name must be exactly like it is listed in your table of coontents
plyr = arcpy.mapping.ListLayers(mxd, "Property Lines", df)[0]
#Get a reference to a text element after you'created a text element you tight click and choose properties the choose the
#"Size and Position" tab on the right side fill in the "Element Name", in this example I used "pcount"
txtelm = arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "pcount")[0]
# now we can fill in the text element with the layers count and a defintiion query is honored in the count
txtelm.text = int(arcpy.GetCount_management(plyr).getOutput(0))
#And lastly refresh the view so we a can see our work
arcpy.RefreshActiveView()
... View more
09-04-2015
07:15 AM
|
1
|
0
|
2980
|
|
POST
|
Paula Cutrone you can do these things with python if your interested I just recently finished a project for our planning department that does similar.The mapping module will hold most of the elements you'll need Introduction to arcpy.mapping—Help | ArcGIS for Desktop
... View more
09-03-2015
07:22 AM
|
1
|
4
|
2980
|
|
POST
|
Chris Smith i went back and tested on the sample data provided and it appears to have gotten everything in the time frame.
... View more
09-01-2015
11:23 AM
|
0
|
2
|
2442
|
|
POST
|
Thanks for your response Jake. I was hoping for something more like code intellesense where i could create the above code and when i got to a known set of values i could just select them while typing in my code verses having to type or copy and paste them in every time.
... View more
09-01-2015
06:40 AM
|
0
|
0
|
852
|
|
POST
|
Is it possible to create a drop down in python code? You could in VBA, I don't remember what's terminology.example below. This code will size and position an element on the map layout. What i would like is for the element type to be a drop down list for the various types. def sizeposElm(elmName,elmType,elmWidth,elmHeight,elmX,elmY):
"""Element Name, Element Type, Element Width, Element Height, X Position, Y Position"""
elm = arcpy.mapping.ListLayoutElements(mxd, elmType, elmName)[0]
elm.elementWidth = elmWidth
elm.elementHeight = elmHeight
elm.elementPositionX = elmX
elm.elementPositionY = elmY
del elm
sizeposElm("legend","DATAFRAME_ELEMENT"
"GRAPHIC_ELEMENT"
"LEGEND_ELEMENT"
"MAPSURROUND_ELEMENT"
"PICTURE_ELEMENT"
"TEXT_ELEMENT"
... View more
09-01-2015
05:54 AM
|
0
|
2
|
3178
|
|
POST
|
If they are all in the same workspace fixing one by clicking the exclamation mark, will fix all. Typically this happens when you move or delete data.
... View more
08-27-2015
11:40 AM
|
0
|
0
|
2572
|
|
POST
|
If it's only the one layer, it's easiest to click the red exclamation point and navigate to where the data now lives to repair the broken link.
... View more
08-27-2015
11:30 AM
|
0
|
2
|
2572
|
|
POST
|
When create the fields preferably in catalog you can set the domain for that field if they are in the same geodatabase. If they are in different geodatabases use the domain to table tool to get the domain then the table to domain tool to put in the new\other geodatabase.
... View more
08-27-2015
11:27 AM
|
2
|
0
|
2285
|
|
POST
|
replaceDataSource (workspace_path, workspace_type, {dataset_name}, {validate}) Replaces a data source for a layer in a map document (.mxd) or layer (.lyr) file. It also provides the ability to switch workspace types (e.g., replaces a file geodatabase data source with an SDE data source). Layer—Help | ArcGIS for Desktop
... View more
08-27-2015
11:04 AM
|
0
|
6
|
2572
|
|
POST
|
Try using the source lyr.dataSource for your search cursor that should bypass the selection.
... View more
08-27-2015
05:46 AM
|
0
|
2
|
2302
|
|
POST
|
We're using the LGIM and for raw water it is in the the domain for Water Type
... View more
08-26-2015
12:13 PM
|
0
|
1
|
972
|
|
POST
|
I haven't tested but this should work ("StartDate" >= CURRENT_DATE AND "StartDate" <= CURRENT_DATE + 7) OR ("EndDate" >= CURRENT_DATE AND "EndDate" <= CURRENT_DATE +7) OR ("StartDate" <= CURRENT_DATE AND "EndDate" >= CURRENT_DATE +7)
... View more
08-25-2015
08:41 PM
|
1
|
4
|
5895
|
|
POST
|
I created some temporary field names you'll need to change to your format See if this query fits your needs ("StartDate" >= CURRENT_DATE AND "StartDate" <= CURRENT_DATE + 7) OR ("EndDate" >= CURRENT_DATE AND "EndDate" <= CURRENT_DATE +7)
... View more
08-25-2015
12:53 PM
|
1
|
6
|
2442
|
|
POST
|
See this blog on labeling with a related table. Creating Labels with Related Table Data Using this method you should be able to follow the dictionary with a list that you could sort and use the labels in the same way.
... View more
08-24-2015
01:41 PM
|
0
|
0
|
1151
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 09-14-2015 01:29 PM | |
| 1 | 01-26-2016 10:18 AM | |
| 1 | 08-18-2015 06:01 AM | |
| 1 | 06-20-2016 12:34 PM | |
| 1 | 01-19-2016 06:13 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|