Adds a conversion from one type to another.
Syntax
AddConversion(ByVal From as String, ByVal To as String, ByVal Cost as Long)
Parameters
From
The source type
To
The destination type
Cost
How expensive this conversion is
Remarks
When multiple matches are found for a Choice filter specified by a DTC object, choices with lower conversion costs are considered better than choices with higher conversion costs. If no conversion is needed, the cost is implicitly 0.
Conversions do not chain. For example, a conversion may be given from type A to type B, and another from type B to type C; but type A cannot necessarily be converted to type C. A specific conversion from A to C must be specified separately.
Conversions are one-way. If two types are interchangeable, you must specify a conversion each way. For example, to say that all choices of type myControl.filename
match filters of type myControl.string
with a cost of 20, you could write:
mySite.Types.AddConversion "myControl.filename", "myControl.string", 20
This does not imply the converse, that a string matches a filename.
Applies to Types collection