×
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

Retrieve command listing from .db

Retrieve command listing from .db

Retrieve command listing from .db

(OP)
Hi,
I've got some .db files and I wish to manually edit my problem. I was wondering if there's a way to retrieve the log info or command listing from a db file.

Thanks in advance

RE: Retrieve command listing from .db

Hi

If you open the db file in ansys, you will be able to write out a lgw file. In this file all commands are listed.
To get the command lines from the db file it self will be a difficult matter, I don't think this is possible.

Garry

RE: Retrieve command listing from .db

Even log file contains it
You can write out CDB file (an ascii command file)
CDWRITE

RE: Retrieve command listing from .db

If you build future models using input files (*.txt, or mac for convenience) this issue can be eliminated.  This is a best practice that will come highly recommended from experienced analsysts.

RE: Retrieve command listing from .db

Ansys is not by default a parametric based modeling program...infact it is one of the poorest tools one could ever use for modeling.  The answer to your question is no.  Unless you have the log file; or if the one you want has already been overwritten you're up a creek without a paddle.  You have two options:

a) Start over from scratch.
b) If you started w/ CAD geometry you could export any areas, lines, etc from your current database using IGESOUT and read these into the fresh CAD geometry in order to modify the database as needed.  

Hope this helps.

RE: Retrieve command listing from .db

(OP)
Thanks for all the replies.

I tried both the CDWRITE and the LGWRITE commands. Both produce a log file full of garbage. Running the log file did not reproduce geometry, mesh or loads, as available in the original db.

Starting from scratch.

RE: Retrieve command listing from .db

Wareva,
I dont know what it is you are trying to modify in your existing model....

You could generate an input file from the DB using

*cfopen,inputfile,inp
alls
nnn=ndnext(0)
*dowhile,nnn
   *vwrite,nnn,nx(nnn),ny(nnn),nx(nnn)
   ('n,',F5.5,',',F10.10,',',F10.10,',',F10.10)   
!check your fortran format
   nnn=ndnext(nnn)
*enddo

!(make similar loop for elements and nodal loads...)

*cfclose

RE: Retrieve command listing from .db

Needless to say that you will loose your solid model and parametric geometry if you do the above.

RE: Retrieve command listing from .db

Could you be more specific as to what 'garbage' is defined as?  Does CDWRITE function properly?  I've never had problems with it.

If you choose to take eelco71's approach and export everything to an input file I'd recommend using the *cfwrite command over *vwrite for this application.  It's much more user friendly :)

Good luck!

RE: Retrieve command listing from .db

(OP)
As i said, the CDWRITE and LGWRITE commands did produce a log file. Although filled with commands, running the file did not reproduce the original geometry, entirely built on the Ansys GUI. It drew some lines, and it output lots of errors.

RE: Retrieve command listing from .db

To my knowledge, the log file is session dependant, not file dependant. Therefore the cdwrite and lgwrite commands will simply produce RESUME,'file','db','directory',0,0
Of course not very usefull.

Selection in GUI by picking will produce KSEL,S, , ,P51X , also not very usefull.

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