Conversion Rules for INCA-VN-Converter
The conversion rules are stored in the following folder of your respective INCA version:
..\ETASData\INCAV7.6\ConvertRuleSet\..
The rules must be saved in files with the extension CRS.
File Format
The format of the CRS files is very similar to INI files.
The CRS file consists of a [GENERAL] section, which represents organizational data, and several additional sections, which represent a conversion rule. The conversion rule section can be inserted individually. In the following example, there is the organizational data section [GENERAL] and the conversional rule section [OLD2NEW].
[GENERAL]
;The name of the conversion rule set as it will appear in the menu
name=new2old
;The postfix for the converted files
postfix=new2old
;The user ID
user=tester1
;The date of the last changes
date=05.10.2023
;The version of the Rule-Catalogue
version=1.0
;1. old2new
;exchange suffix _old by suffix _new
[OLD2NEW]
EXP_REGEX=(.*)[_][o][l][d]
A2L_REGEX=\1[_][n][e][w]
Definition of Conversion Rules
Conversion rules are based on regular expressions. To convert variable names use the following expressions:
EXP_REGEX=(.*)[_][o][l][d]
A2L_REGEX=\1[_][n][e][w]
The EXP_REGEX is used to find variables to which the rule can be applied. In the above example, any variable ending in _old would match. The (.*) of the EXP_REGEX is used as a backreference in the variable \1, which in this example is extended with the new suffix _new of the A2L_REGEX expression to the new variable name. To increase the performance, use expressions that result in a list of strings. Expressions like \1_(.*) decrease performance.
You can find the syntax of the RegEx engine here.
See also