ArcGIS Pro ModelBuilder – Adding stylx-file

arcgis-desktoparcgis-promodelbuilderstyle

Is there a way to add a custom stylx-file, I created, to my ArcGIS Pro ModelBuilder process?

I would like to auto style the output layer of my process, after the process is done.

Best Answer

Not directly. The StyleX file is a container of styles. How a style is applied to a feature needs to be defined. You can do that by saving a Layer File (.lyrx) that has these mappings. For example, you set a Unique Value Render on a particular field using a symbol defined in the Style file. Once you have this setup, save the layer to the .lyrx and use this file to symbolize your output.

Now that you have a .lyrx, there are two ways to use it:

  1. Use the Apply Layer from Symbology tool. Make it the last tool run in your chain, setting it's output layer as a model parameter ('P')
  2. Within ModelBuilder, your final output has been set as a parameter ('P'). Save the model. From the Catalog window > Toolbox > your model > right click > Properties, find the parameter, scroll to the end and add the path to your layer file in the symbology column.
Related Question