Real-time geometry data export

Is it possible to export geometric data (specifically room dimensions, shape etc) in real time?
The same question applies to location and dimensions of objects and the player.

Has anyone had any experience with this?

I understand that data can be exported to a .txt file and can be done so per frame, then read by a separate program. However, for efficiency sake, I am looking for a direct stream to an external program (in this case Matlab).

I do not know all specifics of Matlab but you could make a upd / tcp connection on the pc from unity to Matlab.