PdcMaterialFile.MergeStockLines

From External Bemet Wiki
Revision as of 10:12, 24 September 2020 by TC (talk | contribs) (Created page with "PdcMaterialFile.ConvertUnitToUnitFactor Contents [hide] 1 Declaration 2 Description 3 Notes 4 Code example VB.NET 5 Availability [edit]Declaration ConvertUnitToUnitFactor(Uni...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

PdcMaterialFile.ConvertUnitToUnitFactor Contents [hide] 1 Declaration 2 Description 3 Notes 4 Code example VB.NET 5 Availability [edit]Declaration ConvertUnitToUnitFactor(UnitFrom as string, UnitTo as string, UnitWeightFactor as string, StandardSize as string, WeightFactor as double) as double

[edit]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 (LM_MAT) for the conversion between units.

[edit]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, m2 / ft2, m3 / ft3, kg / lb, Ltr / Gal, 1 (Piece)

[edit]Code example VB.NET Dim strUnitFrom as string = "kg" Dim strUnitTo as string = "1" Dim strUnitWeightFactor as string = "m2" Dim strStandardSize as string = "1.500x3.000" dim dblWeightFactor as double = 7.8

Dim factor as Double = PDC.App.MasterData.MaterialFile.ConvertUnitToUnitFactor(strUnitFrom, strUnitTo, strUnitWeightFactor, strStandardSize, dblWeightFactor) [edit]Availability Available since Juli 2020 (from version 5.6)