Python Toolbox Hover Information

961
5
Jump to solution
04-22-2022 05:28 AM
TylerTownes
New Contributor III

Hello,

I'm writing a Python Toolbox and would like to populate the hover pop-up with some information as shown for example in this image.

TylerTownes_0-1650630385368.png

I'm struggling to find documentation on the code for this.  Any pointers would be appreciated.

Thank you,

Tyler

 

Tags (4)
0 Kudos
1 Solution

Accepted Solutions
TrevisMartin
New Contributor III

It looks like the Metadata in Arc is a custom XML format.  It might be in the project's temp file in the user APPDATA/Local at least that's where the HTML that gets generated and shows when you view metadata lives. I don't know if those temp folders are generated by project.

The Resources/Metadata/Stylesheets folder in Program Files/ArcGIS/Pro seems to hold the templates for generating these.

Arcpy can access metadata according to  https://pro.arcgis.com/en/pro-app/2.8/arcpy/metadata/metadata-class.htm

View solution in original post

5 Replies
TrevisMartin
New Contributor III

That info is maintained in the Metadata of the tool.   Right click on the script tool and choose "Edit Metadata."

TrevisMartin_0-1650632649578.png

 

tchaulla
New Contributor II

Thank you!

0 Kudos
TylerTownes
New Contributor III

@TrevisMartin et al, Thanks for the reply.  I was under the impression that a .pyt was self contained written entirely in Python.  So now you've got me scratching my head.   Where is the meta data stored and how can I access it programmatically?  Thx.  Tyler

0 Kudos
TrevisMartin
New Contributor III

It looks like the Metadata in Arc is a custom XML format.  It might be in the project's temp file in the user APPDATA/Local at least that's where the HTML that gets generated and shows when you view metadata lives. I don't know if those temp folders are generated by project.

The Resources/Metadata/Stylesheets folder in Program Files/ArcGIS/Pro seems to hold the templates for generating these.

Arcpy can access metadata according to  https://pro.arcgis.com/en/pro-app/2.8/arcpy/metadata/metadata-class.htm

TylerTownes
New Contributor III

@TrevisMartin

Ok, yeah, after opening the metadata the xml's were created and now I see what's going on.  So, if I want to share a python toolbox I'll need to share the xml's as well or wrap it up in a gdkx.  For some reason I had recalled that it was all captured in the pyt, alas not.

Thank you,

Tyler

0 Kudos