SlideShare a Scribd company logo
AC 2007-397: USE OF SPREADSHEETS WITH SCALED GRAPHICS TO TEACH
STRUCTURAL ENGINEERING
Jorge Tito-Izquierdo, University of Houston-Downtown
Alberto Gomez-Rivas, University of Houston-Downtown
Alberto Gomez-Rivas is Professor of Structural Analysis and Chair of Engineering Technology.
Dr. Gomez-Rivas received Ph.D. degrees from the University of Texas, Austin, Texas, in Civil
Engineering and from Rice University, Houston, Texas, in Economics. He received the Ingeniero
Civil degree, with Honors, from the Universidad Javeriana in Bogotá, Colombia. He also served
as Chief of Colombia’s Department of Transportation Highway Bridge Division
© American Society for Engineering Education, 2007
Use of Spreadsheets with Scaled Graphics to Teach Structural
Engineering
Abstract
Engineering is a profession where graphical presentation is very important in understanding and
verifying results. Geometric proportions, spacing, and other features can be clearly perceived if a
scaled graph is displayed together with the calculations, and thus, the engineering student can
make better decisions about the final design. Overall, these spreadsheets with graphical
capabilities help the learning process.
The use of Excel spreadsheets in engineering education and professional practice is frequent
because this tool is versatile and powerful. However, a deficiency of spreadsheets is the lack of
graphic representation. This may be solved by using the programming tools of Visual Basic for
Applications (VBA) that is included in the package of Microsoft Office. This paper presents
a method to include scaled graphs into a spreadsheet, which completes the engineering
calculations and helps in the final decision to accept or modify a design. These graphs are also
useful in the drafting process, because the graphs can be easily transferred into any computer
assisted drafting (CAD) program. Several actual class examples are included.
Introduction
Spreadsheets are frequently used as helpful tools during the structural design process, especially
when the final outcome involves assumptions that require verification including design of beams,
columns, channel sections, retaining walls, and footings, between others. Engineering is a
profession where graphical presentation is very important in understanding and verifying results.
Also, geometric proportions, spacing, and other features can be clearly perceived if a scaled
graph is displayed on the spreadsheet, and thus, the engineer can make better decisions about the
final design.
The use of Microsoft Excel spreadsheets in engineering education and professional practice is
frequent because this tool is versatile and powerful. However, a deficiency of spreadsheets is the
lack of geometric presentation graphics and therefore, understanding of the results. This may be
solved by using the programming tools of Visual Basic for Applications (VBA) that is included
with the standard package of Microsoft Office1
.
This paper outlines one method to include scaled graphs into a spreadsheet; this graph
presentation completes the engineering calculations and helps in the final decision to accept or
modify a design. These graphs are also useful in the drafting process, because the graphs can be
copy-pasted into any computer assisted drafting (CAD) program. Several actual class examples
are included.
Prior to running the VBA program, the drawing data is listed and organized on the spreadsheet.
VBA can then be accessed using a command button. The program follows a routine, consisting
of reading the geometric data and desired scale, the location where the drawing will be
displayed, application of a suitable scale factor to the geometric data, drawing the geometry, and
applying any special effects such as color or lines.
Spreadsheets with graphic capabilities improve the learning curve of the students, principally for
topics involving design. Furthermore, these spreadsheets have a component of trial and error,
since modification of input parameters and obtaining a final modified result is simple, quick, and
straightforward. Thus, the use of Excel spreadsheets with subsequent VBA processing has been
found by the authors to be an effective and useful tool in facilitating student learning in structural
design courses.
Spreadsheet Organization
The spreadsheet may be organized according to the necessity of the problem; generally it is
organized as input, partial calculations, results and graphics.
The students are encouraged to prepare a template in order to organize the presentation just once.
This template may be used for different purposes. The template provides the typical information
required for professional calculation sheets. A good printout, with the corresponding references,
sketches and commentaries is a requisite for future use of the spreadsheet.
Sketches, where the variables are described, still may complement the input process as shown in
Figure 1. This sketch is done using the drawing tools of excel, without scale. The sketch may
be improved using the VBA tools “text box” or “label”, which can be linked to the data input in
the corresponding cell. Figure 2 describes a method to include the input data into the sketch.
Figure 1. Sketch used to describe the variables.
The input data is located in one block, marked with clear color because the print out in black and
white is clearer. The cells used for input shall be un-locked permitting the use of a protection for
all the spreadsheet, except the input cells.
a. From the toolbox of VBA select label
or text box. Drag the icon to the sketch,
together with the description.
b. In the ‘formula bar’ of excel
replace the default command
(EMBED…..) by the cell
correspondent to the variable to be
described.
c. The VBA tool and the description can
be grouped for clarity. If the description
is back of the tool, use the ‘send to front’
excel tool of ‘Draw’.
d. Group both the VBA tool and the
description.
Figure 2. Sequence to Include the Input Data into the Sketch
Intermediate calculations are performed using Excel functions. VBA becomes more effective
when the calculations involve iterations or a significant amount of conditionals.
The problem conclusions may be presented using the capabilities of Excel, presenting
programmed comments if the assumptions satisfy the design criteria.
Finally, and this is the main objective of this paper, the spreadsheet can present a scaled drawing
of the problem. If the drawing has too much information, it is better to present a new sheet
exclusive for the drawing. In the new spreadsheet there is no input, all the information respect to
the problem is automatically imported from the calculation sheet. Only the drafting related
information is manipulated on this sheet, such as scale and location of the drawing.
Drawing using VBA
Scale definition. Create a scale options for the user. The Excel’s “Data Validation” tool may be
used to select the required scale for the drawing. This tool is found in Data – Validation – Setting
– List, as shown in Figure 3.
Figure 3. Scale selection
Click on tab and
select the scale
wanted
When the scale is selected, the program employs the “vlookup” function and opts for a factor
that is used to scale the coordinates, as indicated in Figure 3. The user adjusts the modification
factors for horizontal and vertical dimensions accordingly to the printer available. The zoom
factor depends on the percentage of the normal size selected in the page setup for the spreadsheet
and it can be automatically found using the VBA expression “ActiveSheet.PageSetup.Zoom /
100”. The scale factor, the modification factors and the zoom factor are used to scale the point
coordinates useful for drawing.
Delete Old Drawings. This control button is necessary to clear the spreadsheet of old lines,
circles, or any other drawing. The VBA code is shown in Figure 4. This Delete button shall be
activated (clicked) before the drawing of the final sketch.
Drawing Location. The drawing can be located in the place where better adjust for the user.
VBA defines the origin of coordinates in the upper left corner of the screen, the x-axis is positive
toward right and the y-axis is positive downward. It is possible to translate the origin to other
position using the columns and rows of the spreadsheet. The width of each column and the
height of each row are defined in “points”, each point is 1/72 inch, and they may be found using
VBA codes. The code given in Figure 5 helps to move the origin of coordinates to the desired
position.
Private Sub cmdEraser_Click()
Set myShapes = ActiveSheet.Shapes
'Delete Polylines
For Each shp In myShapes
If Left(shp.Name, 8) = "Freeform" Then
shp.Delete
End If
Next
'Delete Lines
For Each shp1 In myShapes
If Left(shp1.Name, 4) = "Line" Then
shp1.Delete
End If
Next
'Delete Rectangles
For Each shp1 In myShapes
If Left(shp1.Name, 9) = "Rectangle" Then
shp1.Delete
End If
Next
'Delete Shapes
For Each shp1 In myShapes
If Left(shp1.Name, 9) = "AutoShape" Then
shp1.Delete
End If
Next
'Delete Text Box
For Each shp1 In myShapes
If Left(shp1.Name, 8) = "Text Box" Then
shp1.Delete
End If
Next
'Delete oval
For Each shp1 In myShapes
If Left(shp1.Name, 4) = "Oval" Then
shp1.Delete
End If
Next
End Sub
Figure 4. VBA Code to Delete Old Drawings in the Spreadsheet
Reading Data. Using the standard commands of VBA, the input data is read from the
spreadsheet and stored in previously dimensioned VBA variables. It is preferable to define with
explicit names the cells to be used as input, as this permits future changes in the spreadsheet
without affecting the original programming. For example, the cell V33, which defines the scale
factor, may be called “Scale1” in the spreadsheet using the function “insert-name-define”, as
shown in Figure 3. Note that the name of the cells is case-sensitive.
Table 1. Data Needed to Draw Objects in VBA
Object Coordinates of Dimensions Code
Line Start and End -- Shapes.AddLine Xstart,Ystart,Xend,Yend
Rectangle Lower left
corner. ‘Y’ is
positive
downward
Width and
Height
Shapes.AddShape msoShapeRectangle, X, Y,
Width, Height
Oval or
circle
Center Width and
Height
Shapes.AddShape msoShapeOval, X, Y, Width,
Height
Polyline Vertices of the
polygon. It
may be opened
or closed. The
coordinates
shall be stored
in an array
Dim CoordPoints(1 To M, 1 To N) As Single
CoordPoints (1, 1) = a
CoordPoints (1, 2) = b
….
CoordPoints (2, 1) = c
CoordPoints (2, 2) = d
….
CoordPoints (M, 1) = e
….
CoordPoints (M, N) = f
Shapes.AddPolyline CoordPoints
Column and Row desired for the origin of coordinates
for the drawing
Figure 5. Excel Input Cells and VBA Code to Find the Origin of Coordinates for the Drawing
myColum1
myRow1
Drawing. The dimensions corrected by the scale and modification factors, used for the scaled
drawing, shall be assigned to different variables in order to maintain the original dimensions for
other purposes. The drawing may be performed using different geometric options. It may be
used different objects, like circles, rectangles, polylines, lines, text boxes, etc. It is important to
define the coordinates of the shape respect to the origin of the drawing previously defined,
remembering that VBA always use the positive x-axis toward the right and the y-axis downward
of the screen. The VBA codes have options to change the line width, color, continuity, and other
attributes of the object. VBA has specific codes to draw each one of the objects. Table 1 shows
the coordinates needed to draw some objects. VBA has a help function that is a good start for
the code writing.
Examples
Footing Design. In this example, the dimension of a footing is input to the excel spreadsheet to
verify the soil capacity using the classical methods of foundation engineering2
. After the
verification of the soil pressures, the foundation is drawn using the VBA code in another
spreadsheet. This combination of analysis and drafting allows the student to visualize the
problem and the solution found, appreciating the effect of the different parameters, like a virtual
laboratory. Figure 6 shows the spreadsheet used to verify the foundation. This spreadsheet
computes the geometric properties of the footing, combine the loads, translate the loads from the
top of the pedestal to the bottom of the footing, computes the soil pressure in the four corners of
the footing, and compare the allowable soil bearing pressure with the actual soil stress.
Figure 7 shows the scaled drawing of the different views of the footing, which is done using
VBA; this drawing can be exported to other Computed Assisted Drafting (CAD) programs.
Figure 8 shows the VBA programming code to make the drawing. The programming code is
divided in data reading, location of the origin, and drawing, as explained before.
Reinforced Concrete Design – Beams. This spreadsheet permits the user verify a given cross
section of a rectangular or T-beam, including the longitudinal steel and stirrups. The spreadsheet
is based on the ACI-318-053
. The user can input the geometry with the help of sketches and the
steel dimensions for each layer of reinforcement. Excel functions are used to verify the beam
capacity and a different sheet is used to present a scaled cross section of the beam. Figure 9
shows the spreadsheet calculations and the scaled drawing.
Using this spreadsheet, the student can appreciate the geometry of the beam, the location and
size of the rebar and the stirrup with the specified cover. All this information is important for the
beam design and it can be copied to the final drawings. This spreadsheet is also used to study the
effect of the change of the design parameters on the final design, permitting the global
understanding of the reinforced concrete beam design.
Figure 6. Spreadsheet to Verify the Soil Pressure under a Proposed Footing (Part I / III)
Figure 6. Spreadsheet to Verify the Soil Pressure under a Proposed Footing (Part II / III)
Figure 6. Spreadsheet to Verify the Soil Pressure under a Proposed Footing (Part III / III)
Figure 7. Scaled Drawing of the Proposed Footing Designed and Data Necessary
Private Sub cmdDrawFooting_Click()
Dim Ncolumns, I As Integer
Dim Scale1, myColumn, myRow, myZoom As Double
Dim PositionX, PositionY, ModifX, ModifY As Double
Dim ScaleX, ScaleY, Fact, ColEarthDist As Double
Dim Base, Length, Thickness, DistViews As Double
Dim Base1, Length1, Thickness1 As Double
Dim Longi As String
Dim Radius, CenterEast, CenterNorth As Double
Dim EarthOn, FoundDepth As Double
Dim Ncols, fila As Integer
Dim TypeCol As String
Dim LengthX, LengthY, HeightCol As Double
'GENERAL INPUT DATA
'Modify scale according to the printer used
ModifX = ActiveSheet.Range("ModifX")
ModifY = ActiveSheet.Range("ModifY")
Fact = ModifX / ModifY
Base1 = ActiveSheet.Range("Base1")
Length1 = ActiveSheet.Range("Heigth1")
Thickness1 = ActiveSheet.Range("Thickness1")
'The Scale of the lines is defined. Correct for a PageSetup
'different of 100%
ActiveSheet.Range("MyZoom") =
ActiveSheet.PageSetup.Zoom / 100
myZoom = ActiveSheet.PageSetup.Zoom / 100
Scale1 = ActiveSheet.Range("Scale1") / myZoom
ScaleX = Scale1 * ModifX
ScaleY = Scale1 * ModifY
'Read Earth Depth on Footing
EarthOn = Range("EarthOn") * ScaleY
FoundDepth = Range("EarthOn") + Thickness1
ColEarthDist = Range("ColEarthDist")
'LOCATE THE POSITION (0,0)
'PositionX and PositionY are the new coordinates in 'points
of the origin for the drawing
PositionX = 0
PositionY = 0
myColumn = ActiveSheet.Range("myColumn1") 'Read the
Location desired for the Drawing
myRow = ActiveSheet.Range("myRow1") 'Read 'the
Location desired for the Drawing
'Loop to find the value in points of origin to be used 'for the
drawing
For I = 1 To myColumn
PositionX = PositionX + ActiveSheet.Columns(I).Width
Next I
For I = 1 To myRow
PositionY = PositionY + ActiveSheet.Rows(I).Height
Next I
'Variables for drawing
Base = Base1 * ScaleX
Length = Length1 * ScaleY
Thickness = Thickness1 * ScaleY
DistViews = Range("DistViews") * ScaleY
‘DRAWING
'DRAW RECTANGLE: Plan View
a = PositionX
b = PositionY
c = Base
d = Length
With_ ActiveSheet.Shapes.AddShape(msoShapeRectangle,_
a, b, c, d)
.Line.DashStyle = msoLineSolid
.Fill.ForeColor.RGB = RGB(255, 255, 255)
End With
'DRAW RECTANGLE: South View
a = PositionX
b = PositionY + Length + DistViews
c = Base
d = Thickness
With _ ActiveSheet.Shapes.AddShape(_
msoShapeRectangle, a, b, c, d)
.Line.DashStyle = msoLineSolid
.Fill.ForeColor.RGB = RGB(255, 255, 255)
End With
'DRAW RECTANGLE: East View
a = PositionX + Base + DistViews
b = PositionY + Length - Thickness
c = Length * Fact
d = Thickness
With ActiveSheet.Shapes.AddShape(_
msoShapeRectangle, a, b, c, d)
.Line.DashStyle = msoLineSolid
.Fill.ForeColor.RGB = RGB(255, 255, 255)
End With
'DRAW AXIS X or EAST-WEST
a = PositionX + Base / 2
b = PositionY + Length / 2
c = PositionX + Base + DistViews * 0.5
d = b
With ActiveSheet.Shapes.AddLine(a, b, c, d).Line
.DashStyle = msoLineDashDotDot
.ForeColor.RGB = RGB(125, 0, 0)
.EndArrowheadLength = msoArrowheadLong
.EndArrowheadStyle = msoArrowheadTriangle
.EndArrowheadWidth = msoArrowheadWide
End With
Figure 8. VBA Code to Draw the Proposed Footing (part I / III)
With ActiveSheet.Shapes.AddTextbox(_
msoTextOrientationHorizontal, c, d, 15, 15)
.Line.Transparency = 1
.TextFrame.Characters.Text = "E"
End With
'DRAW AXIS Y OR SOUTH-NORTH
a = PositionX + Base / 2
b = PositionY + Length / 2
c = a
d = PositionY + Length / 2 - Length
With ActiveSheet.Shapes.AddLine(a, b, c, d).Line
.DashStyle = msoLineDashDotDot
.ForeColor.RGB = RGB(125, 0, 0)
.EndArrowheadLength = msoArrowheadLong
.EndArrowheadStyle = msoArrowheadTriangle
.EndArrowheadWidth = msoArrowheadWide
End With
With ActiveSheet.Shapes.AddTextbox(_
msoTextOrientationHorizontal, c * 1.03, d, 15, 15)
.Line.Transparency = 1
.TextFrame.Characters.Text = "N"
End With
'WRITE DIMENSIONS
'Write Base in the Plan-View
a = PositionX + Base / 2 - 20
b = PositionY + Length + 10
Longi = Int(Base1) & "'-" & Round((Base1 - Int(Base1)) *
12, 1) & """"
With ActiveSheet.Shapes.AddTextbox(_
msoTextOrientationHorizontal, a, b, 40, 15)
.Line.Transparency = 1
.TextFrame.Characters.Text = Longi
'.Fill.ForeColor.RGB = RGB(250, 0, 250)
End With
a = PositionX + Base / 2 - 20
b = PositionY + Length + 25
Longi = "PLAN VIEW"
With ActiveSheet.Shapes.AddTextbox(_
msoTextOrientationHorizontal, a, b, 80, 15)
.Line.Transparency = 1
.TextFrame.Characters.Text = Longi
End With
'Write Base in the South-View
a = PositionX + Base / 2 - 20
b = PositionY + Length + Thickness + DistViews + 10
Longi = Int(Base1) & "'-" & Round((Base1 - Int(Base1)) *
12, 1) & """"
With ActiveSheet.Shapes.AddTextbox(_
msoTextOrientationHorizontal, a, b, 40, 15)
.Line.Transparency = 1
.TextFrame.Characters.Text = Longi
End With
a = PositionX + Base / 2 - 20
b = PositionY +Length+ Thickness + DistViews + 25
Longi = "SOUTH VIEW"
With ActiveSheet.Shapes.AddTextbox(_
msoTextOrientationHorizontal, a, b, 80, 15)
.Line.Transparency = 1
.TextFrame.Characters.Text = Longi
End With
'Write Length in the Plan-View
a = PositionX - 40
b = PositionY + Length / 2
Longi = Int(Length1) & "'-" & _
Round((Length1 - Int(Length1)) * 12, 1) & """' "
With ActiveSheet.Shapes.AddTextbox(_
msoTextOrientationUpward, a, b, 15, 40)
.Line.Transparency = 1
.TextFrame.Characters.Text = Longi
End With
'Write Length in the East-View
a = PositionX + Base + DistViews + Base / 2 - 45
b = PositionY + Length + 15
Longi = Int(Length1) & "'-" & Round((Length1 -
Int(Length1)) * 12, 1) & """' "
With ActiveSheet.Shapes.AddTextbox(_
msoTextOrientationHorizontal, a, b, 45, 15)
.Line.Transparency = 1
.TextFrame.Characters.Text = Longi
End With
a = PositionX + Base + DistViews + Base / 2 - 60
b = PositionY + Length + 35
Longi = "EAST VIEW"
With ActiveSheet.Shapes.AddTextbox(_
msoTextOrientationHorizontal, a, b, 60, 15)
.Line.Transparency = 1
.TextFrame.Characters.Text = Longi
End With
'Write Thickness in the East-View
a = PositionX + Base + DistViews - 20
b = PositionY + Length - Thickness / 2 - 12
Longi = Int(Thickness1) & "'-" & Round((Thickness1 -
Int(Thickness1)) * 12, 1) & _ """"
With ActiveSheet.Shapes.AddTextbox(_
msoTextOrientationUpward, a, b, 15, 25)
.Line.Transparency = 1
.TextFrame.Characters.Text = Longi
End With
'Write Thickness in the South-View
a = PositionX - 25
b = PositionY + Length + DistViews + Thickness / 2 - 10
Longi = Int(Thickness1) & "'-" & Round((Thickness1 -
Int(Thickness1)) * 12, 1) & """ "
Figure 8. VBA Code to Draw the Proposed Footing (part II / III)
With ActiveSheet.Shapes.AddTextbox(_
msoTextOrientationUpward, a, b, 15, 25)
.Line.Transparency = 1
.TextFrame.Characters.Text = Longi
End With
'Write Earth-Depth in the South-View
a = PositionX + Base + 40
b = PositionY + Length + DistViews + Thickness -
FoundDepth * ScaleY / 2 - 10
Longi = Int(FoundDepth) & "'-" & Round((FoundDepth -
Int(FoundDepth)) * 12, 1) & """ "
With ActiveSheet.Shapes.AddTextbox(_
msoTextOrientationUpward, a, b, 15, 25)
.Line.Transparency = 1
.TextFrame.Characters.Text = Longi
End With
'DRAW THE PLAN VIEW OF COLUMNS
Ncols = ActiveSheet.Range("Ncols")
fila = Range("Ncols").Row + 1
For I = 1 To Ncols
TypeCol = ActiveSheet.Cells(fila + I, 2)
LengthX = ActiveSheet.Cells(fila + I, 4) * ScaleX
LengthY = ActiveSheet.Cells(fila + I, 5) * ScaleY
CenterEast = ActiveSheet.Cells(fila + I, 8) * ScaleX
CenterNorth = ActiveSheet.Cells(fila + I, 9) * ScaleY
If TypeCol = "Oval" Then
a = PositionX + Base / 2 + CenterEast - LengthX / 2
b = PositionY + Length / 2 - CenterNorth - LengthY/2
With ActiveSheet.Shapes.AddShape(_
msoShapeOval, a, b, LengthX, LengthY)
.Line.DashStyle = msoLineSolid
.Fill.ForeColor.RGB = RGB(250, 250, 250)
End With
ElseIf TypeCol = "Rectangular" Then
a = PositionX + Base / 2 + CenterEast - LengthX / 2
b = PositionY + Length / 2 - CenterNorth - LengthY / 2
With ActiveSheet.Shapes.AddShape(_
msoShapeRectangle, a, b, LengthX, LengthY)
.Line.DashStyle = msoLineSolid
.Fill.ForeColor.RGB = RGB(250, 250, 250)
End With
Else
MsgBox ("Review Data respect to Column Type, the
program accept Oval or Rectangular")
End If
Next I
'DRAW THE EARTH LINE
a = PositionX * 0.9
b = PositionY + Length + DistViews - EarthOn
c = (PositionX + Base) * 1.1
d = PositionY + Length + DistViews - EarthOn
With ActiveSheet.Shapes.AddLine(a, b, c, d).Line
.DashStyle = msoLineSolid
.ForeColor.RGB = RGB(50, 0, 128)
End With
a = (PositionX + Base + DistViews) * 0.9
b = PositionY + Length - Thickness - EarthOn
c = (PositionX + Base + DistViews + Length) * 1.1
d = PositionY + Length - Thickness - EarthOn
With ActiveSheet.Shapes.AddLine(a, b, c, d).Line
.DashStyle = msoLineSolid
.ForeColor.RGB = RGB(50, 0, 128)
End With
'DRAW THE ELEVATION VIEW OF COLUMNS
For I = 1 To Ncols
LengthX = ActiveSheet.Cells(fila + I, 4) * ScaleX
LengthY = ActiveSheet.Cells(fila + I, 5) * ScaleY
HeightCol = ActiveSheet.Cells(fila + I, 6) * ScaleY
CenterEast = ActiveSheet.Cells(fila + I, 8) * ScaleX
CenterNorth = ActiveSheet.Cells(fila + I, 9)*ScaleY
a = PositionX + Base / 2 + CenterEast - LengthX / 2
b = PositionY + Length + DistViews - HeightCol
With ActiveSheet.Shapes.AddShape(_
msoShapeRectangle, a, b, LengthX, HeightCol)
.Line.DashStyle = msoLineSolid
.Fill.ForeColor.RGB = RGB(250, 250, 250)
End With
a = PositionX + Base + DistViews + Length * Fact /2 _ +
CenterNorth * Fact - LengthY * Fact / 2
b = PositionY + Length - Thickness - HeightCol
With ActiveSheet.Shapes.AddShape(_
msoShapeRectangle, a, b, LengthY * Fact, HeightCol)
.Line.DashStyle = msoLineSolid
.Fill.ForeColor.RGB = RGB(250, 250, 250)
End With
Next I
End Sub
Figure 8. VBA Code to Draw the Proposed Footing (part III / III)
Figure 9. Spreadsheet to Verify Reinforced Concrete Beams (Part I / III)
Figure 9. Spreadsheet to Verify Reinforced Concrete Beams (Part II / III)
Conclusions
These spreadsheets with the help of scaled graphic commands are very useful educational tools;
they permit the student trials with different materials, geometry and other variables. The
graphical spreadsheets avoid impractical solutions, mainly because the designer can visualize the
possible design. As the spreadsheet is easy to change, the students can create their own
spreadsheet based on the one given by the instructor.
Finally, the students may perform their own research about the relative importance of the
parameters involved in the design. These tools are practically virtual laboratories.
Bibliography
1. Microsoft Office Excel 2003, part of Microsoft Office Professional Edition 2003. Microsoft Corporation.
2. Bowles, Joseph E., “Foundation Analysis and Design”, 4th
Ed., McGraw-Hill, 1998.
3. American Concrete Institute, ACI 318-05, Building Code Requirements for Structural Concrete and
Commentaries.
Acknowledgement
The authors want recognize the support of Scholars Academy of the University of Houston Downtown for their
support.
Figure 9. Spreadsheet to Verify Reinforced Concrete Beams (Part III / III)
Location of The Drawing:
column 2
row 10
Correction Factors for Scale
Scale Factor: 4.27
Page Zoom: 1
Horizontal 1
Vertical 1.083
View publication stats
View publication stats

More Related Content

PDF
Microsoft Offices Excel application allows users to store, model a.pdf
PPTX
DATA SCIENCE TRAINING IN HYDERABAD
PDF
The Art of Data Visualization in Microsoft Excel for Mac.pdf
DOCX
MS-Excel
PPT
Karan Goyal
PDF
Funções DAX.pdf
PDF
Documents.pub sigmaplot 13-smit-principal-components-analysis-principal-compo...
PPT
Teachcht
Microsoft Offices Excel application allows users to store, model a.pdf
DATA SCIENCE TRAINING IN HYDERABAD
The Art of Data Visualization in Microsoft Excel for Mac.pdf
MS-Excel
Karan Goyal
Funções DAX.pdf
Documents.pub sigmaplot 13-smit-principal-components-analysis-principal-compo...
Teachcht

Similar to Ac_2007_397_Use_of_Spreadsheets_with_Sca.pdf (20)

PPT
Office excel tips and tricks 201101
DOCX
Lab file on research methodology
PPTX
How to Insert a Graph into Microsoft Excel 2007
PPT
Creating & Editing Charts In Microsoft Excel 2003
PDF
$5 COUPON LINK - Excel Udemy Course: Excel with Excel Dynamic Graphs, Dashboa...
PDF
Microsoft Excel Dashboards and Their Features.pdf
DOCX
computer applications in business unit 3
PDF
Microsoft Excel: A Comprehensive Overview
PDF
Business Analytics 1 Module 4.pdf
PPT
Model Assistant Suite
PPTX
Technology in maths and maths in technology
PPTX
Data Visualization.pptx
PPTX
Elevate Your AutoCAD Assignments: Unleash Your Designing Potential!
PPTX
Introductions to spreadsheets
PDF
IBM SPSS Custom Tables create custom tabls inn no time.pdf
PDF
Programming with Mathcad Prime
PDF
Me 443 4 plotting curves Erdi Karaçal Mechanical Engineer University of Gaz...
PPT
How to Insert a Graph Into Microsoft Excel 2007
PDF
AutoCad 2D shortcut Keys
PDF
Dealing with data-excel
Office excel tips and tricks 201101
Lab file on research methodology
How to Insert a Graph into Microsoft Excel 2007
Creating & Editing Charts In Microsoft Excel 2003
$5 COUPON LINK - Excel Udemy Course: Excel with Excel Dynamic Graphs, Dashboa...
Microsoft Excel Dashboards and Their Features.pdf
computer applications in business unit 3
Microsoft Excel: A Comprehensive Overview
Business Analytics 1 Module 4.pdf
Model Assistant Suite
Technology in maths and maths in technology
Data Visualization.pptx
Elevate Your AutoCAD Assignments: Unleash Your Designing Potential!
Introductions to spreadsheets
IBM SPSS Custom Tables create custom tabls inn no time.pdf
Programming with Mathcad Prime
Me 443 4 plotting curves Erdi Karaçal Mechanical Engineer University of Gaz...
How to Insert a Graph Into Microsoft Excel 2007
AutoCad 2D shortcut Keys
Dealing with data-excel
Ad

Recently uploaded (20)

PPT
6.1 High Risk New Born. Padetric health ppt
PPTX
Overview of calcium in human muscles.pptx
PPTX
Seminar Hypertension and Kidney diseases.pptx
PDF
The Land of Punt — A research by Dhani Irwanto
PPTX
TOTAL hIP ARTHROPLASTY Presentation.pptx
PPTX
Hypertension_Training_materials_English_2024[1] (1).pptx
PDF
Assessment of environmental effects of quarrying in Kitengela subcountyof Kaj...
PDF
Lymphatic System MCQs & Practice Quiz – Functions, Organs, Nodes, Ducts
PPTX
CORDINATION COMPOUND AND ITS APPLICATIONS
PPTX
Fluid dynamics vivavoce presentation of prakash
PPTX
Biomechanics of the Hip - Basic Science.pptx
PDF
Worlds Next Door: A Candidate Giant Planet Imaged in the Habitable Zone of ↵ ...
PDF
Looking into the jet cone of the neutrino-associated very high-energy blazar ...
PDF
BET Eukaryotic signal Transduction BET Eukaryotic signal Transduction.pdf
PDF
Biophysics 2.pdffffffffffffffffffffffffff
PDF
lecture 2026 of Sjogren's syndrome l .pdf
PPT
veterinary parasitology ````````````.ppt
PPTX
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
PPT
Heredity-grade-9 Heredity-grade-9. Heredity-grade-9.
PPTX
Application of enzymes in medicine (2).pptx
6.1 High Risk New Born. Padetric health ppt
Overview of calcium in human muscles.pptx
Seminar Hypertension and Kidney diseases.pptx
The Land of Punt — A research by Dhani Irwanto
TOTAL hIP ARTHROPLASTY Presentation.pptx
Hypertension_Training_materials_English_2024[1] (1).pptx
Assessment of environmental effects of quarrying in Kitengela subcountyof Kaj...
Lymphatic System MCQs & Practice Quiz – Functions, Organs, Nodes, Ducts
CORDINATION COMPOUND AND ITS APPLICATIONS
Fluid dynamics vivavoce presentation of prakash
Biomechanics of the Hip - Basic Science.pptx
Worlds Next Door: A Candidate Giant Planet Imaged in the Habitable Zone of ↵ ...
Looking into the jet cone of the neutrino-associated very high-energy blazar ...
BET Eukaryotic signal Transduction BET Eukaryotic signal Transduction.pdf
Biophysics 2.pdffffffffffffffffffffffffff
lecture 2026 of Sjogren's syndrome l .pdf
veterinary parasitology ````````````.ppt
ognitive-behavioral therapy, mindfulness-based approaches, coping skills trai...
Heredity-grade-9 Heredity-grade-9. Heredity-grade-9.
Application of enzymes in medicine (2).pptx
Ad

Ac_2007_397_Use_of_Spreadsheets_with_Sca.pdf

  • 1. AC 2007-397: USE OF SPREADSHEETS WITH SCALED GRAPHICS TO TEACH STRUCTURAL ENGINEERING Jorge Tito-Izquierdo, University of Houston-Downtown Alberto Gomez-Rivas, University of Houston-Downtown Alberto Gomez-Rivas is Professor of Structural Analysis and Chair of Engineering Technology. Dr. Gomez-Rivas received Ph.D. degrees from the University of Texas, Austin, Texas, in Civil Engineering and from Rice University, Houston, Texas, in Economics. He received the Ingeniero Civil degree, with Honors, from the Universidad Javeriana in Bogotá, Colombia. He also served as Chief of Colombia’s Department of Transportation Highway Bridge Division © American Society for Engineering Education, 2007
  • 2. Use of Spreadsheets with Scaled Graphics to Teach Structural Engineering Abstract Engineering is a profession where graphical presentation is very important in understanding and verifying results. Geometric proportions, spacing, and other features can be clearly perceived if a scaled graph is displayed together with the calculations, and thus, the engineering student can make better decisions about the final design. Overall, these spreadsheets with graphical capabilities help the learning process. The use of Excel spreadsheets in engineering education and professional practice is frequent because this tool is versatile and powerful. However, a deficiency of spreadsheets is the lack of graphic representation. This may be solved by using the programming tools of Visual Basic for Applications (VBA) that is included in the package of Microsoft Office. This paper presents a method to include scaled graphs into a spreadsheet, which completes the engineering calculations and helps in the final decision to accept or modify a design. These graphs are also useful in the drafting process, because the graphs can be easily transferred into any computer assisted drafting (CAD) program. Several actual class examples are included. Introduction Spreadsheets are frequently used as helpful tools during the structural design process, especially when the final outcome involves assumptions that require verification including design of beams, columns, channel sections, retaining walls, and footings, between others. Engineering is a profession where graphical presentation is very important in understanding and verifying results. Also, geometric proportions, spacing, and other features can be clearly perceived if a scaled graph is displayed on the spreadsheet, and thus, the engineer can make better decisions about the final design. The use of Microsoft Excel spreadsheets in engineering education and professional practice is frequent because this tool is versatile and powerful. However, a deficiency of spreadsheets is the lack of geometric presentation graphics and therefore, understanding of the results. This may be solved by using the programming tools of Visual Basic for Applications (VBA) that is included with the standard package of Microsoft Office1 . This paper outlines one method to include scaled graphs into a spreadsheet; this graph presentation completes the engineering calculations and helps in the final decision to accept or modify a design. These graphs are also useful in the drafting process, because the graphs can be copy-pasted into any computer assisted drafting (CAD) program. Several actual class examples are included. Prior to running the VBA program, the drawing data is listed and organized on the spreadsheet. VBA can then be accessed using a command button. The program follows a routine, consisting of reading the geometric data and desired scale, the location where the drawing will be
  • 3. displayed, application of a suitable scale factor to the geometric data, drawing the geometry, and applying any special effects such as color or lines. Spreadsheets with graphic capabilities improve the learning curve of the students, principally for topics involving design. Furthermore, these spreadsheets have a component of trial and error, since modification of input parameters and obtaining a final modified result is simple, quick, and straightforward. Thus, the use of Excel spreadsheets with subsequent VBA processing has been found by the authors to be an effective and useful tool in facilitating student learning in structural design courses. Spreadsheet Organization The spreadsheet may be organized according to the necessity of the problem; generally it is organized as input, partial calculations, results and graphics. The students are encouraged to prepare a template in order to organize the presentation just once. This template may be used for different purposes. The template provides the typical information required for professional calculation sheets. A good printout, with the corresponding references, sketches and commentaries is a requisite for future use of the spreadsheet. Sketches, where the variables are described, still may complement the input process as shown in Figure 1. This sketch is done using the drawing tools of excel, without scale. The sketch may be improved using the VBA tools “text box” or “label”, which can be linked to the data input in the corresponding cell. Figure 2 describes a method to include the input data into the sketch. Figure 1. Sketch used to describe the variables.
  • 4. The input data is located in one block, marked with clear color because the print out in black and white is clearer. The cells used for input shall be un-locked permitting the use of a protection for all the spreadsheet, except the input cells. a. From the toolbox of VBA select label or text box. Drag the icon to the sketch, together with the description. b. In the ‘formula bar’ of excel replace the default command (EMBED…..) by the cell correspondent to the variable to be described. c. The VBA tool and the description can be grouped for clarity. If the description is back of the tool, use the ‘send to front’ excel tool of ‘Draw’. d. Group both the VBA tool and the description. Figure 2. Sequence to Include the Input Data into the Sketch
  • 5. Intermediate calculations are performed using Excel functions. VBA becomes more effective when the calculations involve iterations or a significant amount of conditionals. The problem conclusions may be presented using the capabilities of Excel, presenting programmed comments if the assumptions satisfy the design criteria. Finally, and this is the main objective of this paper, the spreadsheet can present a scaled drawing of the problem. If the drawing has too much information, it is better to present a new sheet exclusive for the drawing. In the new spreadsheet there is no input, all the information respect to the problem is automatically imported from the calculation sheet. Only the drafting related information is manipulated on this sheet, such as scale and location of the drawing. Drawing using VBA Scale definition. Create a scale options for the user. The Excel’s “Data Validation” tool may be used to select the required scale for the drawing. This tool is found in Data – Validation – Setting – List, as shown in Figure 3. Figure 3. Scale selection Click on tab and select the scale wanted
  • 6. When the scale is selected, the program employs the “vlookup” function and opts for a factor that is used to scale the coordinates, as indicated in Figure 3. The user adjusts the modification factors for horizontal and vertical dimensions accordingly to the printer available. The zoom factor depends on the percentage of the normal size selected in the page setup for the spreadsheet and it can be automatically found using the VBA expression “ActiveSheet.PageSetup.Zoom / 100”. The scale factor, the modification factors and the zoom factor are used to scale the point coordinates useful for drawing. Delete Old Drawings. This control button is necessary to clear the spreadsheet of old lines, circles, or any other drawing. The VBA code is shown in Figure 4. This Delete button shall be activated (clicked) before the drawing of the final sketch. Drawing Location. The drawing can be located in the place where better adjust for the user. VBA defines the origin of coordinates in the upper left corner of the screen, the x-axis is positive toward right and the y-axis is positive downward. It is possible to translate the origin to other position using the columns and rows of the spreadsheet. The width of each column and the height of each row are defined in “points”, each point is 1/72 inch, and they may be found using VBA codes. The code given in Figure 5 helps to move the origin of coordinates to the desired position. Private Sub cmdEraser_Click() Set myShapes = ActiveSheet.Shapes 'Delete Polylines For Each shp In myShapes If Left(shp.Name, 8) = "Freeform" Then shp.Delete End If Next 'Delete Lines For Each shp1 In myShapes If Left(shp1.Name, 4) = "Line" Then shp1.Delete End If Next 'Delete Rectangles For Each shp1 In myShapes If Left(shp1.Name, 9) = "Rectangle" Then shp1.Delete End If Next 'Delete Shapes For Each shp1 In myShapes If Left(shp1.Name, 9) = "AutoShape" Then shp1.Delete End If Next 'Delete Text Box For Each shp1 In myShapes If Left(shp1.Name, 8) = "Text Box" Then shp1.Delete End If Next 'Delete oval For Each shp1 In myShapes If Left(shp1.Name, 4) = "Oval" Then shp1.Delete End If Next End Sub Figure 4. VBA Code to Delete Old Drawings in the Spreadsheet
  • 7. Reading Data. Using the standard commands of VBA, the input data is read from the spreadsheet and stored in previously dimensioned VBA variables. It is preferable to define with explicit names the cells to be used as input, as this permits future changes in the spreadsheet without affecting the original programming. For example, the cell V33, which defines the scale factor, may be called “Scale1” in the spreadsheet using the function “insert-name-define”, as shown in Figure 3. Note that the name of the cells is case-sensitive. Table 1. Data Needed to Draw Objects in VBA Object Coordinates of Dimensions Code Line Start and End -- Shapes.AddLine Xstart,Ystart,Xend,Yend Rectangle Lower left corner. ‘Y’ is positive downward Width and Height Shapes.AddShape msoShapeRectangle, X, Y, Width, Height Oval or circle Center Width and Height Shapes.AddShape msoShapeOval, X, Y, Width, Height Polyline Vertices of the polygon. It may be opened or closed. The coordinates shall be stored in an array Dim CoordPoints(1 To M, 1 To N) As Single CoordPoints (1, 1) = a CoordPoints (1, 2) = b …. CoordPoints (2, 1) = c CoordPoints (2, 2) = d …. CoordPoints (M, 1) = e …. CoordPoints (M, N) = f Shapes.AddPolyline CoordPoints Column and Row desired for the origin of coordinates for the drawing Figure 5. Excel Input Cells and VBA Code to Find the Origin of Coordinates for the Drawing myColum1 myRow1
  • 8. Drawing. The dimensions corrected by the scale and modification factors, used for the scaled drawing, shall be assigned to different variables in order to maintain the original dimensions for other purposes. The drawing may be performed using different geometric options. It may be used different objects, like circles, rectangles, polylines, lines, text boxes, etc. It is important to define the coordinates of the shape respect to the origin of the drawing previously defined, remembering that VBA always use the positive x-axis toward the right and the y-axis downward of the screen. The VBA codes have options to change the line width, color, continuity, and other attributes of the object. VBA has specific codes to draw each one of the objects. Table 1 shows the coordinates needed to draw some objects. VBA has a help function that is a good start for the code writing. Examples Footing Design. In this example, the dimension of a footing is input to the excel spreadsheet to verify the soil capacity using the classical methods of foundation engineering2 . After the verification of the soil pressures, the foundation is drawn using the VBA code in another spreadsheet. This combination of analysis and drafting allows the student to visualize the problem and the solution found, appreciating the effect of the different parameters, like a virtual laboratory. Figure 6 shows the spreadsheet used to verify the foundation. This spreadsheet computes the geometric properties of the footing, combine the loads, translate the loads from the top of the pedestal to the bottom of the footing, computes the soil pressure in the four corners of the footing, and compare the allowable soil bearing pressure with the actual soil stress. Figure 7 shows the scaled drawing of the different views of the footing, which is done using VBA; this drawing can be exported to other Computed Assisted Drafting (CAD) programs. Figure 8 shows the VBA programming code to make the drawing. The programming code is divided in data reading, location of the origin, and drawing, as explained before. Reinforced Concrete Design – Beams. This spreadsheet permits the user verify a given cross section of a rectangular or T-beam, including the longitudinal steel and stirrups. The spreadsheet is based on the ACI-318-053 . The user can input the geometry with the help of sketches and the steel dimensions for each layer of reinforcement. Excel functions are used to verify the beam capacity and a different sheet is used to present a scaled cross section of the beam. Figure 9 shows the spreadsheet calculations and the scaled drawing. Using this spreadsheet, the student can appreciate the geometry of the beam, the location and size of the rebar and the stirrup with the specified cover. All this information is important for the beam design and it can be copied to the final drawings. This spreadsheet is also used to study the effect of the change of the design parameters on the final design, permitting the global understanding of the reinforced concrete beam design.
  • 9. Figure 6. Spreadsheet to Verify the Soil Pressure under a Proposed Footing (Part I / III)
  • 10. Figure 6. Spreadsheet to Verify the Soil Pressure under a Proposed Footing (Part II / III)
  • 11. Figure 6. Spreadsheet to Verify the Soil Pressure under a Proposed Footing (Part III / III)
  • 12. Figure 7. Scaled Drawing of the Proposed Footing Designed and Data Necessary
  • 13. Private Sub cmdDrawFooting_Click() Dim Ncolumns, I As Integer Dim Scale1, myColumn, myRow, myZoom As Double Dim PositionX, PositionY, ModifX, ModifY As Double Dim ScaleX, ScaleY, Fact, ColEarthDist As Double Dim Base, Length, Thickness, DistViews As Double Dim Base1, Length1, Thickness1 As Double Dim Longi As String Dim Radius, CenterEast, CenterNorth As Double Dim EarthOn, FoundDepth As Double Dim Ncols, fila As Integer Dim TypeCol As String Dim LengthX, LengthY, HeightCol As Double 'GENERAL INPUT DATA 'Modify scale according to the printer used ModifX = ActiveSheet.Range("ModifX") ModifY = ActiveSheet.Range("ModifY") Fact = ModifX / ModifY Base1 = ActiveSheet.Range("Base1") Length1 = ActiveSheet.Range("Heigth1") Thickness1 = ActiveSheet.Range("Thickness1") 'The Scale of the lines is defined. Correct for a PageSetup 'different of 100% ActiveSheet.Range("MyZoom") = ActiveSheet.PageSetup.Zoom / 100 myZoom = ActiveSheet.PageSetup.Zoom / 100 Scale1 = ActiveSheet.Range("Scale1") / myZoom ScaleX = Scale1 * ModifX ScaleY = Scale1 * ModifY 'Read Earth Depth on Footing EarthOn = Range("EarthOn") * ScaleY FoundDepth = Range("EarthOn") + Thickness1 ColEarthDist = Range("ColEarthDist") 'LOCATE THE POSITION (0,0) 'PositionX and PositionY are the new coordinates in 'points of the origin for the drawing PositionX = 0 PositionY = 0 myColumn = ActiveSheet.Range("myColumn1") 'Read the Location desired for the Drawing myRow = ActiveSheet.Range("myRow1") 'Read 'the Location desired for the Drawing 'Loop to find the value in points of origin to be used 'for the drawing For I = 1 To myColumn PositionX = PositionX + ActiveSheet.Columns(I).Width Next I For I = 1 To myRow PositionY = PositionY + ActiveSheet.Rows(I).Height Next I 'Variables for drawing Base = Base1 * ScaleX Length = Length1 * ScaleY Thickness = Thickness1 * ScaleY DistViews = Range("DistViews") * ScaleY ‘DRAWING 'DRAW RECTANGLE: Plan View a = PositionX b = PositionY c = Base d = Length With_ ActiveSheet.Shapes.AddShape(msoShapeRectangle,_ a, b, c, d) .Line.DashStyle = msoLineSolid .Fill.ForeColor.RGB = RGB(255, 255, 255) End With 'DRAW RECTANGLE: South View a = PositionX b = PositionY + Length + DistViews c = Base d = Thickness With _ ActiveSheet.Shapes.AddShape(_ msoShapeRectangle, a, b, c, d) .Line.DashStyle = msoLineSolid .Fill.ForeColor.RGB = RGB(255, 255, 255) End With 'DRAW RECTANGLE: East View a = PositionX + Base + DistViews b = PositionY + Length - Thickness c = Length * Fact d = Thickness With ActiveSheet.Shapes.AddShape(_ msoShapeRectangle, a, b, c, d) .Line.DashStyle = msoLineSolid .Fill.ForeColor.RGB = RGB(255, 255, 255) End With 'DRAW AXIS X or EAST-WEST a = PositionX + Base / 2 b = PositionY + Length / 2 c = PositionX + Base + DistViews * 0.5 d = b With ActiveSheet.Shapes.AddLine(a, b, c, d).Line .DashStyle = msoLineDashDotDot .ForeColor.RGB = RGB(125, 0, 0) .EndArrowheadLength = msoArrowheadLong .EndArrowheadStyle = msoArrowheadTriangle .EndArrowheadWidth = msoArrowheadWide End With Figure 8. VBA Code to Draw the Proposed Footing (part I / III)
  • 14. With ActiveSheet.Shapes.AddTextbox(_ msoTextOrientationHorizontal, c, d, 15, 15) .Line.Transparency = 1 .TextFrame.Characters.Text = "E" End With 'DRAW AXIS Y OR SOUTH-NORTH a = PositionX + Base / 2 b = PositionY + Length / 2 c = a d = PositionY + Length / 2 - Length With ActiveSheet.Shapes.AddLine(a, b, c, d).Line .DashStyle = msoLineDashDotDot .ForeColor.RGB = RGB(125, 0, 0) .EndArrowheadLength = msoArrowheadLong .EndArrowheadStyle = msoArrowheadTriangle .EndArrowheadWidth = msoArrowheadWide End With With ActiveSheet.Shapes.AddTextbox(_ msoTextOrientationHorizontal, c * 1.03, d, 15, 15) .Line.Transparency = 1 .TextFrame.Characters.Text = "N" End With 'WRITE DIMENSIONS 'Write Base in the Plan-View a = PositionX + Base / 2 - 20 b = PositionY + Length + 10 Longi = Int(Base1) & "'-" & Round((Base1 - Int(Base1)) * 12, 1) & """" With ActiveSheet.Shapes.AddTextbox(_ msoTextOrientationHorizontal, a, b, 40, 15) .Line.Transparency = 1 .TextFrame.Characters.Text = Longi '.Fill.ForeColor.RGB = RGB(250, 0, 250) End With a = PositionX + Base / 2 - 20 b = PositionY + Length + 25 Longi = "PLAN VIEW" With ActiveSheet.Shapes.AddTextbox(_ msoTextOrientationHorizontal, a, b, 80, 15) .Line.Transparency = 1 .TextFrame.Characters.Text = Longi End With 'Write Base in the South-View a = PositionX + Base / 2 - 20 b = PositionY + Length + Thickness + DistViews + 10 Longi = Int(Base1) & "'-" & Round((Base1 - Int(Base1)) * 12, 1) & """" With ActiveSheet.Shapes.AddTextbox(_ msoTextOrientationHorizontal, a, b, 40, 15) .Line.Transparency = 1 .TextFrame.Characters.Text = Longi End With a = PositionX + Base / 2 - 20 b = PositionY +Length+ Thickness + DistViews + 25 Longi = "SOUTH VIEW" With ActiveSheet.Shapes.AddTextbox(_ msoTextOrientationHorizontal, a, b, 80, 15) .Line.Transparency = 1 .TextFrame.Characters.Text = Longi End With 'Write Length in the Plan-View a = PositionX - 40 b = PositionY + Length / 2 Longi = Int(Length1) & "'-" & _ Round((Length1 - Int(Length1)) * 12, 1) & """' " With ActiveSheet.Shapes.AddTextbox(_ msoTextOrientationUpward, a, b, 15, 40) .Line.Transparency = 1 .TextFrame.Characters.Text = Longi End With 'Write Length in the East-View a = PositionX + Base + DistViews + Base / 2 - 45 b = PositionY + Length + 15 Longi = Int(Length1) & "'-" & Round((Length1 - Int(Length1)) * 12, 1) & """' " With ActiveSheet.Shapes.AddTextbox(_ msoTextOrientationHorizontal, a, b, 45, 15) .Line.Transparency = 1 .TextFrame.Characters.Text = Longi End With a = PositionX + Base + DistViews + Base / 2 - 60 b = PositionY + Length + 35 Longi = "EAST VIEW" With ActiveSheet.Shapes.AddTextbox(_ msoTextOrientationHorizontal, a, b, 60, 15) .Line.Transparency = 1 .TextFrame.Characters.Text = Longi End With 'Write Thickness in the East-View a = PositionX + Base + DistViews - 20 b = PositionY + Length - Thickness / 2 - 12 Longi = Int(Thickness1) & "'-" & Round((Thickness1 - Int(Thickness1)) * 12, 1) & _ """" With ActiveSheet.Shapes.AddTextbox(_ msoTextOrientationUpward, a, b, 15, 25) .Line.Transparency = 1 .TextFrame.Characters.Text = Longi End With 'Write Thickness in the South-View a = PositionX - 25 b = PositionY + Length + DistViews + Thickness / 2 - 10 Longi = Int(Thickness1) & "'-" & Round((Thickness1 - Int(Thickness1)) * 12, 1) & """ " Figure 8. VBA Code to Draw the Proposed Footing (part II / III)
  • 15. With ActiveSheet.Shapes.AddTextbox(_ msoTextOrientationUpward, a, b, 15, 25) .Line.Transparency = 1 .TextFrame.Characters.Text = Longi End With 'Write Earth-Depth in the South-View a = PositionX + Base + 40 b = PositionY + Length + DistViews + Thickness - FoundDepth * ScaleY / 2 - 10 Longi = Int(FoundDepth) & "'-" & Round((FoundDepth - Int(FoundDepth)) * 12, 1) & """ " With ActiveSheet.Shapes.AddTextbox(_ msoTextOrientationUpward, a, b, 15, 25) .Line.Transparency = 1 .TextFrame.Characters.Text = Longi End With 'DRAW THE PLAN VIEW OF COLUMNS Ncols = ActiveSheet.Range("Ncols") fila = Range("Ncols").Row + 1 For I = 1 To Ncols TypeCol = ActiveSheet.Cells(fila + I, 2) LengthX = ActiveSheet.Cells(fila + I, 4) * ScaleX LengthY = ActiveSheet.Cells(fila + I, 5) * ScaleY CenterEast = ActiveSheet.Cells(fila + I, 8) * ScaleX CenterNorth = ActiveSheet.Cells(fila + I, 9) * ScaleY If TypeCol = "Oval" Then a = PositionX + Base / 2 + CenterEast - LengthX / 2 b = PositionY + Length / 2 - CenterNorth - LengthY/2 With ActiveSheet.Shapes.AddShape(_ msoShapeOval, a, b, LengthX, LengthY) .Line.DashStyle = msoLineSolid .Fill.ForeColor.RGB = RGB(250, 250, 250) End With ElseIf TypeCol = "Rectangular" Then a = PositionX + Base / 2 + CenterEast - LengthX / 2 b = PositionY + Length / 2 - CenterNorth - LengthY / 2 With ActiveSheet.Shapes.AddShape(_ msoShapeRectangle, a, b, LengthX, LengthY) .Line.DashStyle = msoLineSolid .Fill.ForeColor.RGB = RGB(250, 250, 250) End With Else MsgBox ("Review Data respect to Column Type, the program accept Oval or Rectangular") End If Next I 'DRAW THE EARTH LINE a = PositionX * 0.9 b = PositionY + Length + DistViews - EarthOn c = (PositionX + Base) * 1.1 d = PositionY + Length + DistViews - EarthOn With ActiveSheet.Shapes.AddLine(a, b, c, d).Line .DashStyle = msoLineSolid .ForeColor.RGB = RGB(50, 0, 128) End With a = (PositionX + Base + DistViews) * 0.9 b = PositionY + Length - Thickness - EarthOn c = (PositionX + Base + DistViews + Length) * 1.1 d = PositionY + Length - Thickness - EarthOn With ActiveSheet.Shapes.AddLine(a, b, c, d).Line .DashStyle = msoLineSolid .ForeColor.RGB = RGB(50, 0, 128) End With 'DRAW THE ELEVATION VIEW OF COLUMNS For I = 1 To Ncols LengthX = ActiveSheet.Cells(fila + I, 4) * ScaleX LengthY = ActiveSheet.Cells(fila + I, 5) * ScaleY HeightCol = ActiveSheet.Cells(fila + I, 6) * ScaleY CenterEast = ActiveSheet.Cells(fila + I, 8) * ScaleX CenterNorth = ActiveSheet.Cells(fila + I, 9)*ScaleY a = PositionX + Base / 2 + CenterEast - LengthX / 2 b = PositionY + Length + DistViews - HeightCol With ActiveSheet.Shapes.AddShape(_ msoShapeRectangle, a, b, LengthX, HeightCol) .Line.DashStyle = msoLineSolid .Fill.ForeColor.RGB = RGB(250, 250, 250) End With a = PositionX + Base + DistViews + Length * Fact /2 _ + CenterNorth * Fact - LengthY * Fact / 2 b = PositionY + Length - Thickness - HeightCol With ActiveSheet.Shapes.AddShape(_ msoShapeRectangle, a, b, LengthY * Fact, HeightCol) .Line.DashStyle = msoLineSolid .Fill.ForeColor.RGB = RGB(250, 250, 250) End With Next I End Sub Figure 8. VBA Code to Draw the Proposed Footing (part III / III)
  • 16. Figure 9. Spreadsheet to Verify Reinforced Concrete Beams (Part I / III)
  • 17. Figure 9. Spreadsheet to Verify Reinforced Concrete Beams (Part II / III)
  • 18. Conclusions These spreadsheets with the help of scaled graphic commands are very useful educational tools; they permit the student trials with different materials, geometry and other variables. The graphical spreadsheets avoid impractical solutions, mainly because the designer can visualize the possible design. As the spreadsheet is easy to change, the students can create their own spreadsheet based on the one given by the instructor. Finally, the students may perform their own research about the relative importance of the parameters involved in the design. These tools are practically virtual laboratories. Bibliography 1. Microsoft Office Excel 2003, part of Microsoft Office Professional Edition 2003. Microsoft Corporation. 2. Bowles, Joseph E., “Foundation Analysis and Design”, 4th Ed., McGraw-Hill, 1998. 3. American Concrete Institute, ACI 318-05, Building Code Requirements for Structural Concrete and Commentaries. Acknowledgement The authors want recognize the support of Scholars Academy of the University of Houston Downtown for their support. Figure 9. Spreadsheet to Verify Reinforced Concrete Beams (Part III / III) Location of The Drawing: column 2 row 10 Correction Factors for Scale Scale Factor: 4.27 Page Zoom: 1 Horizontal 1 Vertical 1.083 View publication stats View publication stats