Why You Need a Good Text Editor: Finding What Changed in Your Model

Categories:

There seems to come a time in everyone’s career, at least once, but usually for me, once a week, where I have made a change to something and didn’t even know it.  I copied a model, or made what I thought was a copy, but the results are coming out different.  So how do you tell what’s changed?

Well, you can spend time checking individual boundary conditions, part names, material properties, etc.  This can take a long time, especially with interactive programs that have a different menu or dialog box for each one.  This is where a good text editor can save you hours of work and years worth of frustration and stress.

So what can a good text editor do for you? In such a case it can compare two files and show you quickly exactly what is different.  For my money, GVIM gets my vote as the best text editor available. (Partly because it’s free and didn’t take any of my money. )

The “Split Diff with…” option in GVIM will show multiple files, side by side, and highlight differences between them.  Lines that are different are highlighted pink, with the actual difference highlighted in red. Lines that are present in one file, but not in the other, are highlighted purple, while blank lines are added to the other file to keep the similarities lined up.

image

So how do you use this feature to compare ANSYS, CFX, or Fluent, or any other models?  Most analysis programs have an export or archive feature that rights the model out in text format. In ANSYS, you can write out a text archive, CDB file, with the CDWRTE command.  In CFX, as in this example, you can export a CCL file.  In this example, GVIM quickly highlights what different between two CCL files.

In this case, the option on one of the boundary conditions was different.

imageimage

Another great thing about GVIM, is that it will also do the “Split Diff With…” on binary and Hex files, too. Now, you might not read hexadecimal, I don’t either, but at least you would know that the files differ somewhere.

image

There are a lot of good text editors out in the market these days. The key is to find one that you like, and learn it inside and out.  It can save you a lot of frustration and time in the long run.

Resources:

  • You can learn more about Vim and download a copy at: www.vim.org
  • Other text editors with text comparison capabilities:
    • Notepad++: Notepad on steroids, it has a nice difference utility
    • Emacs is the other editor that came out of Unix that people swear by, if they are not Vim users.
    • SlickEdit is not free, $299 for a single user license, but it is one of PADT’s favorite paid text editors.
  • A comprehensive list of text editors can be found on Wikipedia: http://en.wikipedia.org/wiki/Comparison_of_text_editors

Get Your Ansys Products & Support from the Engineers who Contribute to this Blog.

Technical Expertise to Enable your Additive Manufacturing Success.

Share this post:

Upcoming Events

Feb 04
- Feb 06
, 2025
MD&M West 2025
Feb 04
- Feb 06
, 2025
2025 Transformative Vertical Flight
Mar 20
, 2025
Arizona Space Summit 2025
Apr 07
- Apr 10
, 2025
40th Space Symposium
Jun 09
- Jun 11
, 2025
TechConnect World 2025
Jun 16
- Jun 20
, 2025
Turbo Expo
Jul 11
, 2025
2025 Aerospace, Aviation, Defense and Manufacturing Conference

Search the PADT Site

Contact Us

Most of our customers receive their support over the phone or via email. Customers who are close by can also set up a face-to-face appointment with one of our engineers.

For most locations, simply contact us: