Select to view content in your preferred language

Arcypy Custom Pop-ups

5502
10
Jump to solution
06-28-2017 08:54 AM
AntonAntonenko
Deactivated User

Is it possible to make custom pop-ups with Arcpy? or is there any access to a Pop-up object through Arcpy? we looking to be able to customize a pop-up graph for each specific point on the layer. I haven't found any sources regarding that issues online. This question is with regard to the ArcGIS Desktop version.  

1 Solution

Accepted Solutions
KoryKramer
Esri Community Moderator

In ArcGIS Pro, there is Python CIM access - this gives you the ability to do things like turn a layer's pop-ups on/off programmatically, as well as set up and control the pop-ups.  Here are a few pages from the CIM spec that may be relevant:

https://github.com/Esri/cim-spec/blob/master/docs/v2/CIMVectorLayers.md#CIMHtmlPopupFormat

https://github.com/Esri/cim-spec/blob/master/docs/v2/CIMVectorLayers.md#CIMPopupInfo

https://github.com/Esri/cim-spec/blob/master/docs/v2/CIMVectorLayers.md#CIMPopupLayout

 

View solution in original post

10 Replies
DanPatterson_Retired
MVP Emeritus

The Arcpy classes and functions list

not a mention of popups anywhere

0 Kudos
LeandraGordon
Frequent Contributor
0 Kudos
JoshuaBixby
MVP Esteemed Contributor

I can't summarize the situation any better than Building custom UI tools for ArcGIS with Python – Alex Tereshenkov .  After you have a chance to read over Alex's blog post, the GeoNet community might be able to help answer any specific questions.

0 Kudos
AntonAntonenko
Deactivated User

I read the article and looked into the specific links he posted. I don't believe that's the best solution, to develop a separate GUI using eternal libraries, I believe Alex mentions that this is not the best approach himself, in the article.

0 Kudos
RandyBurton
MVP Alum

I couldn't find any ArcPy solutions.  In the layer properties (on the HTML Popup tab), the option that I suggest you explore is "As a formatted page based on an XSL template".  You can click on the "Load" button and load the default xsl template code to examine.

Searching for "arcmap html popup xsl template" will lead to a couple of blog posts on the internet, including this Geonet topic: Custom XSL Formatting for HTML Popup in ArcMap.

Additional information, but no details on XSL templates:

Setting HTML pop-up properties for feature layers

Using HTML pop-up windows for feature layers

xsl‌ #xsl_template

AntonAntonenko
Deactivated User

Yes! I tried to find this option in properties, however I realize its for ArcMap and I'm using ArcGIS Pro. Supposedly ArcGIS Pro should include in it ArcMap, however I couldn't find any signs of existence of it. Could you please elaborate a bit more on that for me? How can these documentation exist if a standalone application of ArcMap doesn't exist anymore.

RandyBurton
MVP Alum

I must admit my experience with ArcGIS Pro is limited.  The pop-up feature is associated with the "Explore Tool". In the ArcGIS Pro Terminology Guide it states that the explore tool "contains functionality of" and is "similar to" the HTML Pop-Up tool.  This suggests that the tool's underlying code may be very different from the ArcMap Desktop implementation.  I could find not ArcGIS Pro ArcPy functions or classes that might interact with the pop-up. Perhaps there is a way with the https://community.esri.com/groups/arcgis-pro-sdk?sr=search&searchId=f1d108f6-584c-4720-a634-629f1f75...‌.

0 Kudos
LeandraGordon
Frequent Contributor
0 Kudos
KoryKramer
Esri Community Moderator

In ArcGIS Pro, there is Python CIM access - this gives you the ability to do things like turn a layer's pop-ups on/off programmatically, as well as set up and control the pop-ups.  Here are a few pages from the CIM spec that may be relevant:

https://github.com/Esri/cim-spec/blob/master/docs/v2/CIMVectorLayers.md#CIMHtmlPopupFormat

https://github.com/Esri/cim-spec/blob/master/docs/v2/CIMVectorLayers.md#CIMPopupInfo

https://github.com/Esri/cim-spec/blob/master/docs/v2/CIMVectorLayers.md#CIMPopupLayout