Apply transformations does not work in automated process
Make sure that you actually need to apply transformations. If you are writing an exporter, multiplying the object.matrix_world by the vertex position gives you the transformed value without altering the original mesh.

In case you still need to do it, do what batFINGER suggested.