Symbolize one of the multiple fields added to the output feature

2233
5
04-22-2014 01:02 PM
HuiLuan
New Contributor
Hi,

I am developing a customized python script tool in arcgis desktop. An output feature class is created after running the tool. More than one field are added to this output. However, I want to automatically symbolize one of the multiple fields added (e.g., the first one) when the feature class is added to arcgis.

A similar example in the spatial statistics tool "Hot Spot Analysis". After running the tool, two fields are added: "GiZScore" and "GiPValue", but "GiZScore" is the one automatically symbolized.

Can anyone tell me how this is implemented? Thanks in advance.
Tags (2)
0 Kudos
5 Replies
DouglasSands
Occasional Contributor II
With Python, the only way to do this is to create a layer file in advance and then have your output reference that file.

http://forums.arcgis.com/threads/44502-Managing-Symbology-using-Python
0 Kudos
HuiLuan
New Contributor
With Python, the only way to do this is to create a layer file in advance and then have your output reference that file.

http://forums.arcgis.com/threads/44502-Managing-Symbology-using-Python


Thank you, Douglas! But the question remains. I am still not sure how to symbolize a specific field (one of the multiple newly added fields in the output feature class). I noticed that the default layer file for "Hot spot analysis" is a layer with the field name "GiZScore", which is the field being symbolized.

[ATTACH=CONFIG]33270[/ATTACH]

I was wondering if I need to create a layer file with the specific field name I need to symbolize.

Thank you!
0 Kudos
RobertBorchert
Frequent Contributor III
IF you create subtypes for your new feature class and the subtypes have the name of an existing symbol it should automatically symbolize it based on that subtype name.  Or you can create a custom symbol and give it the name.  However, then you would need to save that custom symbol everywhere else.

Hi,

I am developing a customized python script tool in arcgis desktop. An output feature class is created after running the tool. More than one field are added to this output. However, I want to automatically symbolize one of the multiple fields added (e.g., the first one) when the feature class is added to arcgis.

A similar example in the spatial statistics tool "Hot Spot Analysis". After running the tool, two fields are added: "GiZScore" and "GiPValue", but "GiZScore" is the one automatically symbolized.

Can anyone tell me how this is implemented? Thanks in advance.
0 Kudos
AdamCox1
Occasional Contributor II
I think your best bet is to just right-click the layer in the table of contents that you showed in the attachment, and then save it to a .lyr file.  Then you can reference that .lyr file to symbolize any subsequent products of the tool.  Try using the ApplySymbologyFromLayer tool, etc.  Should work on any feature class/shp that has a GiZScore field that is the right type (float or whatever).
0 Kudos
HuiLuan
New Contributor
IF you create subtypes for your new feature class and the subtypes have the name of an existing symbol it should automatically symbolize it based on that subtype name.  Or you can create a custom symbol and give it the name.  However, then you would need to save that custom symbol everywhere else.


Thanks, Robert. This works!
0 Kudos