Method: CreateValueMapper for Settings <Navigator>
- Updated2024-09-12
- 1 minute(s) read
DIAdem NAVIGATOR > Methods > Method: CreateValueMapper for Settings <Navigator>
Method: CreateValueMapper for Settings <Navigator>
Creates a ValueMapping object for the data preparation. In a ValueMapping you use rules to replace property values.
Set oPropertyValueMapper = Object.CreateValueMapper()
| Object | Settings <Navigator> Object with this method |
| oPropertyValueMapper | PropertyValueMapper Returned object |
The following example creates a mapping for the name property on the channel level and displays the search pattern, the replacement pattern, an example text, the replaced example text, and other replaced texts:
| VBScript | Python |
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") MsgBox "Pattern: " & oMyRule.Pattern & vBCrLf _ & "Scheme: " & oMyRule.Schema & vBCrLf _ & "Example: " & oMyRule.Example & vBCrLf _ & "Mapping: " & oMyRule.MapProperty(oMyRule.Example)& vBCrLf _ & "Mapping: " & oMyRule.MapProperty("Pascalstreet_18")