Thursday, 29 January 2015

building envelop design (facade design)

mullion structural design vb coding 

Private Sub CommandButton1_Click()
Dim span, lstl, rstl, windpressure, moip,moipt, moii, aop, aoi, extremed,extremedt bs, bm, sm, load, sf, ss, df, tmoi, sot As Double
'**************data jhrequried**************************
span = Val(TextBox1.Text)
lstl = Val(TextBox2.Text)
rstl = Val(TextBox3.Text)
windpressure = Val(TextBox4.Text)
aop = Val(TextBox5.Text)
aoi = Val(TextBox6.Text)
moip = Val(TextBox7.Text)
moii = Val(TextBox8.Text)
extremed = Val(TextBox9.Text)
moipt = Val(TextBox10.Text)
extremedt = Val(TextBox11.Text)
'******************bending check**********************
load = ((lstl + rstl) * 0.5) * (windpressure / 1000)
bm = 0.125 * load * span ^ 2
tmoi = (moip + (moii * 3.13))
sm = tmoi / extremed
bs = bm / sm
Label1.Caption = Round(bs, 2)
'********************shear check************************
sf = load * span * 0.5
ss = sf / (aop * 3.13 + aoi)
Label2.Caption = Round(ss, 2)
'********************combined check********************
cs = (bs ^ 2 + 3 * ss ^ 2) ^ 0.5
Label3.Caption = Round(cs, 2)
'********************deflection**************************
df = (5 / 384) * (load * span ^ 4) * (1 / (65500 * tmoi))
Label4.Caption = Round(df, 2)
'*******************************************************

Area converter vb coding 


Private Sub Label7_Click()
Dim a, b, c As Double
a = Val(TextBox1.Text)
b = Val(TextBox2.Text)
c = (a * b * b) / 8
TextBox3.Text = c
End Sub
If OptionButton1.Value = True Then
 Private Sub Label1_Click()
If OptionButton1.Value = True Then
Dim a, b, c, d As Double
a = Val(TextBox1.Text)
b = a / 100
c = a / 1000000
d = a / 92903.04
TextBox2.Text = b
TextBox3.Text = c
TextBox4.Text = d
End If
If OptionButton2.Value = True Then
'Dim a, b, c, d As Double
b = Val(TextBox2.Text)
a = b * 100
c = b / 10000
d = b / 929.0304
TextBox1.Text = a
TextBox3.Text = c
TextBox4.Text = d
End If
If OptionButton3.Value = True Then
'Dim a, b, c, d As Double
c = Val(TextBox3.Text)
a = c * 1000000
b = c * 10000
d = c / 0.09290304
TextBox1.Text = a
TextBox2.Text = b
TextBox4.Text = d
End If
If OptionButton4.Value = True Then
'Dim a, b, c, d As Double
d = Val(TextBox4.Text)
a = d * 92903.04
b = d * 929.0304
c = d * 0.092903
TextBox1.Text = a
TextBox2.Text = b
TextBox3.Text = c
End If
End Sub
Private Sub Label2_Click()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
End Sub
Sub Button1_Click()
Dim number1, number2, number3 As Single
Dim total, average As Double
number1 = Cells(1, 1).Value
number2 = Cells(2, 1).Value
number3 = Cells(3, 1).Value
total = number1 + number2 + number3
average = total / 3
Cells(5, 1) = total
Cells(6, 1) = average
End Sub
Sub Button2_Click()
'Sub Button2_Click()
Cells(1, 1).Value = ""
Cells(2, 1).Value = ""
Cells(3, 1).Value = ""
Cells(5, 1).Value = ""
Cells(6, 1).Value = ""
End Sub


No comments:

Post a Comment