0% found this document useful (0 votes)
2 views1 page

Grasp

The document outlines a script that processes lines of data related to structural elements, categorized by record types such as NODE, MEMBER, SUPPORT, LOAD, MATERIAL, SECTION, LOADCASE, and LOADINLC. Each record type has a specific format and is handled by corresponding functions to add nodes, members, supports, loads, materials, sections, load cases, and load factors. Lines that are empty or start with '#' are skipped during processing.

Uploaded by

Le Fondateur
Copyright
© © All Rights Reserved
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% found this document useful (0 votes)
2 views1 page

Grasp

The document outlines a script that processes lines of data related to structural elements, categorized by record types such as NODE, MEMBER, SUPPORT, LOAD, MATERIAL, SECTION, LOADCASE, and LOADINLC. Each record type has a specific format and is handled by corresponding functions to add nodes, members, supports, loads, materials, sections, load cases, and load factors. Lines that are empty or start with '#' are skipped during processing.

Uploaded by

Le Fondateur
Copyright
© © All Rights Reserved
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

If Trim(line) = "" Or Left(Trim(line), 1) = "#" Then

' Skip
Else
' Split the line into parts
parts = Split(line, ",")
recordType = UCase(Trim(parts(0)))

' Process based on record type


Select Case recordType
Case "NODE"
' Format: NODE, ID, X, Y, Z
AddNode CInt(parts(1)), CDbl(parts(2)), CDbl(parts(3)),
CDbl(parts(4))

Case "MEMBER"
' Format: MEMBER, ID, StartNode, EndNode, MaterialID,
SectionID
AddMember CInt(parts(1)), CInt(parts(2)), CInt(parts(3)),
CInt(parts(4)), CInt(parts(5))

Case "SUPPORT"
' Format: SUPPORT, NodeID, Fx, Fy, Fz, Mx, My, Mz
AddSupport CInt(parts(1)), CBool(parts(2)),
CBool(parts(3)), CBool(parts(4)), _
CBool(parts(5)), CBool(parts(6)),
CBool(parts(7))

Case "LOAD"
' Format: LOAD, NodeID, Fx, Fy, Fz, Mx, My, Mz
AddNodalLoad CInt(parts(1)), CDbl(parts(2)),
CDbl(parts(3)), CDbl(parts(4)), _
CDbl(parts(5)), CDbl(parts(6)),
CDbl(parts(7))

Case "MATERIAL"
' Format: MATERIAL, ID, Name, E, G, Poisson, Density
AddMaterial CInt(parts(1)), parts(2), CDbl(parts(3)),
CDbl(parts(4)), _
CDbl(parts(5)), CDbl(parts(6))

Case "SECTION"
' Format: SECTION, ID, Name, Area, Iyy, Izz, J, Depth,
Width
AddSection CInt(parts(1)), parts(2), CDbl(parts(3)),
CDbl(parts(4)), _
CDbl(parts(5)), CDbl(parts(6)), CDbl(parts(7)),
CDbl(parts(8))

Case "LOADCASE"
' Format: LOADCASE, ID, Description
AddLoadCase CInt(parts(1)), parts(2)

Case "LOADINLC"
' Format: LOADINLC, LCID, LoadID, Factor
AddLoadToCase CInt(parts(1)), CInt(parts(2)),
CDbl(parts(3))
End Select

P a g e 22 | 57

You might also like