Well, I figure out the export selected object issue. You need to pass the ‘World’ as your ‘object’. Here is the updated code to help others that may have had the same issue.
# Select your objects in the level
import unreal
def export_selected_fbx(file_path='C:\ est'):
world = unreal.EditorLevelLibrary.get_editor_world()
task = unreal.AssetExportTask()
task.set_editor_property('selected', True)
task.set_editor_property('filename', file_path)
task.set_editor_property('automated', True)
task.set_editor_property('object', world)
fbx_options = unreal.FbxExportOption()
fbx_options.set_editor_property('collision', False)
fbx_options.set_editor_property('force_front_x_axis', False)
fbx_options.set_editor_property('level_of_detail', False)
task.set_editor_property('options', fbx_options)
result = unreal.Exporter.run_asset_export_task(task)
print 'Export Result: {}'.format(result)