Can tool dialog of model display banner image?

2304
5
Jump to solution
02-27-2013 02:50 PM
GraemeBrowning
Regular Contributor
I have a tool which is a model created using ModelBuilder at ArcGIS 10.0 SP5.

On its tool dialog I would like to display an image (logo) as a banner along the top.

I have seen this done on another custom tool (which is not a model) and am wondering how it was done, and if the same technique can be used for tools based on models (and/or Python script tools)?
0 Kudos
1 Solution

Accepted Solutions
curtvprice
MVP Esteemed Contributor
if the same technique can be used for tools based on models (and/or Python script tools)?


I don't know how it's done for custom tools, but for script and model tools you can alter the dialog by using a custom stylesheet - not very well documented, but you can start from Esri's which are in the install folder. The stylesheet may be specified on the script or model tool property's General tab.

View solution in original post

0 Kudos
5 Replies
curtvprice
MVP Esteemed Contributor
if the same technique can be used for tools based on models (and/or Python script tools)?


I don't know how it's done for custom tools, but for script and model tools you can alter the dialog by using a custom stylesheet - not very well documented, but you can start from Esri's which are in the install folder. The stylesheet may be specified on the script or model tool property's General tab.
0 Kudos
GraemeBrowning
Regular Contributor
Thanks Curtis

Your reply plus another thread were the pointers I needed to find and copy MdDlgContent.xsl from C:\Program Files\ArcGIS\Desktop10.0\ArcToolbox\Stylesheets to C:\temp as C:\temp\PolyGeo_Banner.xsl.

I then edited the *.xsl as below to reference a *.gif in the same folder before setting the *.xsl as the Stylesheet on the General tab of my tool Properties to get my image showing at bottom right of the tool dialog.

Changes made to the *.xsl were setting the image file like this:

<xsl:variable name="BackgroundImage">url(C:\temp\PolyGeo_Banner.gif)</xsl:variable>


and further down I uncommented out this line:

   background-image :    <xsl:value-of select="$BackgroundImage" />;
0 Kudos
janssencanicula
New Contributor
Thanks for this thread, I was able to put a background image on our tools.

I can't seem to make the image appear using a relative path. Is that possible?

Thanks.

JJ
0 Kudos
curtvprice
MVP Esteemed Contributor
I can't seem to make the image appear using a relative path.


Neither can I ... but you can drop the image into a folder in the Desktop install... using a variable (MdElementDialogInfo/CommonPath) that is set somewhere in the xsl framework they have set up. Would be nice if this were easier, as you need admin access to drop things in the install folders on most deployments.

Here's how I did it (in my copy of MdDlgContent.xsl, stored in a relative path to my toolbox with my python scripts):

<xsl:variable name="BackgroundImage">url(<xsl:value-of select="MdElementDialogInfo/CommonPath"/>/usgs.gif)</xsl:variable>


This finds my file here:

C:\ArcGIS\Desktop10.2\ArcToolbox\Common\usgs.gif


I got this all working at 10.0, they may have a better way now...
0 Kudos
FrankHanssen
New Contributor III

I have modified a MdDlgContent.xsl for a toolbox I have developed in ArcGIS 10.3. The toolbox GUI is supposed to be symbolised with the background image ( <Toolname>.gif) located in the Share\<Toolname>\Stylesheet\Pics folder. This works fine when I use the absolute path to the gif-file. But in order to make the gif appear independent of where the toolbox is installed by the user I would like to have a relative path to the background image. I am not familiar with stylesheets- could anyone help me?

0 Kudos