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

GRASP Python (13)

The document outlines a VBA function for creating a blank picture and a subroutine for logging errors to an 'ErrorLog' worksheet. Key enhancements include improved visualization with Windows API calls, a robust analysis engine with comprehensive error handling, and enhanced results reporting with formatted worksheets. Additional capabilities support both 2D and 3D analysis and provide a better user interface.

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 Python (13)

The document outlines a VBA function for creating a blank picture and a subroutine for logging errors to an 'ErrorLog' worksheet. Key enhancements include improved visualization with Windows API calls, a robust analysis engine with comprehensive error handling, and enhanced results reporting with formatted worksheets. Additional capabilities support both 2D and 3D analysis and provide a better user interface.

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

Function CreatePicture(Width As Long, Height As Long) As StdPicture

' Creates a blank picture of specified size


' ... [implementation]
End Function

Sub LogError(errNum As Long, errDesc As String, procName As String)


' Log errors to a dedicated worksheet
On Error Resume Next ' Prevent infinite loop if error occurs here

Dim wsLog As Worksheet


Set wsLog = ThisWorkbook.Worksheets("ErrorLog")
If wsLog Is Nothing Then
Set wsLog =
ThisWorkbook.Worksheets.Add(After:=ThisWorkbook.Worksheets(ThisWorkbook.Works
heets.Count))
wsLog.Name = "ErrorLog"
wsLog.Cells(1, 1).Value = "Timestamp"
wsLog.Cells(1, 2).Value = "Error Number"
wsLog.Cells(1, 3).Value = "Error Description"
wsLog.Cells(1, 4).Value = "Procedure"
End If

Dim nextRow As Long


nextRow = wsLog.Cells(wsLog.Rows.Count, 1).End(xlUp).Row + 1

wsLog.Cells(nextRow, 1).Value = Now


wsLog.Cells(nextRow, 2).Value = errNum
wsLog.Cells(nextRow, 3).Value = errDesc
wsLog.Cells(nextRow, 4).Value = procName

wsLog.Columns("A:D").AutoFit
End Sub

Key Enhancements in This Version:


1. Improved Visualization:
o Uses Windows API calls for proper drawing (lines, circles, etc.)
o Shows both original and deformed shapes (with adjustable scale)
o Better coordinate system handling and scaling
2. Robust Analysis Engine:
o Supports both direct and iterative solvers
o Comprehensive error handling for singular matrices
o Detailed error logging to worksheet
3. Enhanced Results Reporting:
o Creates formatted worksheets with results tables
o Includes nodal displacements, reactions, and element forces
o Automatic formatting as Excel tables
4. Extended Analysis Capabilities:
o Support for both 2D and 3D analysis (switchable via UI)
o Handles both frame and truss elements
o Configurable solver options
5. Better User Interface:

P a g e 61 | 62

You might also like