how can i use python to ..upon opening a map,center (pan/zoom) to an event ( a point drawn by a X Y Coord. in a table kept in the map) and set the extent of that in data view to 1:10000?
You could try an application extension, which as I understand it will listen for events like opening an MXD and then execute some logic, which could include what you mentioned.
Creating a Python add-in application extension—Help | ArcGIS for Desktop
To zoom to your feature, select it using Select By Attribute and then use the zoomToSelectedFeatures method of the data frame object.
DataFrame—Help | ArcGIS for Desktop
Good luck.
Micah
If everything is already in the project at the desired location and scale... save it as a bookmark... then save the project.
When the project opens, everything will be as you left it.
However, I suspect that what you really want is a script that takes user input for some point coordinate, then zooms to that location and scale... that is a separate beast.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.