Is there a way in Python 3.x to programmatically select a layout element, such as a scale bar? Thanks much, cob
they give an example of moving a scalebar in this tutorial
Create a map book with Python—ArcGIS Pro | ArcGIS Desktop
Thanks Dan, but it is actually never selected in that example, just repositioned. I can set the map frame as well, but there must be a programmatic way to select the element, so that when I open the properties page with a task step it pertains to the selected element?
Charles, you will need to sniff around in the arcpy section for other examples of **element things.
For example
MapsurroundElement—ArcPy | ArcGIS Desktop
but it requires you know the element name
Yes I know the name - I can set the map frame and do all sorts of things to the elements, but can't figure out how to select one. I also don't see how to add items to the Legend_Element but I think this is another bug issue. Thanks, cob
My read is that when 'select' an element of any kind by name or index number... it is selected/active/??? and you should be able to work with it. It may be that the mp module expects to be used to modify existing things, and your case of adding to the legend element would probably necessitate going back to the beginning with adding a layer and symbolizing it from scratch... I don't use it enough.. most of my mapping uses a template structure
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.