- 积分
- 58
- 注册时间
- 2013-9-21
- 积分
- 58
 
|
用VB语言编写一个油品表征的小程序,用代码添加2个化验数据assay-1,assay-2.然后在添加一个blend-1
,需要2个化验数据在油品表征环境下混合。这就要求输入图1红框中的数据。想问下。用程序代码怎么选择flow units项跟怎么输入flow rate 。部门代码如下:
Dim hyBasis As BasisManager
Set hyBasis = hyCase.BasisManager
hyCase.BasisManager.StartBasisChange
hyCase.BasisManager.StartOilChange
Set hyOil = hyCase.BasisManager.OilManager
Dim hyAssay As AssayD86
Set hyAssay = hyBasis.OilManager.Assays.Add("Assay-1", "D86")
With hyAssay
'.Basis = ab_LiquidVolumeFraction
'.BulkMolecularWeight = 300
.BulkWatson_uopk = 10.52
.BulkMassDensity.SetValue 880, "kg/m3"
.LightEndsCalculationType = alect_IgnoreLightEnds
.ViscosityType = av_Dynamic
.Viscosity1Temperature = 37.78
.Viscosity2Temperature = 98.89
Dim hyValue As Variant
Dim hyPercent As Variant
hyPercent = Array(1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 95, 98)
'hyValue = Array(26.67, 123.89, 176.11, 221.11, 275, 335, 399, 490.56, 590.56, 691.67, 795.56)
.Calculate
Dim hyBlend As Blend
Dim hyblends As Blends
Set hyblends = hyCase.BasisManager.OilManager.Blends
Set hyBlend = hyBasis.OilManager.Blends.Add("BlendName")
hyBlend.AddAssay "Assay-1"
hyBlend.AddAssay "Assay-2" ‘在这里添加完2个化验数据后怎么用代码设置flowunits跟flowrate 这2项。希望高手赐教
|
|