Sorry for the delay.
Getting the controlling failure analysis is fairly straightforward. Get the analysis id and use the AnalysisText method of the Description object.
*****************************************************
Dim oDes As New HyperSizer.Description
Debug.Print oDes.AnalysisText(oComp.ResultPanel(pcrAnalysisID))
*****************************************************
Getting the material is a little more complicated. Materials are defined by two pieces of information: 1) Material Type (isotropic, orthotropic etc.) 2) Material key unique for each material in a give type.
Attached is some code from a utility spreadsheet we are developing. Case selects are used to keep the code general to all material types.
*****************************************************
Dim lngMatTypeID As Long
Dim strMatKey As String
Dim oFoam As Foam
Dim oHC As Honeycomb
Dim oIso As Isotropic
Dim oLam As Laminate
Dim oLay As Layup
Dim oOrtho As Orthotropic
lngMatTypeID = oComp.ResultVariableMaterialType(vpdTopFace_ThicknessMaterial) ' Material Type ID
strMatKey = oComp.ResultVariableMaterialKey(vpdTopFace_ThicknessMaterial, lngMatTypeID) ' Material Key
If Abs(StrComp(strMatKey, "")) > 0 Then ' Make sure that the key is valid
Select Case lngMatTypeID
Case hmtFoam 'Foam'
Set oFoam = oHS.Foams.Key(strMatKey)
Cells(row, col) = oFoam.MaterialName
Case hmtHoneycomb 'Honeycomb'
Set oHC = oHS.Honeycombs.Key(strMatKey)
Cells(row, col) = oHC.MaterialName
Case hmtIsotropic 'Isotropic'
Set oIso = oHS.Isotropics.Key(strMatKey)
Cells(row, col) = oIso.MaterialName
Case hmtLaminate 'Laminate'
Set oLam = oHS.Laminates.Key(strMatKey)
Cells(row, col) = oLam.MaterialName
Case hmtLayup 'Lay-Up'
Set oLay = oHS.Layups.Key(strMatKey)
Cells(row, col) = oLay.MaterialName
Case hmtOrthotropic 'Orthotropic'
Set oOrtho = oHS.Orthotropics.Key(strMatKey)
Cells(row, col) = oOrtho.MaterialName
Case hmtThermal 'Thermal'
Case Else
Cells(row, col) = "Invalid Material Type ID"
End Select
Else ' Material Key is empty
' - This happens if the select concept doesn't have material data for a give object
' - Example: Unstiffened Plate/Sandwich Panel Family
' ----- Concept: One Stack Unstiffened has no core (key = 0)
' ----- Concept: Honeycomb Sandwich has core (key != 0)
Cells(row, col) = ".."
End If
End If
***************************************************
The Object Model manual has undergone a major revision. It has a more detailed discussion on retrieving material properties and analysis objects. It is available at:
http://www.hypersizer.com/manuals/User_Manual_Programmer.pdf