Is there a working solution `somewhere in python?
Solved! Go to Solution.
Not that would be really useful...I just normally select what I need via a query for instance, get into edit mode, use the show selected records only option within the table, edit a cell, click on the next one, edit it etc etd. I don't have much use for auto-auto-automation. For example your workflows suggests you query for records then want to click a button, to go to the next selected record, then click in that cell, edit it click on the button again etc etc. that you would be adding a step to my suggested one.
Better if you have a query that you can use to do the selection for the "bad" ones (or "good") or via manual selection... why not do it...launch the field calculator and type in the 1 or zero..then switch the selection and use the field calculator to do the opposite case.
Ignore this totally if you needs are significantly different
yes the arcpy.mapping module, specifically in the dataframe section. Have a good read through that whole helpfile section, it is quite good
Thanks Dan,
it's really good, but what i need is a button to loop through attributes, manually edit something (like insert in attribute table a 1 for error and 0 for no error) and loop to the next?
Is this possible?
This is what I have so far, but how to stop the loop after each for statement and restart in python the place I left the loop?
import arcpy
import os
import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "")[0]
SelLayer = arcpy.mapping.ListLayers(mxd, "Aenderung_MToS_6417341", df)[0]
for row in arcpy.SearchCursor(SelLayer):
df.extent = row.SHAPE.extent #Set the dataframe extent to the extent of the feature
df.scale = df.scale * 1.07 #Optionally give the shape a bit of padding around the edges
arcpy.RefreshActiveView()
#Put in your export here
Or is it possible to connect the restart of the loop to the save edits button in the editor menu?
Not that would be really useful...I just normally select what I need via a query for instance, get into edit mode, use the show selected records only option within the table, edit a cell, click on the next one, edit it etc etd. I don't have much use for auto-auto-automation. For example your workflows suggests you query for records then want to click a button, to go to the next selected record, then click in that cell, edit it click on the button again etc etc. that you would be adding a step to my suggested one.
Better if you have a query that you can use to do the selection for the "bad" ones (or "good") or via manual selection... why not do it...launch the field calculator and type in the 1 or zero..then switch the selection and use the field calculator to do the opposite case.
Ignore this totally if you needs are significantly different
Your right, get a bit lost in "auto-auto-automotation". I like this word