The document contains a VBA subroutine for plotting the deformed shape of a structure based on member displacements. It calculates the original and deformed positions of nodes, scales the displacements, and adds the deformed shape to a chart. An error handler is also included to display a message box in case of errors during the plotting process.
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 contains a VBA subroutine for plotting the deformed shape of a structure based on member displacements. It calculates the original and deformed positions of nodes, scales the displacements, and adds the deformed shape to a chart. An error handler is also included to display a message box in case of errors during the plotting process.
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
Exit Sub
ErrorHandler: MsgBox "Error in 3D plotting: " & Err.Description, vbCritical, "GRASP Error" End Sub
' Plot deformed shape
Sub PlotDeformedShape(cht As ChartObject) Dim mem As clsMember Dim startNode As clsNode, endNode As clsNode Dim x1 As Double, y1 As Double, x2 As Double, y2 As Double Dim dx1 As Double, dy1 As Double, dz1 As Double Dim dx2 As Double, dy2 As Double, dz2 As Double Dim scaleFactor As Double: scaleFactor = 50 ' Scale factor for displacements
For Each mem In MemberList
Set startNode = NodeList(mem.StartNode) Set endNode = NodeList(mem.EndNode)
Dim origX1 As Double, origY1 As Double Dim origX2 As Double, origY2 As Double Dim defX1 As Double, defY1 As Double Dim defX2 As Double, defY2 As Double