In the configuration file CADENAS_SETUP/geomsearch.cfg
configuration file, you can define a number of filter rules. If at least one rule applies to a part, it is filtered out and thus excluded from the index generation.
Specify a list of all rule names in the block
[settings]
, in the keyGenerationFilterRules
separated by commas.[settings] GenerationFilterRules=Rule1,Rule2,etc.
Create a block for each rule according to the scheme
GenerationFilterRule_Rulex
.[GenerationFilterRule_Rule1] Catalogs=cat/__partialtest AlgoTypes=PARTIAL,TOPO PrjRegExp=.*ass.* PrjScriptCallbackFile= PrjScriptCallbackFunction= LineFilterCount=1 LineFilterVar0=TYPE LineFilterRegExp0=.*ass.* Conjunction=AND LineScriptCallbackFile=test.vbb LineScriptCallbackFunction=checkLine
Explanations to the individual keys:
AlgoTypes: Index types that should NOT be generated (comma-separated)
Refers to the project conditions and the row conditions. If there is only at most 1 project condition and only at most 1 row condition, then it does not matter whether OR or AND.
If OR, then a project or line filter is applied if ONE rule applies. If AND, then all non-empty rules must apply.
PrjRegExp: Specification of a regular expression. This is tested for the project path relative to the catalog and filtered if it matches.
Example: All projects that have "asm" anywhere in the path will be filtered by following regular expression:
.*asm.*
PrjScriptCallbackFile: Path to the vbb script that contains the callback.
PrjScriptCallbackFunction: The function
PrjScriptCallbackFunction
is called with the project path as a parameter and should return 1 if filtering is to take place, otherwise 0.
LineFilterCount: Number of line conditions
Example with 3 line conditions:
LineFilterCount=3 LineFilterVar0=A LineFilterRegExp0=.*ab.* LineFilterVar1=B LineFilterRegExp1=.*ac.* LineFilterVar2=C LineFilterRegExp2=.*ad.*
LineFilterVar0: Variable name from the table (0 is to be replaced by the index of the condition)
LineFilterRegExp0= The characteristic value of the named variable must match the regular expression in order to be filtered out. (0 must be replaced by the index of the condition)
LineScriptCallbackFile: Path to the vbb script that contains the callback.
LineScriptCallbackFunction: The function
LineScriptCallbackFunction
is called with the table as a parameter and should return 1 if filtering is to take place, otherwise 0.Following example filters all lines with line-id greater than 50000:
function filterLines(table) dim row = table.SelectedRow dim lineId = row.Idnr if lineId > 50000 then filterLines = 1 else filterLines = 0 end if end function