How to switch "context area type" via Pie command? Object/EditNodesUVImage
There are already shortcuts defined to switch areas.

UserPreferences -&gt; Input -&gt; Window


If you browse these shortcuts you will find Context Set Enum, which uses the generic wm.context_set_enum operator. The keys are SHIFTF1-F12

So you can copy the arguments:

op_props = pie.operator("wm.context_enum_set")
op_props.data_path = "area.type"
op_props.value = "VIEW_3D"


See Area.type for the available options

Further you might also try wm.context_pie_enum to automatically layout all enum items in a pie menu.

Just define a shortcut and type area.type in the data_path field.



Note

You can find a listing of all context attributes here