Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy odb using python

Status
Not open for further replies.

warpino

Geotechnical
Joined
Jul 10, 2014
Messages
6
Location
IT
Hi all,

I would like to add some custom fieldOutputs to an odb and I wish to save the results using a different name for the odb, in order not to mess up the original odb. For how much I tried I cannot find a solution, it seems that I can only save an odb with using its original name/path . Does anybody know how to do that?

Thanks
 
Why don't you copy the file on OS-level? Use the os-module in Python to do that.
Then you can open one file and modify it.
 
Well, that's the most obvious solution, but it means that you have to write a (possibly huge) odb file twice: one for copying, one for saving. Any other suggestions?
 
If you want to have a backup of the original ODB, then I think you won't find a method that is faster than copying on OS-level.

If you want to have only your custom field in the ODB and not the original results, then you could run another datacheck with the original .inp and then add your field into this ODB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top