DIAdem Help

Method: SaveValueMapper for Settings <Navigator>

  • Updated2024-09-12
  • 1 minute(s) read

Method: SaveValueMapper for Settings <Navigator>

Saves a file for the mapping of values of a property, in the data preparation. In a mapping you use rules to replace property values. Mapping files have the filename extension *.TPVM (Technical Property Value Mapping).

Object.SaveValueMapper(FileName, pValueMapper)
ObjectSettings <Navigator>
Object with this method
FileNameString
Specifies the path and the name of the mapping file.
pValueMapperPropertyValueMapper
Object which specifies the mapping of property values.

The following example creates on the channel level a mapping for the name property and saves the mapping in the file MyValueMapper.tpvm:

VBScriptPython

 

Dim oMyMapper, oMyChnNameMapping, oMyRule
Set oMyMapper = Navigator.Settings.CreateValueMapper()
Set oMyChnNameMapping = oMyMapper.Mappings(eSearchChannel).Add("name")
Set oMyRule = oMyChnNameMapping.Rules.Add(_
    "([A-Za-z]+)([\_\-\/\\\?\ \:]+)([0-9]+)","$1$3","Example_1")
Call Navigator.Settings.SaveValueMapper("D:\MyValueMapper.tpmv", oMyMapper)