Announcement

Collapse
No announcement yet.

How to exclude relative difference on Beyond Compare 3 using script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to exclude relative difference on Beyond Compare 3 using script

    Hello,

    I am using Beyond Compare 3 (BC3) and was wondering if it's possible to set a relative difference when using data comparison.

    Say I have two files:

    1st file
    2.3
    30000.4
    500.6

    2nd file
    2.1
    30000.4000001
    500.6

    I am looking to ignore any difference with a relative difference of +/- 5% so that it only highlights 2.3 and 2.1. I understand that this is not a feature for BC3 but is it possible to add a script to set a relative difference.

    Thank you a lot in advance!

  • #2
    Hello,

    Script mirrors actions you can take or set in the interface, so there isn't a scripted solution that can perform something that the interface cannot, unless you are suggesting using another program to alter the data on the fly, so that it removes these kinds of differences from the file before BC3/4 sees the file comparison. Generally, you want to work with the interface first (which provides more feedback and iteration) and then tackle automating a solution once the comparison is working in the interface.

    It's not possible to set a relative difference in the Text Compare. You can define a text regular expression to ignore specific phrases (like "." to End of Line), but not a numeric value.

    If your files are formatted with one value per line, you could use the Data Compare. This is designed more for cell-based data (rows/columns), but if your files 'fit' into this, then you can define the column as numeric and give it a Numeric Tolerance in the Data Compare's Session menu -> Session Settings, Columns tab: edit specific column.

    Note: column 1 defaults to Key, which will need to be disabled to have a tolerance. In BC3, Numeric unimportance is absolute.

    You can also install the trial of BC4 if the data works in a Data Compare, as the BC4 Table Compare (a new name) expanded the Numeric Tolerance to be absolute or relative. BC4's trial can be installed at the same time as BC3 on Windows, so you can test it out before any purchase is necessary. If on another platform, you can back up your BC3 settings first, upgrade to BC4's Trial, then uninstall and re-install BC3 to roll back (if needed).

    Once it is working in the interface on your pair of files, if you need to automate we can then help with scripting (which, calls automated report generation from the command line, commonly using the default/global settings set up in the interface).
    Aaron P Scooter Software

    Comment

    Working...
    X