No it is not necessary to be txt.
I do not know anything about binary files, if you could show me a sample it would good to learn.
I do undestand how to do this with meshes and C# as I can write to file vertex coordinates and mesh faces but when it comes to breps it is more complex for me.