how to associate the elements number with the surface number

When exporting the .msh file,
is it possible to associate the elements number with the surface number?

This is explained in old questions like this:
https://discourse.gidsimulation.com/t/get-the-id-of-a-condition-defined-over-nodes/2684/2