OK, how do I change just the active area to a different type. I got this and it does what I want ,but it changes every area that is image editor to 3d view. I’ve searched and searched ,but can’t get anything to work.
for area in bpy.context.screen.areas:
if area.type == 'IMAGE_EDITOR':
area.type = 'VIEW_3D'