AnsweredAssumed Answered

ArcScene Python Refresh Layer?

Question asked by rcoodey on Jul 31, 2018

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!

Outcomes