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.

PADT’s Pulse Newsletter

Keep up to date on what is going on at PADT by subscribing to our newsletter. Every month we share news about PADT, our partners, and our customers. We also share links to useful information on simulation, product development, and 3D Printing.  Sign up, and let's stay in touch.


By submitting this form, you are consenting to receive marketing emails from: . You can revoke your consent to receive emails at any time by using the SafeUnsubscribe® link, found at the bottom of every email. Emails are serviced by Constant Contact

Share this post:

Upcoming Events

10/15/2024

Sky's Not The Limit: The Power of SAF 3D Printing for Aerospace (re-ru

10/16/2024

Maxwell & Motor-CAD Updates in Ansys 2024 R2 - Webinar

10/16/2024

2024 Southern Arizona Tech + Business Expo

10/23/2024

PADT30 | Nerdtoberfest 2024

10/30/2024

Structural Update in Ansys 2024 R2 (2)

11/13/2024

Optics Updates in Ansys 2024 R2 - SPEOS, Zemax & Lumerical

11/13/2024

2024 Governor's Celebration of Innovation

11/27/2024

Fluent Updates in Ansys 2024 R2

12/11/2024

Structural Updates (3) in Ansys 2024 R2 - Materials, Contact & Joint

You Are Invited

PADT's Annual Open House
+
30th Anniversary Celebration
+
Arizona Manufacturing Pavilion

October 23, 2024
4:00 – 7:00
PADT’s Tempe Offices

Learn more and register at:
www.padtinc.com/nerdtoberfest

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: