Select to view content in your preferred language

ArcScene Python Refresh Layer?

313
0
07-31-2018 03:52 PM
RyanCoodey
Frequent Contributor

Made a script in a toolbox that updates about 8 different layers definition queries to keep in sync. The intention of the tool is to run while in a session of ArcScene. Calling arcpy.RefreshActiveView() at the end does not refresh the layers though. Can manually click refresh on each layer and it does. What's the trick to refreshing a scene layer?

Example:

lyr = arcpy.mapping.Layer("Test Layer")
lyr.definitionQuery = NAME = '" + name + "'"

arcpy.RefreshActiveView() #Doesn't refresh layers

Thanks a lot!

0 Kudos
0 Replies