4

In the layer properties and tab fields, I want to make all fields visible!

import arcpy
lyrXul = arcpy.mapping.Layer("Limits")
field_info = arcpy.Describe(lyrXul).fieldInfo
for i in range(0, field_info.count): field_info.setvisible(i, "VISIBLE")
arcpy.RefreshTOC()
arcpy.RefreshActiveView()

I want my script to do this

3
4

Try using the layer property field_info, then:

field_info = arcpy.Describe(lyrXUL).fieldInfo
for i in range(0, field_info.count):
    field_info.setVisible(i, "VISIBLE")
1
  • I edit my previous question because it ain't working for me. Thanx for your help! – Max Bridge Nov 16 '17 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.