Using conversion factors for Formulation
The
UOMSTRCONV
method is used for formula workflows only.
In this example, the
UOMSTRCONV
method creates a conversion factor. The
parameters that follow the method are the unit of measure.
- (
oUom
) is the unit of measure that is converted from. - (
"KG"
) is the unit of measure that the number is converted to.
Dim oUom As Object = ObjProperty("UOMCODE")
Dim oFactor As Object = ObjMethod("","","UOMSTRCONV", oUom, "KG")
Dim oYield As Object = ObjProperty("YIELD") * oFactor
Dim oMethod As Object = ObjMethod("XGMITEM",oItemkey, "setdefaults",
oFormula, oVersion, oYield, oProcessYield)