Software Use > Scripting

Extracting Component Weight

(1/1)

Ruben:
In the Hypersizer_Spreadsheet_Utilities_6.2.xls, when using the <Report> worksheet, the values extracted when using the weight or unit weight keywords are incorrect.

I believe the weight error is due to the mass factor being divided, rather than multiplied to the component weight...

In PerformActionComponentGroupData under Case KeywordId.Weight, the following line is present:

udtAction.Output = oComponent.Weight / Units.MassFactor

In our workbook, I've changed this to the product and it produces the correct result.

The unit weight is also wrong, but I'm not sure how to correct this problem.

Thanks,
Ruben

Ryan:
You're right. The mass and the panel/beam unit weight factors are wrong. The massFactor should be 2.205 instead of 1/2.205.

I've modified the 6.2-6.4 spreadsheets with the correct factors.

http://hypersizer.com/help/index.php#COM/XLS/com-xls-overview.php


--- Code: ---Public Sub InitializeUnits(ByVal strUnits As String)

    strUnits = UCase(strUnits)
   
    mdblLengthFactor = 1#
    mdblForceFactor = 1#
    mdblMassFactor = 1#
    mdblPanelUnitWeightFactor = 1#
    mdblBeamUnitWeightFactor = 1#

    If InStr(1, strUnits, "SI") Then
        mdblLengthFactor = 1 / 25.4
        mdblForceFactor = 1 / 4.448
        mdblMassFactor = 2.205
        mdblPanelUnitWeightFactor = 2.205 * (12# ^ 2) * (25.4 ^ 2)
        mdblBeamUnitWeightFactor = 2.205 * 12# * 25.4
    End If
   
End Sub
--- End code ---

-Ryan

Ruben:
Thanks, the unit weight is output in kg/mm^2, so you need to multiply the weight factors by 1.E6 to get it in kg/m^2.

Regards,
Ruben

Ryan:
OK. A new version is up with:

mass = kg
panel area = m^2
beam length = m
panel unit weight = kg/m^2
beam unit weight = kg/m
all other length dimensions = mm

-Ryan

Navigation

[0] Message Index

Go to full version