Trying to find the python code for XGen: Export patches for Batch render options in Maya. I couldn't find anything via Maya's Script Editor activity (also tried enabling echo all commands) but nothing shows up when I hit the button under Xgen window>File>Export Patches for Batch Render. 
Thanks!!
/your/maya_install_path/plug-ins/xgen/scripts/xgenm/ui/xgDescriptionEditor.py take a look at this file, they have a function called exportPatches line num around 1800+. You can see there they exporting alambic and xgmPatchInfo. Basically you can mimic same function in your script.
Python code for XGen: Export Patches for Batch Render