×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

copy odb using python

copy odb using python

copy odb using python

(OP)
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

RE: copy odb using python

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.

RE: copy odb using python

(OP)
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?

RE: copy odb using python

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources