How do I make the generated.3DM fit all versions

Why do I use openNurbs to generate.3dm files that can only run on Rhino7, but Rhino5 fails.How do I make the generated.3DM fit all versions

You have to specify the Rhino version you want to write for. If you want to retain data features that are for 7 you will have to write separately files for rhino 6, rhino 5 etc.

See

for how to specify, assuming you are using C++ here to write those files.