Loaded OSM file using CSharp binding (V3.2.0), read each of the IdfObject and added them to IdfObjectVector (myNewObjVec). Then added the myNewObjVec into another instance of OpenStudio.Model(osNewModel) and saved the new model to a file. See the pseudo code below:
osNewModel.addObjects(myNewObjVec,true);
OpenStudio.Path p = OpenStudio.OpenStudioUtilitiesCore.toPath(newfname);
osNewModel.save(p, true);
The new OSM file was created correctly but the OS:Version IdfObject is missing from the new OSM file. As an alternative I created OS:Version IdfObject on the fly and tried to add it but did not work.
What am I missing?