generic command dispatch function used for API commands
Derived from mel command maya.cmds.dispatchGenericCommand