PdcMaterialFile.ConvertUnitToUnitFactor: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
No edit summary
Line 8: Line 8:
The function returns 0 if the LM_STAFM or LM_GEW isn't correctly filled. <br />
The function returns 0 if the LM_STAFM or LM_GEW isn't correctly filled. <br />
The UnitWeightFactor is the unit which corresponds to the weightfactor, most likely the unit of the material in question. <br />
The UnitWeightFactor is the unit which corresponds to the weightfactor, most likely the unit of the material in question. <br />
<br />
 
'''Units:''' <br />
'''Units:''' <br />
m / ft, <br />mm / in, <br />m2 / ft2, <br /> m3 / ft3, <br />kg / lb, <br />Ltr / Gal, <br />1 (Pieces)
m / ft, <br />mm / in, <br />m2 / ft2, <br /> m3 / ft3, <br />kg / lb, <br />Ltr / Gal, <br />1 (Pieces)

Revision as of 08:14, 29 June 2020

Declaration

ConvertUnitToUnitFactor(UnitFrom as string, UnitTo as string, UnitWeightFactor as string, StandardSize as string, WeightFactor as double) as double

Description

Returns the factor from wich a unit to a unit conversion can be executed. This function uses the LM_STAM and LM_GEW of a material for the calculation.

Notes

The function returns 0 if the LM_STAFM or LM_GEW isn't correctly filled.
The UnitWeightFactor is the unit which corresponds to the weightfactor, most likely the unit of the material in question.

Units:
m / ft,
mm / in,
m2 / ft2,
m3 / ft3,
kg / lb,
Ltr / Gal,
1 (Pieces)


Code example VB.NET

PDC.App.MasterData.MaterialFile.ConvertUnitToUnitFactor(strUnitFrom, strUnitTo, strUnitWeightFactor, strStandardSize, dblWeightFactor)

Availability

Available since Juli 2020 (from version 5.6)