The document outlines a procedure for exporting data related to materials, sections, and load cases into a file. It includes loops for writing material properties, section details, and load case assignments, followed by error handling and user notifications. The process concludes with a message indicating successful completion of the export.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
5 views1 page
Grasp
The document outlines a procedure for exporting data related to materials, sections, and load cases into a file. It includes loops for writing material properties, section details, and load case assignments, followed by error handling and user notifications. The process concludes with a message indicating successful completion of the export.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1
ld.Mx & "," & ld.My & "," & ld.
Mz Next ld
' Write materials
Dim mat As clsMaterial For Each mat In MaterialList Print #fileNum, "MATERIAL," & mat.MaterialID & "," & Chr(34) & mat.Name & Chr(34) & "," & _ mat.ElasticModulus & "," & mat.ShearModulus & "," & _ mat.PoissonRatio & "," & mat.Density Next mat
' Write sections
Dim sec As clsSection For Each sec In SectionList Print #fileNum, "SECTION," & sec.SectionID & "," & Chr(34) & sec.Name & Chr(34) & "," & _ sec.Area & "," & sec.Iyy & "," & sec.Izz & "," & sec.J & "," & _ sec.Depth & "," & sec.Width Next sec
' Write load cases
Dim lc As clsLoadCase For Each lc In LoadCaseList Print #fileNum, "LOADCASE," & lc.LCID & "," & Chr(34) & lc.Description & Chr(34) Next lc
' Write load case assignments
For Each lc In LoadCaseList Dim i As Integer For i = 1 To lc.LoadCount Print #fileNum, "LOADINLC," & lc.LCID & "," & lc.LoadIDs(i) & "," & lc.LoadFactors(i) Next i Next lc
ErrorHandler: Close #fileNum MsgBox "Error during export: " & Err.Description, vbCritical, "GRASP Error" End Sub
' Helper function to get file path
Function GetFilePath(title As String, fileFilter As String, saveAs As Boolean) As String Dim fd As FileDialog If saveAs Then Set fd = Application.FileDialog(msoFileDialogSaveAs) Else Set fd = Application.FileDialog(msoFileDialogFilePicker)