Dimensions and Sizing results are available on the Component.
from hs_enums import *
def ExtractDimensionsAndSizingResults(project):
"""Returns the result dimension for the given variable ID. If the result does not exist, null is returned.
If multiple designs (solutions) were requested, results for the subsequent design can be returned using the optional solution ID parameter"""
for component in project.Components:
# Skip components without results.
if not component.HasResults or component.Family != BeamPanelFamily.bpfUniaxialStiffenedPanelFamily:
continue
# Uniaxial panels only.
if component.Family != BeamPanelFamily.bpfUniaxialStiffenedPanelFamily:
continue
# Get the result for the skin thickness variable.
variableId = VariableParameterDefinition.vpdTopFace_ThicknessMaterial # From hs_enums
t_skin = component.ResultVariable(variableId)
print ("Component: {0}, t_skin= {1}".format(component.ComponentId, t_skin))
Dimensions and Sizing results are available on the Zone. Each Zone has Sizing results corresponding to each design variable parameter (thickness, height, width, etc.).
import hyperx as hx
def ExtractDimensionsAndSizingResults(zone: hx.Zone):
"""Extract sizing results and various result properties"""
sizingResults = zone.GetZoneDesignResults()
for result in sizingResults:
variableParameter = result.VariableParameter # The type of sizing variable
sizingResultValue = result.Value # The sized value
materialId = result.MaterialId
materialType = result.MaterialType