Frmdog - 1 Option Explicit
Frmdog - 1 Option Explicit
Option Explicit
frmDOG - 1
VERSION 5.00
Begin VB.Form frmDOG
BorderStyle = 3 'Fixed Dialog
ClientHeight = 375
ClientLeft = 5250
ClientTop = 4245
ClientWidth = 1095
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 375
ScaleWidth = 1095
ShowInTaskbar = 0 'False
Begin VB.Label Label1
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Caption = "D.O.G."
BeginProperty Font
Name = "Bookman Old Style"
Size = 9.75
Charset = 0
Weight = 600
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 0
TabIndex = 0
Top = 0
Width = 1095
End
End
frmGrafica - 1
VERSION 5.00
Object = "{02B5E320-7292-11CF-93D5-0020AF99504A}#1.0#0"; "MSCHART.OCX"
Begin VB.Form frmGrafica
Caption = "Gráfica de ..."
ClientHeight = 4905
ClientLeft = 315
ClientTop = 930
ClientWidth = 5745
Icon = (Icono)
LinkTopic = "Form1"
ScaleHeight = 4905
ScaleWidth = 5745
Begin MSChartLib.MSChart MSChart1
Height = 4695
Left = 120
TabIndex = 0
Top = 120
Width = 5535
End
End
frmGridValida - 1
End Sub
NoPuedo:
gMsg = "No se puede eliminar esta fila"
gTitulo = "IMPOSIBLE"
MsgBox gMsg, vbCritical + vbOKOnly, gTitulo
End Sub
fT = Chr(9)
With MSFlexGrid1
.Clear
.FixedRows = 1
.FixedCols = 1
.Row = 1
.col = 1
.Rows = 1
.Cols = 3
.CellAlignment = flexAlignCenterCenter
End With
'Cabecera
fEntrada = " Punto " & fT & " x " & fT & " z "
MSFlexGrid1.FormatString = fEntrada
End Sub
Unload frmGridValida
End Sub
With Text1
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
With Text2
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
If Text1.Text <> " " And Text2.Text <> " " Then
fEntrada = Str(MSFlexGrid1.Rows) & fT & Text1.Text & _
fT & Text2.Text
MSFlexGrid1.AddItem fEntrada
frmGridValida - 2
MSFlexGrid1.Refresh
End If
Text1.Text = " "
Text2.Text = " "
Text1.SetFocus
End Sub
frmGridValida - 1
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmGridValida
Caption = "Form1"
ClientHeight = 3225
ClientLeft = 4875
ClientTop = 930
ClientWidth = 6225
LinkTopic = "Form1"
ScaleHeight = 3225
ScaleWidth = 6225
Begin VB.Frame Frame2
Caption = "Editar punto "
Height = 975
Left = 3360
TabIndex = 9
Top = 1320
Width = 2775
Begin VB.TextBox Text4
Height = 285
Left = 360
TabIndex = 13
Text = "Text4"
Top = 600
Width = 975
End
Begin VB.TextBox Text3
Height = 285
Left = 360
TabIndex = 12
Text = "Text3"
Top = 240
Width = 975
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "y: "
Height = 195
Left = 120
TabIndex = 11
Top = 600
Width = 165
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "x: "
Height = 195
Left = 120
TabIndex = 10
Top = 240
Width = 165
End
End
Begin VB.CommandButton Elimina
Caption = "&Eliminar"
Height = 255
Left = 3360
TabIndex = 8
ToolTipText = "Elimina el último punto"
Top = 2400
Width = 1095
End
Begin VB.Frame Frame1
Caption = "Añadir punto "
Height = 1095
Left = 3360
TabIndex = 5
Top = 120
Width = 2775
Begin VB.CommandButton UnoMas
Caption = "&Añadir"
Height = 255
Left = 1560
TabIndex = 3
frmGridValida - 2
Option Explicit
End Sub
End Sub
Screen.MousePointer = 11
frmMain.Enabled = True
Unload frmInicial
Screen.MousePointer = 0
End Sub
frmInicial - 1
VERSION 5.00
Begin VB.Form frmInicial
ClientHeight = 2505
ClientLeft = 2265
ClientTop = 2955
ClientWidth = 7695
ControlBox = 0 'False
LinkTopic = "Form1"
ScaleHeight = 2505
ScaleWidth = 7695
Begin VB.Frame Frame1
Height = 2415
Left = 120
TabIndex = 0
Top = 0
Width = 7455
Begin VB.CommandButton Salir
Caption = "&Salir"
Height = 375
Left = 6240
TabIndex = 6
Top = 1920
Visible = 0 'False
Width = 1095
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "Beta 1.1/55 - Diciembre 1.998"
Height = 195
Left = 840
TabIndex = 5
Top = 2160
Width = 2145
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "Versión: "
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 120
TabIndex = 4
Top = 2160
Width = 765
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "José María Medina Villaverde"
BeginProperty Font
Name = "Arial Narrow"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00008000&
Height = 225
Left = 3120
TabIndex = 3
Top = 1920
Width = 1995
End
Begin VB.Label Label2
Alignment = 2 'Center
AutoSize = -1 'True
frmInicial - 2
Option Explicit
Seguir:
Screen.MousePointer = 11
f = FreeFile
fila = Val(Label10.Caption)
Open file For Output As #f
If Right(file, 3) = "pro" Then Print #f, Fich.Columnas
For j = 1 To Fich.Columnas
X = gDx * (j - 1)
Print #f, Str(X); " ,"; Str(gZ(fila, j))
Next j
Close #f
GoTo Salgamos
NoExiste:
Resume Seguir
Salgamos:
Screen.MousePointer = 0
End Sub
Screen.MousePointer = 11
file = Label4.Caption
On Error GoTo NoFile
k = FileLen(file) 'Para ver si existe el archivo
On Error GoTo 0
Call TipoGrd(file)
Picture1.Cls
Select Case Fich.Clase
Case Is = "DSAA"
Call leeASCI(file)
Case Is = "DSBB"
Call LeeBinario(file)
End Select
Playa_Cilindrica.Enabled = True
A_Grapher.Enabled = True
Screen.MousePointer = 0
Exit Sub
frmMain - 2
NoFile:
Screen.MousePointer = 0
Call NoHay
End Sub
End Sub
Frame12.Enabled = True
Call NameFile
frmGridValida.Show
End Sub
gAntes = Check1.Value
End Sub
Check1.Value = gAntes
End Sub
gAntes = Check2.Value
End Sub
Check2.Value = gAntes
End Sub
gAntes = Check3.Value
End Sub
Check3.Value = gAntes
End Sub
gAntes = Check4.Value
End Sub
Check4.Value = gAntes
End Sub
Screen.MousePointer = 11
Call Inicializa_Picture1
fila = Val(Label10.Caption)
If fila = 0 Then
Dibujo.Enabled = False
Playa_Cilindrica.Enabled = False
Exit Sub
End If
f = FreeFile
Picture1.Cls
End Sub
End Sub
Sub Enable_todo()
mnuModel.Enabled = True
Toolbar2.Buttons(1).Enabled = True
Toolbar2.Buttons(2).Enabled = True
End Sub
Sub Disable_todo()
mnuModel.Enabled = False
mnuResults.Enabled = False
Toolbar2.Buttons(1).Enabled = False
Toolbar2.Buttons(2).Enabled = False
Toolbar3.Buttons(1).Enabled = False
Check1.Value = 0
Check2.Value = 0
Check3.Value = 0
ProgressBar1.Value = ProgressBar1.min
End Sub
Private Sub Info()
Case Else
Frame10.Visible = False
Frame9.Visible = False
Frame8.Visible = False
Frame7.Visible = False
Frame6.Visible = False
Frame5.Visible = False
End Select
frmMain - 4
End Sub
Private Sub PillaFoco()
frmMain.Refresh
End Sub
Call PillaFoco
End Sub
StatusBar1.Panels.Add
StatusBar1.Panels.Add
StatusBar1.Panels.Add
StatusBar1.Panels(1).AutoSize = sbrContents
StatusBar1.Panels(2).AutoSize = sbrContents
StatusBar1.Panels(4).AutoSize = sbrContents
StatusBar1.Panels(1).Alignment = sbrCenter
StatusBar1.Panels(2).Text = "No hay proyecto abierto"
StatusBar1.Panels(3).Visible = False
End Sub
End Sub
Private Sub RemoveResultados()
Salir:
End Sub
Private Sub PopulateTreeViewResultados()
TreeView1.Nodes(1).Expanded = True
TreeView1.Nodes(6).Expanded = False
TreeView1.Nodes(10).Expanded = False
End Sub
Call NoXY
Call Ayuda(" ")
End Sub
Call NoXY
End Sub
End Sub
Call NoXY
Call Ayuda("Información sobre el proyecto")
End Sub
End Sub
End Sub
Call LimpiaTexto1
Call RemoveResultados
Call NoProyectoStatus
Call Disable_todo
Salir:
End Sub
End Sub
Screen.MousePointer = 11
frmOlas.Show
frmMain.Enabled = False
Screen.MousePointer = 0
End Sub
max = 21
Call Inicializa_Picture1
Call LaSonda_Inicio("ELIMINANDO ARCHIVOS", max, 0)
f = FreeFile
On Error GoTo NoLista
Open "listaResult.dat" For Input As #f
Do While Not EOF(f)
num = num + 1
Input #f, a
Call Elimina(a, num)
Loop
Close #f
Call Elimina("listaResult.dat", max)
Fin:
Call LaSonda_Final
Exit Sub
NoLista:
gMsg = "No hay lista de resultados" & Chr(10) & _
"No se pueden eliminar los archivos"
gTitulo = "FALTAN DATOS"
MsgBox gMsg, vbInformation + vbOKOnly, gTitulo
Resume Fin
End Sub
Ficheros = 14
On Error GoTo Salida
With CommonDialog1
.CancelError = True
.DialogTitle = "Exportar archivo de resultados"
.Filter = "Resultados (*.res)|*.res|Todos los archivos (*.*)|*.*"
.Action = 1
file = .filename
File1 = .FileTitle
End With
On Error GoTo NoExiste
k = FileLen(file)
On Error GoTo 0
kk:
If gResponse = 7 Then Exit Sub
sigue:
Kill (file)
Call LaSonda_Inicio("GRABANDO ARCHIVO DE RESULTADOS", Ficheros, 0)
canal = FreeFile
Open file For Binary As #canal
f = FreeFile
On Error GoTo NoFile
frmMain.ProgressBar1.Value = 1
k = FileLen("Londa.grd")
Call LeerBin("Londa.grd")
Call WriteBin(file, canal)
frmMain.ProgressBar1.Value = 2
k = FileLen("Cgrupo.grd")
Call LeerBin("Cgrupo.grd")
Call WriteBin(file, canal)
frmMain.ProgressBar1.Value = 3
k = FileLen("Hm.grd")
Call LeerBin("Hm.grd")
Call WriteBin(file, canal)
frmMain.ProgressBar1.Value = 4
k = FileLen("Hrms.grd")
Call LeerBin("Hrms.grd")
Call WriteBin(file, canal)
frmMain.ProgressBar1.Value = 5
frmMain - 8
k = FileLen("Qb.grd")
Call LeerBin("Qb.grd")
Call WriteBin(file, canal)
frmMain.ProgressBar1.Value = 6
k = FileLen("Uorb.grd")
Call LeerBin("Uorb.grd")
Call WriteBin(file, canal)
frmMain.ProgressBar1.Value = 7
k = FileLen("Df.grd")
Call LeerBin("Df.grd")
Call WriteBin(file, canal)
frmMain.ProgressBar1.Value = 8
k = FileLen("Db.grd")
Call LeerBin("Db.grd")
Call WriteBin(file, canal)
frmMain.ProgressBar1.Value = 9
k = FileLen("E.grd")
Call LeerBin("E.grd")
Call WriteBin(file, canal)
frmMain.ProgressBar1.Value = 10
k = FileLen("Sxx.grd")
Call LeerBin("Sxx.grd")
Call WriteBin(file, canal)
frmMain.ProgressBar1.Value = 11
k = FileLen("Sxy.grd")
Call LeerBin("Sxy.grd")
Call WriteBin(file, canal)
frmMain.ProgressBar1.Value = 12
k = FileLen("Syy.grd")
Call LeerBin("Syy.grd")
Call WriteBin(file, canal)
frmMain.ProgressBar1.Value = 13
k = FileLen("Ursell.grd")
Call LeerBin("Ursell.grd")
Call WriteBin(file, canal)
frmMain.ProgressBar1.Value = 14
On Error GoTo 0
Call LaSonda_Final
Unload frmSonda
Exit Sub
NoExiste:
gTitulo = "¡¡ATENCIÓN!!"
gMsg = "El archivo " & File1 & " existe" & Chr(10) & _
"¿Sobreescribo?"
gResponse = MsgBox(gMsg, vbQuestion + vbYesNo + vbDefaultButton1, gTitulo)
Resume kk
NoFile:
gTitulo = "ERROR DE LECTURA"
gMsg = "No existe un archivo"
MsgBox gMsg, vbCritical + vbOKOnly, gTitulo
Salida:
End Sub
Sub WriteBin(file As String, canal As Integer)
End Sub
Sub LeerBin(file As String)
Dim f As Integer
f = FreeFile
Call mnuEditEliminaTodos_Click
On Error GoTo SalirOpen
If gProyectoLista = "" Then
With CommonDialog1
.CancelError = True
.DialogTitle = "Importar archivo de proyecto"
.Filter = "Proyecto (*.dpp)|*.dpp"
.Action = 1
frmMain.Refresh
gProyecto.Nombre = .filename
gProyectoNP.Nombre = .FileTitle
Call mnuEditEliminaTodos_Click
TreeView2.Nodes(1).Text = .FileTitle
End With
End If
frmMain.Refresh
TreeView2.Refresh
f = FreeFile
Open gProyecto.Nombre For Input As #f
Input #f, gProyecto.Batimetria
Input #f, gProyecto.Oleaje
Input #f, gProyecto.Calibracion
Close #1
i = 0
Do While a <> "\"
a = Mid(gProyecto.Batimetria, Len(gProyecto.Batimetria) - i, 1)
i = i + 1
Loop
gProyectoNP.Batimetria = Right(gProyecto.Batimetria, i - 1)
TreeView2.Nodes.Add Bati, tvwChild, "B", gProyecto.Batimetria, 7, 7
TreeView2.Nodes.Add Olas, tvwChild, "C", gProyecto.Oleaje, 7, 7
TreeView2.Nodes.Add Calibra, tvwChild, "D", gProyecto.Calibracion, 7, 7
For i = 1 To 4
TreeView2.Nodes(i).Expanded = True
Next i
TreeView2.Refresh
'Barra de estado
StatusBar1.Panels(2).Text = "Proyecto abierto"
StatusBar1.Panels(3).Visible = True
StatusBar1.Panels(3).AutoSize = sbrContents
frmMain - 10
StatusBar1.Panels(3).Text = gProyectoNP.Nombre
Call Herramientas
Call Enable_todo
file = gProyecto.Nombre
largo = Len(file) - 3
filedat = Left(file, largo) + ".txt"
f = FreeFile
On Error GoTo nodat
Open filedat For Input As #f
Input #f, st
Text8.Text = st
Input #f, st
Text7.Text = st
Input #f, st
Text6.Text = st
Input #f, st
Text5.Text = st
Close #f
Exit Sub
Text8.SetFocus
nodat:
Close #f
Frame2.Caption = "No hay datos"
Exit Sub
SalirOpen:
End Sub
Private Sub LimpiaTexto1()
Text8.Text = ""
Text7.Text = ""
Text6.Text = ""
Text5.Text = ""
Frame2.Caption = "Datos del proyecto"
StatusBar1.Panels(2).Text = "No hay proyecto abierto"
StatusBar1.Panels(3).Visible = False
Picture1.Cls
Label4.Caption = ""
Label5.Caption = ""
Label6.Caption = ""
Label10.Caption = ""
Label15.Caption = ""
Label16.Caption = ""
Label17.Caption = ""
Label18.Caption = ""
Label26.Caption = ""
Dibujo.Enabled = False
MSChart1.Visible = False
Playa_Cilindrica.Enabled = False
A_Grapher.Enabled = False
VScroll1.min = 0
VScroll1.max = 0
frmMain.ProgressBar2.Value = 1
End Sub
If Right(file, 3) <> "dpp" And Right(file, 3) <> "DPP" Then file = file + ".dpp"
filedat = Left(file, (Len(file) - 3)) + ".txt"
sigue:
FileNombre = Left(FileNombre, Len(FileNombre) - 4)
TreeView2.Nodes(1).Text = FileNombre
TreeView2.Refresh
f = FreeFile
Open filedat For Output As #f
Print #f, Text8.Text
Print #f, Text7.Text
Print #f, Text6.Text
Print #f, Text5.Text
Close #f
End If
GoTo sale
NoExiste:
Resume sigue
sale:
End Sub
gProyectoNP.Calibracion = CommonDialog1.FileTitle
TreeView2.Nodes.Add Calibra, tvwChild, "D", gProyecto.Calibracion, 7, 7
End Select
On Error GoTo 0
For i = 1 To 4
TreeView2.Nodes(i).Expanded = True
Next i
GoTo SalirImport
Captura2:
codigo = Err.Number
gZonaError = "Importando dato"
Call errores(codigo)
SalirImport:
Screen.MousePointer = 0
End Sub
Call mnuEditEliminaTodos_Click
Call Disable_todo
End Sub
Sub NoProyectoStatus()
End Sub
Call NoImplementado
End Sub
End Sub
frmUniform.Show
End Sub
frmResultados.Show
End Sub
frmMain - 13
Call Info
End Sub
frmGrafica.MSChart1 = gChart2
frmGrafica.Caption = "Gráfica de Hrms"
frmGrafica.Show
End Sub
frmGrafica.MSChart1 = gChart3
frmGrafica.Caption = "Perfil (Fila 1)"
frmGrafica.Show
End Sub
frmGrafica.MSChart1 = gChart4
frmGrafica.Caption = "Gráfica de Qb"
frmGrafica.Show
End Sub
With Text2
.SelLength = Len(.Text)
.SelStart = 0
End With
Call NameFile
End Sub
Private Sub NameFile()
gFileVal = Text2.Text
If Right(gFileVal, 4) <> ".val" Then gFileVal = gFileVal & ".val"
frmGridValida.Caption = gFileVal
End Sub
Private Sub Text2_LostFocus()
End Sub
Case Is = "Calibracion"
Call mnuFileCrearCalibracion_Click
Case Is = "Impresoras"
'CommonDialog1.ShowPrinter
CommonDialog1.Action = 5
Case Is = "Salir"
Call mnuFileOpenSalir_Click
End Select
Label1.Caption = Button
End Sub
Screen.MousePointer = 11
frmInicial.Show
frmInicial.Salir.Visible = True
frmMain.Enabled = False
Screen.MousePointer = 0
End Sub
mThisControl.ShowWhatsThis
End Sub
Frame8.Caption = gProyectoNP.Nombre
Frame10.Caption = gProyectoNP.Nombre
Dim f As Integer
Inicio = Timer
'LECTURA DE DATOS
gModela = 1
Call RemoveResultados
Call Inicializa_Picture1
Picture1.Cls
' On Error GoTo Salida
gProyecto.Batimetria = TreeView2.Nodes(5)
file = gProyecto.Batimetria
f = FreeFile
Call LaSonda_Inicio("LECTURA DE DATOS", Fich.filas, 0)
Open file For Binary As #f
Get #f, , Fich.Clase
Close #f
If Fich.Clase = "DSAA" Then Call leeASCI(file) Else LeeBinario (file)
Call Dimensionar(Fich.filas, Fich.Columnas)
Call Datos_Iniciales
Call LeeCalibra(gProyecto.Calibracion)
Call LaSonda_Final
If gKf = 0 Then
gMsg = "El valor del coeficiente corrector" & Chr(10) & _
"de fricción escogido es nulo. " & Chr(10) & _
"De esta forma no se disipará energía" & Chr(10) & _
"por fricción con el fondo." & Chr(10) & Chr(10) & _
"¿Está de acuerdo?"
GoSub MeMarcho
End If
End If
Call ValoresExtremos(gNO(i, j), MaxNO, MinNO)
Call ValoresExtremos(gL(i, j), MaxL, MinL)
Next j
Next i
Call LaSonda_Final
gChart(2, 1) = "L"
gChart(2, 2) = gTpo
'CÁLCULO DE LA OBLICUIDAD
gZonaError = "Oblicuidad"
Call LaSonda_Inicio("OBLICUIDAD", Fich.filas, 0)
Call SnellInicial
For i = 1 To Fich.filas
frmMain.ProgressBar1.Value = i
For j = 2 To Fich.Columnas
If gZ(i, j) < gDmin Then
Call Alfa(i, j)
gOb(i, j) = gOb(i, j) * 180 / pi
Else
gOb(i, j) = 0
End If
Call ValoresExtremos(gOb(i, j), MaxOB, MinOB)
Next j
Next i
Call LaSonda_Final
gChart(4, 1) = "Ob"
gChart(4, 2) = gTpo
'TRANSFORMACIÓN DE OLEAJE
gZonaError = "Transformación de oleaje"
Call LaSonda_Inicio("TRANSFORMACIÓN DE OLEAJE", Fich.filas, 0)
For i = 1 To Fich.filas
frmMain.ProgressBar1.Value = i
gSU(i, 1) = 0
Call TensorRadiacion(i, 1)
Call ValoresExtremos(gSU(i, 1), MaxSU, MinSU)
Call ValoresExtremos(gE(i, 1), MaxE, MinE)
Call ValoresExtremos(gHrms(i, 1), MaxHrms, MinHrms)
Call ValoresExtremos(gSxx(i, 1), MaxSxx, MinSxx)
Call ValoresExtremos(gSxy(i, 1), MaxSxy, MinSxy)
Call ValoresExtremos(gSyy(i, 1), MaxSyy, MinSyy)
For j = 2 To Fich.Columnas
If gZ(i, j) < gDmin Then
gZonaError = "Altura de ola de Miche en (" & Str(i) & ", " & Str(j) & ")"
Call Hm_Miche(i, j - 1)
gZonaError = "Velocidad orbital en (" & Str(i) & ", " & Str(j) & ")"
Call U_orb(i, j - 1)
gZonaError = "Fracción de olas rotas en (" & Str(i) & ", " & Str(j) & ")"
Call Qb(i, j - 1)
gZonaError = "Pérdidas de energía por fricción en (" & Str(i) & ", " & Str(j)
& ")"
Call Df(i, j - 1)
gZonaError = "Pérdidas de energía por rotura en (" & Str(i) & ", " & Str(j) &
")"
Call Db(i, j - 1)
frmMain - 18
gZonaError = "Energía del oleaje en (" & Str(i) & ", " & Str(j) & ")"
Call Energia(i, j)
gZonaError = "Altura de ola Hrms en (" & Str(i) & ", " & Str(j) & ")"
Call Hrms(i, j)
gZonaError = "Tensor de radiación en (" & Str(i) & ", " & Str(j) & ")"
Call TensorRadiacion(i, j)
gZonaError = "Parámetro de Ursell en (" & Str(i) & ", " & Str(j) & ")"
Call Ursell(i, j)
gZonaError = "Set-Up en (" & Str(i) & ", " & Str(j) & ")"
Call SetUp(i, j)
gZonaError = "Circulación en (" & Str(i) & ", " & Str(j) & ")"
Call Corrientes(i, j)
Else
gHm(i, j - 1) = 0
gUorb(i, j - 1) = 0
gQb(i, j - 1) = gQb(i, j - 2)
gDf(i, j - 1) = gDf(i, j - 2)
gDb(i, j - 1) = gDb(i, j - 2)
gE(i, j) = 0
gHrms(i, j) = 0
gSxx(i, j) = 0
gSxy(i, j) = 0
gSyy(i, j) = 0
gUr(i, j) = 0
gSU(i, j) = gSU(i, j - 1)
gRx(i, j) = 0
gRy(i, j) = 0
End If
If j = Fich.Columnas Then
gQb(i, j) = gQb(i, j - 1)
End If
Call ValoresExtremos(gHm(i, j - 1), MaxHm, MinHm)
Call ValoresExtremos(gUorb(i, j - 1), MaxUorb, MinUorb)
Call ValoresExtremos(gQb(i, j - 1), MaxQb, MinQb)
Call ValoresExtremos(gFw(i, j - 1), MaxFw, MinFw)
Call ValoresExtremos(gDf(i, j - 1), MaxDf, MinDf)
Call ValoresExtremos(gDb(i, j - 1), MaxDb, MinDb)
Call ValoresExtremos(gE(i, j), MaxE, MinE)
Call ValoresExtremos(gHrms(i, j), MaxHrms, MinHrms)
Call ValoresExtremos(gSxx(i, j), MaxSxx, MinSxx)
Call ValoresExtremos(gSxy(i, j), MaxSxy, MinSxy)
Call ValoresExtremos(gSyy(i, j), MaxSyy, MinSyy)
Call ValoresExtremos(gUr(i, j), MaxUr, MinUr)
Call ValoresExtremos(gSU(i, j), MaxSU, MinSU)
Call ValoresExtremos(gPx(i, j - 1), MaxPx, MinPx)
Call ValoresExtremos(gPy(i, j - 1), MaxPy, MinPy)
Call ValoresExtremos(gRx(i, j), MaxRx, MinRx)
Call ValoresExtremos(gRy(i, j), MaxRy, MinRy)
Next j
Next i
Call LaSonda_Final
gChart(5, 1) = "T.O."
gChart(5, 2) = gTpo
file_SU = "SetUp.grd"
file_Rx = "Rx.grd"
file_Ry = "Ry.grd"
Screen.MousePointer = 11
fileList = FreeFile
Open "ListaResult.dat" For Output As #fileList
Print #fileList, file_k
Print #fileList, file_L
Print #fileList, file_CG
Print #fileList, file_OB
Print #fileList, file_Hm
Print #fileList, file_Qb
Print #fileList, file_Uorb
Print #fileList, file_fw
Print #fileList, file_Df
Print #fileList, file_Db
Print #fileList, file_E
Print #fileList, file_Px
Print #fileList, file_Py
Print #fileList, file_Hrms
Print #fileList, file_Sxx
Print #fileList, file_Sxy
Print #fileList, file_Syy
Print #fileList, file_Ur
Print #fileList, file_SU
Print #fileList, file_Rx
Print #fileList, file_Ry
Close fileList
Case Is = "DSBB"
Call LaSonda_Inicio("ESCRITURA - Formato Binario", 21, 0)
fNo = FreeFile
Call Escribe_Binario(file_k, fNo, MinNO, MaxNO, "k")
frmMain.ProgressBar1.Value = 1
fLo = FreeFile
Call Escribe_Binario(file_L, fLo, MinL, MaxL, "L")
frmMain.ProgressBar1.Value = 2
fCg = FreeFile
Call Escribe_Binario(file_CG, fCg, MinCG, MaxCG, "Cg")
frmMain.ProgressBar1.Value = 3
fOb = FreeFile
Call Escribe_Binario(file_OB, fOb, MinOB, MaxOB, "O")
frmMain.ProgressBar1.Value = 4
fHm = FreeFile
Call Escribe_Binario(file_Hm, fHm, MinHm, MaxHm, "Hm")
frmMain.ProgressBar1.Value = 5
FQb = FreeFile
Call Escribe_Binario(file_Qb, FQb, MinQb, MaxQb, "Qb")
frmMain.ProgressBar1.Value = 6
fUorb = FreeFile
Call Escribe_Binario(file_Uorb, fUorb, MinUorb, MaxUorb, "Uorb")
frmMain.ProgressBar1.Value = 7
fDf = FreeFile
Call Escribe_Binario(file_Df, fDf, MinDf, MaxDf, "Df")
frmMain.ProgressBar1.Value = 8
fDb = FreeFile
Call Escribe_Binario(file_Db, fDb, MinDb, MaxDb, "Db")
frmMain.ProgressBar1.Value = 9
fE = FreeFile
Call Escribe_Binario(file_E, fE, MinE, MaxE, "E")
frmMain.ProgressBar1.Value = 10
fPx = FreeFile
Call Escribe_Binario(file_Px, fPx, MinPx, MaxPx, "Px")
frmMain.ProgressBar1.Value = 11
fPy = FreeFile
Call Escribe_Binario(file_Py, fPy, MinPy, MaxPy, "Py")
frmMain.ProgressBar1.Value = 12
fHrms = FreeFile
Call Escribe_Binario(file_Hrms, fHrms, MinHrms, MaxHrms, "Hrms")
frmMain.ProgressBar1.Value = 13
fSxx = FreeFile
Call Escribe_Binario(file_Sxx, fSxx, MinSxx, MaxSxx, "Sxx")
frmMain.ProgressBar1.Value = 14
fSxy = FreeFile
Call Escribe_Binario(file_Sxy, fSxy, MinSxy, MaxSxy, "Sxy")
frmMain.ProgressBar1.Value = 15
fSyy = FreeFile
Call Escribe_Binario(file_Syy, fSyy, MinSyy, MaxSyy, "Syy")
frmMain.ProgressBar1.Value = 16
fUr = FreeFile
Call Escribe_Binario(file_Ur, fUr, MinUr, MaxUr, "Ur")
frmMain.ProgressBar1.Value = 17
fSU = FreeFile
Call Escribe_Binario(file_SU, fSU, MinSU, MaxSU, "SU")
frmMain.ProgressBar1.Value = 18
fRx = FreeFile
Call Escribe_Binario(file_Rx, fRx, MinRx, MaxRx, "Rx")
frmMain.ProgressBar1.Value = 19
fRy = FreeFile
Call Escribe_Binario(file_Ry, fRy, MinRy, MaxRy, "Ry")
frmMain.ProgressBar1.Value = 20
fFw = FreeFile
Call Escribe_Binario(file_fw, fFw, MinFw, MaxFw, "Fw")
frmMain.ProgressBar1.Value = 21
Case Else
gTitulo = "ERROR EN LOS DATOS"
gMsg = "El formato no coincide." & Chr(10) & _
frmMain - 22
frmMain.MSChart1 = gChart
frmMain.MSChart2.chartType = VtChChartType2dLine
frmMain.MSChart2 = gChart2
frmMain.MSChart3 = gChart3
frmMain.MSChart4 = gChart4
frmMain.MSChart1.Visible = True
frmMain.MSChart2.Visible = True
frmMain.MSChart4.Visible = True
Frame8.Caption = Frame8.Caption & " (Hrms)"
Frame10.Caption = Frame10.Caption & " (Qb)"
ProgressBar2.Value = ProgressBar2.min
gModela = 0
Call Ayuda("Modelización finalizada")
Final = Timer
Elapsed = Final - Inicio
Picture1.Print
Call TiempoTranscurrido(Elapsed, 2)
mnuResults.Enabled = True
Toolbar3.Buttons(1).Enabled = True
List1.AddItem (gProyectoNP.Nombre)
ProgressBar1.Value = ProgressBar1.min
Screen.MousePointer = 0
Exit Sub
Captura:
Call errores(Err)
Exit Sub
MeMarcho:
gTitulo = "VALOR INUSUAL"
gResponse = MsgBox(gMsg, vbQuestion + vbYesNo + vbDefaultButton1, gTitulo)
If gResponse = 7 Then Exit Sub Else Return
Salida:
gModela = 0
Close
Screen.MousePointer = 0
gMsg = "Faltan datos" & Chr(10) _
& "Compruebe el árbol de proyecto"
gTitulo = "PROCESO ABORTADO"
MsgBox gMsg, vbOKOnly + vbDefaultButton1 + vbCritical, gTitulo
End Sub
End Sub
End Sub
frmMain - 23
End Sub
fila = Val(Text1.Text)
MaxZ = -1E+32
Minz = -MaxZ
Screen.MousePointer = 11
For j = 1 To Fich.Columnas
If gZ(fila, j) > MaxZ Then MaxZ = gZ(fila, j)
If gZ(fila, j) < Minz Then Minz = gZ(fila, j)
Next j
salteya:
End Sub
End Sub
Call NoXY
Call Ayuda(gMsg)
frmMain - 24
End Sub
With Text5
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
End Sub
With Text6
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
End Sub
With Text7
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
End Sub
With Text8
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
End Sub
Unload frmInicial
frmMain.Visible = True
End Sub
StatusBar1.Panels(1).Text = Time
frmMain - 25
End Sub
End Sub
End Sub
Cachis:
Resume Next
End Sub
End Sub
Call Inicializa_Picture1
Select Case TreeView2.SelectedItem.Key
Case Is = "B" 'Batimetría
With frmMain.Picture1
.Cls
.AutoRedraw = True
.FontItalic = False
.FontBold = False
End With
Picture1.Print "DATOS BATIMÉTRICOS"
Picture1.Print
Picture1.Print "Archivo de datos: ";
Picture1.FontBold = True
Picture1.Print gProyecto.Batimetria
On Error GoTo NoFile
k = FileLen(gProyecto.Batimetria)
frmMain - 26
On Error GoTo 0
f = FreeFile
Open gProyecto.Batimetria For Binary As #f
Get #f, , Fich.Clase
Close #f
Picture1.FontBold = False
Picture1.Print "Tipo: ";
Picture1.FontBold = True
If Fich.Clase = "DSAA" Then
Picture1.Print "ASCI"
Call LeeCabASCI(gProyecto.Batimetria)
ElseIf Fich.Clase = "DSBB" Then
Picture1.Print "BINARIO"
Call LeeCabBinario(gProyecto.Batimetria)
Else
Picture1.Print "DESCONOCIDO"
Exit Sub
End If
Picture1.FontBold = False
Picture1.Print "Tamaño: ";
Picture1.FontBold = True
Picture1.Print k; " bytes"
Picture1.Print
Call ImprimeCabBati
Call LeeOlas(gProyecto.Oleaje)
Call ImprimeOleaje
Call LeeCalibra(gProyecto.Calibracion)
Call ImprimeCalibra
Case Else
Picture1.Cls
End Select
Exit Sub
NoFile:
Screen.MousePointer = 0
gTitulo = "ERROR"
gMsg = "El archivo no existe"
MsgBox gMsg, vbExclamation + vbOKOnly + vbDefaultButton1, gTitulo
Picture1.Cls
Exit Sub
End Sub
End Sub
End Sub
Label10.Caption = -VScroll1.Value
Text1.Text = Label10.Caption
End Sub
End Sub
Label10.Caption = -VScroll1.Value
End Sub
frmMain - 1
VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Object = "{02B5E320-7292-11CF-93D5-0020AF99504A}#1.0#0"; "MSCHART.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0"; "COMCTL32.OCX"
Begin VB.Form frmMain
Caption = "DINÁMICA DEL PERFIL DE PLAYA - DPP2"
ClientHeight = 8115
ClientLeft = -30
ClientTop = 540
ClientWidth = 11880
Icon = (Icono)
LinkTopic = "Form1"
ScaleHeight = 8115
ScaleWidth = 11880
Visible = 0 'False
WhatsThisHelp = -1 'True
WindowState = 2 'Maximized
Begin ComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 420
Left = 0
TabIndex = 48
Top = 0
Width = 11880
_ExtentX = 20955
_ExtentY = 741
ButtonWidth = 635
ButtonHeight = 582
Appearance = 1
ImageList = "ImageList3"
_Version = 327680
BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
NumButtons = 4
BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Abrir"
Object.ToolTipText = "Abrir archivo de proyecto"
Object.Tag = ""
ImageIndex = 1
EndProperty
BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Oleaje"
Object.ToolTipText = "Crear / Editar archivo de datos de oleaje"
Object.Tag = ""
ImageIndex = 2
EndProperty
BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Calibracion"
Object.ToolTipText = "Crear / Editar parámetros de calibración"
Object.Tag = ""
ImageIndex = 3
EndProperty
BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Salir"
Object.ToolTipText = "Salir del programa"
Object.Tag = ""
ImageIndex = 5
EndProperty
EndProperty
MouseIcon = {Binary}
Begin ComctlLib.Toolbar Toolbar2
Height = 390
Left = 1560
TabIndex = 49
Top = 0
Width = 735
_ExtentX = 1296
_ExtentY = 688
ButtonWidth = 635
ButtonHeight = 582
ImageList = "ImageList3"
_Version = 327680
BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
NumButtons = 2
frmMain - 2
End
Begin VB.Frame Frame9
Caption = "Última modelización"
ForeColor = &H00C00000&
Height = 1695
Left = 3600
TabIndex = 63
Top = 240
Width = 2055
Begin MSChartLib.MSChart MSChart3
Height = 1335
Left = 120
TabIndex = 64
ToolTipText = "Primer perfil transversal"
Top = 240
Visible = 0 'False
Width = 1875
End
End
Begin ComctlLib.ProgressBar ProgressBar1
Height = 255
Left = 120
TabIndex = 58
ToolTipText = "Muestra la progresión de la tarea en ejecución"
Top = 2040
Width = 9855
_ExtentX = 17383
_ExtentY = 450
_Version = 327680
BorderStyle = 1
Appearance = 1
MouseIcon = {Binary}
Min = 1e-4
End
Begin VB.Frame Frame8
Caption = "Última modelización "
ForeColor = &H00C00000&
Height = 1695
Left = 5760
TabIndex = 61
Top = 240
Width = 2055
Begin MSChartLib.MSChart MSChart2
Height = 1335
Left = 120
TabIndex = 62
ToolTipText = "Altura de ola significante en el primer perfil"
Top = 240
Visible = 0 'False
Width = 1815
End
End
Begin VB.Frame Frame7
Height = 615
Left = 120
TabIndex = 59
ToolTipText = "Indica si se ha seleccionado la opción de mostrar información"
Top = 1320
Width = 1455
Begin VB.CheckBox Check4
Caption = "Ver detalles"
Height = 255
Left = 120
TabIndex = 60
Top = 240
Value = 1 'Checked
Width = 1215
End
End
Begin VB.Frame Frame6
Caption = "Modelizaciones"
ForeColor = &H00C00000&
Height = 1695
Left = 1680
frmMain - 4
TabIndex = 56
Top = 240
Width = 1815
Begin VB.ListBox List1
Height = 1230
Left = 120
TabIndex = 57
ToolTipText = "Muestra las modelizaciones realizadas en el último arranque del
Top = 360
Width = 1575
End
End
Begin VB.Frame Frame5
Caption = "Edición"
ForeColor = &H00C00000&
Height = 1095
Left = 120
TabIndex = 52
ToolTipText = "Indica si se ha editado algún dato"
Top = 240
Width = 1455
Begin VB.CheckBox Check3
Caption = "Calibración"
Height = 255
Left = 120
TabIndex = 55
Top = 720
Width = 1095
End
Begin VB.CheckBox Check2
Caption = "Oleaje"
Height = 255
Left = 120
TabIndex = 54
Top = 480
Width = 855
End
Begin VB.CheckBox Check1
Caption = "Batimetría"
Height = 255
Left = 120
TabIndex = 53
Top = 240
Width = 1095
End
End
End
Begin VB.Timer Timer1
Interval = 1000
Left = 10680
Top = 5280
End
Begin ComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 255
Left = 0
TabIndex = 13
Top = 7860
Width = 11880
_ExtentX = 20955
_ExtentY = 450
SimpleText = ""
_Version = 327680
BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7}
NumPanels = 1
BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7}
Alignment = 1
AutoSize = 2
TextSave = ""
Key = ""
Object.Tag = ""
EndProperty
EndProperty
MouseIcon = {Binary}
frmMain - 5
End
Begin TabDlg.SSTab SSTab1
Height = 4815
Left = 120
TabIndex = 5
Top = 480
Width = 4725
_ExtentX = 8334
_ExtentY = 8493
_Version = 327680
TabOrientation = 1
Tabs = 5
TabsPerRow = 5
TabHeight = 520
BackColor = 12632256
ForeColor = 12582912
TabCaption(0) = "Datos"
TabPicture(0) = {Binary}
Tab(0).ControlCount= 2
Tab(0).ControlEnabled= -1 'True
Tab(0).Control(0)= "TreeView2"
Tab(0).Control(0).Enabled= 0 'False
Tab(0).Control(1)= "Frame2"
Tab(0).Control(1).Enabled= 0 'False
TabCaption(1) = "Resultado"
TabPicture(1) = {Binary}
Tab(1).ControlCount= 1
Tab(1).ControlEnabled= 0 'False
Tab(1).Control(0)= "TreeView1"
Tab(1).Control(0).Enabled= 0 'False
TabCaption(2) = "Dibujo"
TabPicture(2) = {Binary}
Tab(2).ControlCount= 2
Tab(2).ControlEnabled= 0 'False
Tab(2).Control(0)= "Frame3"
Tab(2).Control(0).Enabled= 0 'False
Tab(2).Control(1)= "Frame1"
Tab(2).Control(1).Enabled= 0 'False
TabCaption(3) = "Tiempos"
TabPicture(3) = {Binary}
Tab(3).ControlCount= 2
Tab(3).ControlEnabled= 0 'False
Tab(3).Control(0)= "MSChart1"
Tab(3).Control(0).Enabled= 0 'False
Tab(3).Control(1)= "Label27"
Tab(3).Control(1).Enabled= 0 'False
TabCaption(4) = "Validar"
TabPicture(4) = {Binary}
Tab(4).ControlCount= 1
Tab(4).ControlEnabled= 0 'False
Tab(4).Control(0)= "Frame11"
Tab(4).Control(0).Enabled= 0 'False
Begin VB.Frame Frame11
Caption = "Validación"
ForeColor = &H00C00000&
Height = 4215
Left = -74880
TabIndex = 67
Top = 120
Width = 4455
Begin VB.Frame Frame12
Caption = "Nombre de archivo"
Enabled = 0 'False
Height = 855
Left = 2280
TabIndex = 72
Top = 840
Width = 2055
Begin VB.TextBox Text2
Height = 285
Left = 120
TabIndex = 73
Text = " "
ToolTipText = "Introduczca aquí el nombre del archivo de puntos"
frmMain - 6
Top = 360
Width = 1815
End
End
Begin VB.CommandButton Command2
Caption = "&Añadir archivo"
Height = 255
Left = 2400
TabIndex = 71
Top = 480
Width = 1215
End
Begin VB.Frame Frame13
Caption = "Puntos"
Height = 2775
Left = 120
TabIndex = 68
Top = 360
Width = 2055
Begin VB.CommandButton Mostrar
Caption = "&Mostrar"
Height = 255
Left = 120
TabIndex = 70
Top = 2400
Width = 1815
End
Begin VB.FileListBox File1
Height = 2040
Left = 120
MultiSelect = 2 'Extended
Pattern = "*.val"
TabIndex = 69
Top = 240
Width = 1815
End
End
End
Begin MSChartLib.MSChart MSChart1
Height = 4215
Left = -74880
TabIndex = 46
ToolTipText = "Gráfica comparativa de tiempos consumidos en el proceso"
Top = 120
Visible = 0 'False
Width = 4455
End
Begin VB.Frame Frame3
Caption = "Datos del dibujo"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 1815
Left = -74880
TabIndex = 25
Top = 2520
Width = 4455
Begin VB.Label Label26
Alignment = 2 'Center
BackColor = &H8000000E&
BorderStyle = 1 'Fixed Single
Height = 255
Left = 960
TabIndex = 45
Top = 1320
Width = 3375
End
frmMain - 7
TabIndex = 33
Top = 840
Width = 735
End
Begin VB.Label Label17
Alignment = 2 'Center
BackColor = &H8000000E&
BorderStyle = 1 'Fixed Single
Height = 255
Left = 1680
TabIndex = 32
Top = 480
Width = 735
End
Begin VB.Label Label16
Alignment = 2 'Center
BackColor = &H8000000E&
BorderStyle = 1 'Fixed Single
Height = 255
Left = 840
TabIndex = 31
Top = 840
Width = 735
End
Begin VB.Label Label15
Alignment = 2 'Center
BackColor = &H8000000E&
BorderStyle = 1 'Fixed Single
Height = 255
Left = 840
TabIndex = 30
Top = 480
Width = 735
End
Begin VB.Label Label14
Alignment = 2 'Center
Caption = "Y"
Height = 255
Left = 1680
TabIndex = 29
Top = 240
Width = 615
End
Begin VB.Label Label13
Alignment = 2 'Center
Caption = "X"
Height = 255
Left = 960
TabIndex = 28
Top = 240
Width = 495
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "Mínimo: "
Height = 195
Left = 120
TabIndex = 27
Top = 840
Width = 615
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "Máximo: "
Height = 195
Left = 120
TabIndex = 26
Top = 480
Width = 630
End
End
Begin VB.Frame Frame1
Caption = "Dibujo de archivo"
BeginProperty Font
frmMain - 9
_Version = 327680
Appearance = 1
MouseIcon = {Binary}
End
Begin VB.CommandButton Dibujo
Caption = "&Dibujo"
Enabled = 0 'False
Height = 255
Left = 3240
TabIndex = 22
Top = 1440
Width = 975
End
Begin VB.VScrollBar VScroll1
Height = 1335
Left = 2880
Max = 0
TabIndex = 17
Top = 720
Width = 255
End
Begin VB.Shape Shape2
Height = 855
Left = 120
Top = 600
Width = 2055
End
Begin VB.Shape Shape1
Height = 1575
Left = 2280
Top = 600
Width = 2055
End
Begin VB.Label Label10
Alignment = 2 'Center
BackColor = &H8000000E&
BorderStyle = 1 'Fixed Single
Height = 255
Left = 3240
TabIndex = 21
Top = 960
Width = 855
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "Perfil:"
Height = 195
Left = 3360
TabIndex = 20
Top = 720
Width = 480
WordWrap = -1 'True
End
Begin VB.Label Label6
Height = 255
Left = 2400
TabIndex = 19
Top = 1800
Width = 375
End
Begin VB.Label Label5
Height = 255
Left = 2400
TabIndex = 18
Top = 720
Width = 375
End
Begin VB.Label Label4
Alignment = 2 'Center
BackColor = &H8000000E&
BorderStyle = 1 'Fixed Single
Height = 255
Left = 960
TabIndex = 16
frmMain - 11
Top = 240
Width = 3375
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "Archivo: "
Height = 195
Left = 120
TabIndex = 15
Top = 240
Width = 630
End
End
Begin ComctlLib.TreeView TreeView1
Height = 4215
Left = -74880
TabIndex = 12
Top = 120
Width = 4455
_ExtentX = 7858
_ExtentY = 7435
_Version = 327680
Style = 7
ImageList = "ImageList2"
Appearance = 1
MouseIcon = {Binary}
End
Begin VB.Frame Frame2
Caption = "Datos del proyecto"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 1695
Left = 120
TabIndex = 7
Top = 2640
Width = 4455
Begin VB.TextBox Text8
Height = 285
Left = 1320
TabIndex = 0
Top = 240
Width = 3015
End
Begin VB.TextBox Text7
Height = 285
Left = 1320
TabIndex = 1
Top = 600
Width = 3015
End
Begin VB.TextBox Text6
Height = 285
Left = 1320
TabIndex = 2
Top = 960
Width = 3015
End
Begin VB.TextBox Text5
Height = 285
Left = 1320
TabIndex = 3
Top = 1320
Width = 3015
End
Begin VB.Label Label8
AutoSize = -1 'True
frmMain - 12
AutoRedraw = -1 'True
BackColor = &H8000000E&
FillStyle = 0 'Solid
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 4695
Left = 4920
MousePointer = 2 'Cross
ScaleHeight = 4635
ScaleWidth = 6795
TabIndex = 4
Top = 480
Width = 6855
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 10560
Top = 5760
_ExtentX = 847
_ExtentY = 847
_Version = 327680
End
Begin ComctlLib.ImageList ImageList3
Left = 11160
Top = 6480
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 327680
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 8
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = "Abrir"
EndProperty
BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = "Oleaje"
EndProperty
BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = "Calibracion"
EndProperty
BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = "Impresoras"
EndProperty
BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = "Salir"
EndProperty
BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = "Mdelizar"
EndProperty
BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = "Perfiles"
EndProperty
BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = "Resultados"
EndProperty
EndProperty
End
frmMain - 14
Key = ""
EndProperty
BeginProperty ListImage17 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = ""
EndProperty
BeginProperty ListImage18 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = ""
EndProperty
EndProperty
End
Begin ComctlLib.ImageList ImageList1
Left = 11160
Top = 5280
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 327680
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 9
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = ""
EndProperty
BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = ""
EndProperty
BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = ""
EndProperty
BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = ""
Object.Tag = "Oleaje"
EndProperty
BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = ""
Object.Tag = "Calibracion"
EndProperty
BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = ""
EndProperty
BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = ""
EndProperty
BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = ""
EndProperty
BeginProperty ListImage9 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = ""
EndProperty
EndProperty
End
Begin VB.Menu mnuFileOpen
Caption = "&Archivo"
Begin VB.Menu mnuFileOpenNuevo
Caption = "&Nuevo"
Shortcut = ^N
End
Begin VB.Menu mnuFileOpenAbrir
Caption = "Abrir &proyecto"
Shortcut = ^P
End
frmMain - 16
Caption = "&Resultados"
Enabled = 0 'False
End
Begin VB.Menu mnuHelp1
Caption = "A&yuda"
Begin VB.Menu mnuHelp1Acercade
Caption = "&Acerca de"
End
End
Begin VB.Menu mnuHelp
Caption = ""
Begin VB.Menu mnuHelpQuees
Caption = "¿&Qué es esto?"
End
End
End
frmOlas - 1
Option Explicit
End Sub
End Sub
SalirOlas:
End Sub
sigue:
Open file For Output As #f
Print #f, Text1.Text
Print #f, Text2.Text
Print #f, Text3.Text
Close #f
Call Salir_Click
Exit Sub
NoExiste:
Resume sigue
SalirOlas:
End Sub
Screen.MousePointer = 11
frmMain.Enabled = True
Unload frmOlas
frmMain.Check2.Value = 1
Screen.MousePointer = 0
End Sub
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
Begin VB.Form frmOlas
Caption = "DATOS DE OLEAJE"
ClientHeight = 2280
ClientLeft = 5040
ClientTop = 1350
ClientWidth = 4680
Icon = (Icono)
LinkTopic = "Form1"
ScaleHeight = 2280
ScaleWidth = 4680
Begin VB.Frame Frame2
Height = 1695
Left = 2880
TabIndex = 9
Top = 480
Width = 1575
Begin VB.CommandButton Abrir
Caption = "&Abrir"
Height = 255
Left = 120
TabIndex = 12
Top = 240
Width = 1335
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 480
Top = 1200
_ExtentX = 847
_ExtentY = 847
_Version = 327680
End
Begin VB.CommandButton Salir
Caption = "&Salir"
Height = 255
Left = 120
TabIndex = 11
Top = 960
Width = 1335
End
Begin VB.CommandButton Grabar
Caption = "&Grabar"
Height = 255
Left = 120
TabIndex = 10
Top = 600
Width = 1335
End
End
Begin VB.Frame Frame1
Caption = "Datos:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 1695
Left = 120
TabIndex = 5
Top = 480
Width = 2655
Begin VB.TextBox Text3
Height = 285
Left = 1320
TabIndex = 2
Top = 1080
Width = 855
End
frmOlas - 2
Option Explicit
End Sub
SalirCalibra:
Close #f
End Sub
End Sub
Sub BatStive_Click()
Case Else
Call LeeOlas(gProyecto.Oleaje)
Peralte = gHo / gLo
arg = 33 * Peralte
Call Tanh(arg)
gG1 = 0.5 + 0.4 * gTh
Text2.Text = Str(Format(gG1, "###0.00"))
End Select
End Sub
f = FreeFile
sigue:
Open file For Output As #f
Print #f, Text1.Text
Print #f, Text2.Text
Print #f, Text3.Text
Print #f, Text4.Text
Print #f, Text5.Text
Print #f, Text6.Text
Print #f, Text7.Text
Print #f, Str(Check1.Value)
If Option1.Value = True Then
Print #f, "DSBB"
Else
Print #f, "DSAA"
End If
Print #f, Text8.Text
Print #f, Str(Check2.Value)
Close #f
Call Salir_Click
Exit Sub
NoExiste:
Resume sigue
SalirGuardar:
End Sub
End Sub
Screen.MousePointer = 11
frmMain.Enabled = True
frmMain.SetFocus
Unload frmParametros
frmParametros - 3
frmMain.Check3.Value = 1
Screen.MousePointer = 0
End Sub
With Text1
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
With Text2
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
With Text3
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
With Text4
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
With Text5
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
With Text6
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
With Text7
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
With Text8
.SelStart = 0
.SelLength = Len(.Text)
frmParametros - 4
End With
End Sub
frmParametros - 1
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
Begin VB.Form frmParametros
Caption = "Parámetros de calibración"
ClientHeight = 4305
ClientLeft = 3840
ClientTop = 4050
ClientWidth = 7020
Icon = (Icono)
LinkTopic = "Form1"
ScaleHeight = 4305
ScaleWidth = 7020
Begin MSComDlg.CommonDialog CommonDialog1
Left = 6120
Top = 1560
_ExtentX = 847
_ExtentY = 847
_Version = 327680
End
Begin VB.Frame Frame2
Height = 1335
Left = 5880
TabIndex = 24
Top = 0
Width = 1095
Begin VB.CommandButton Ayuda_a_parametros
Caption = "&Ayuda"
Height = 255
Left = 120
TabIndex = 30
Top = 960
Width = 855
End
Begin VB.CommandButton Abrir
Caption = "&Abrir"
Height = 315
Left = 120
TabIndex = 26
Top = 240
Width = 855
End
Begin VB.CommandButton Grabar
Caption = "&Grabar"
Height = 255
Left = 120
TabIndex = 25
Top = 600
Width = 855
End
End
Begin VB.CommandButton Salir
Caption = "&Salir"
Height = 375
Left = 5880
TabIndex = 23
Top = 3840
Width = 1095
End
Begin VB.Frame Frame1
Caption = "Parámetros de calibración del modelo"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 4215
Left = 0
TabIndex = 0
Top = 0
frmParametros - 2
Width = 5775
Begin VB.CheckBox Check2
Caption = "Uniformidad longitudinal"
Height = 255
Left = 120
TabIndex = 36
Top = 3240
Width = 2175
End
Begin VB.TextBox Text8
Height = 285
Left = 4800
TabIndex = 35
Text = "1.00"
ToolTipText = "Multiplica Df por este factor"
Top = 2880
Width = 735
End
Begin VB.CommandButton BatStive
Caption = "E&valuar"
Height = 255
Left = 3120
TabIndex = 32
Top = 720
Width = 735
End
Begin VB.CommandButton Nikuradse
Caption = "&Evaluar"
Height = 255
Left = 3000
TabIndex = 31
Top = 2160
Width = 855
End
Begin VB.Frame Frame3
Caption = "Resultados"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 855
Left = 4320
TabIndex = 27
Top = 3240
Width = 1215
Begin VB.OptionButton Option2
Caption = "ASCI"
Height = 255
Left = 120
TabIndex = 29
Top = 480
Width = 735
End
Begin VB.OptionButton Option1
Caption = "Binarios"
Height = 255
Left = 120
TabIndex = 28
Top = 240
Value = -1 'True
Width = 855
End
End
Begin VB.TextBox Text7
Height = 285
Left = 4800
TabIndex = 22
Text = "-0.01"
frmParametros - 3
Left = 4080
TabIndex = 34
Top = 2880
Width = 495
End
Begin VB.Label Label15
AutoSize = -1 'True
Caption = "Parámetro modificador de pérdidas por fricción: "
Height = 195
Left = 120
TabIndex = 33
Top = 2880
Width = 3360
End
Begin VB.Label Label14
AutoSize = -1 'True
Caption = "dmin = "
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 4080
TabIndex = 15
Top = 2520
Width = 630
End
Begin VB.Label Label13
AutoSize = -1 'True
Caption = "r ="
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 4080
TabIndex = 14
Top = 2160
Width = 240
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "a = "
BeginProperty Font
Name = "Symbol"
Size = 8.25
Charset = 2
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 4080
TabIndex = 13
Top = 1800
Width = 315
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "d/L = "
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
frmParametros - 5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 4080
TabIndex = 12
Top = 1440
Width = 540
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "G = "
BeginProperty Font
Name = "Symbol"
Size = 8.25
Charset = 2
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 4080
TabIndex = 11
Top = 1080
Width = 315
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "g = "
BeginProperty Font
Name = "Symbol"
Size = 8.25
Charset = 2
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 4080
TabIndex = 10
Top = 720
Width = 315
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "K = "
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 4080
TabIndex = 9
Top = 360
Width = 360
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "Profundidad mínima de cálculo: "
Height = 195
Left = 120
TabIndex = 7
Top = 2520
Width = 2280
frmParametros - 6
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "Parámetro de Nikuradse: "
Height = 195
Left = 120
TabIndex = 6
Top = 2160
Width = 1800
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "Coeficiente de disipación por rotura: "
Height = 195
Left = 120
TabIndex = 5
Top = 1800
Width = 2580
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "Límite de profundidades reducidas: "
Height = 195
Left = 120
TabIndex = 4
Top = 1440
Width = 2535
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "Relación H/d para máxima ola estable (0.35 - 0.50): "
Height = 195
Left = 120
TabIndex = 3
Top = 1080
Width = 3690
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "Parámetro de Battjes y Stive: "
Height = 195
Left = 120
TabIndex = 2
Top = 720
Width = 2085
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Parámetro de Dally (0.1 - 0.3): "
Height = 195
Left = 120
TabIndex = 1
Top = 360
Width = 2145
End
End
End
frmResultados - 1
Option Explicit
Dim rH As Single
With MSFlexGrid1
.Clear
.FixedRows = 1
.FixedCols = 1
.Row = 1
.col = 1
.Rows = 1
.Cols = 1
.CellAlignment = flexAlignCenterCenter
End With
'Cabecera
fEntrada = " Perfil " & fT & " x " & fT & " d " & fT & _
" L. Onda " & fT & " Hrms " & fT & " Hmax " & fT & _
" Rh " & fT & " Qb " & fT & " Set-up " & fT & _
" Sxx " & fT & " Syy " & fT & " Sxy " & fT & _
" Cg " & fT & " Db " & fT & " Df " & fT & _
" P. Ursell " & fT & " Fw " & fT & _
" Rx " & fT & " Ry "
MSFlexGrid1.FormatString = fEntrada
MSFlexGrid1.AddItem fEntrada, i
Next i
sigue:
MSFlexGrid1.Rows = HScroll1.max + 1
Exit Sub
NoModel:
gMsg = "No ha procesado el proyecto"
gTitulo = "NO HAY RESULTADOS"
MsgBox gMsg, vbInformation + vbOKOnly, gTitulo
Resume sigue
End Sub
Private Sub Form_Load()
fT = Chr(9)
With HScroll1
.max = Fich.Columnas
.min = 1
.Value = 1
.SmallChange = 1
Label2.Caption = .Value
End With
End Sub
With CommonDialog1
.FontName = "Arial Narrow"
.Flags = cdlCFBoth
.ShowFont
Fuente = .FontName
size = .FontSize
End With
MSFlexGrid1.Font = Fuente
MSFlexGrid1.FontSize = size
MSFlexGrid1.Refresh
End Sub
Screen.MousePointer = 11
Label2.Caption = HScroll1.Value
Call LlenaGrid(HScroll1.Value)
Screen.MousePointer = 0
End Sub
Unload frmResultados
End Sub
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0"; "COMCTL32.OCX"
Begin VB.Form frmResultados
Caption = "Resultados"
ClientHeight = 7530
ClientLeft = 360
ClientTop = 450
ClientWidth = 11340
Icon = (Icono)
LinkTopic = "Form1"
ScaleHeight = 7530
ScaleWidth = 11340
Begin MSComDlg.CommonDialog CommonDialog1
Left = 8160
Top = 3840
_ExtentX = 847
_ExtentY = 847
_Version = 327680
End
Begin VB.Frame Frame1
Caption = "Control"
Height = 615
Left = 0
TabIndex = 1
Top = 6840
Width = 11295
Begin ComctlLib.Toolbar Toolbar1
Height = 390
Left = 10080
TabIndex = 5
Top = 120
Width = 1095
_ExtentX = 1931
_ExtentY = 688
Appearance = 1
ImageList = "ImageList1"
_Version = 327680
BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
NumButtons = 3
BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Fuente"
Description = "Fuente"
Object.ToolTipText = "Tipo de fuente a utilizar"
Object.Tag = ""
ImageIndex = 1
EndProperty
BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Impresora"
Description = "Impresora"
Object.ToolTipText = "Propiedades de la impresora"
Object.Tag = ""
ImageIndex = 2
EndProperty
BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Salir"
Description = "Salir"
Object.ToolTipText = "Cerrar ventana"
Object.Tag = ""
ImageIndex = 3
EndProperty
EndProperty
End
Begin VB.HScrollBar HScroll1
Height = 255
Left = 120
TabIndex = 2
Top = 240
Width = 4575
End
Begin VB.Label Label2
Alignment = 2 'Center
BackColor = &H8000000E&
frmResultados - 2
Option Explicit
frmSonda - 1
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0"; "COMCTL32.OCX"
Begin VB.Form frmSonda
BackColor = &H00C00000&
ClientHeight = 255
ClientLeft = 1155
ClientTop = 7755
ClientWidth = 9735
ClipControls = 0 'False
ControlBox = 0 'False
LinkTopic = "Form1"
ScaleHeight = 255
ScaleWidth = 9735
Begin ComctlLib.ProgressBar ProgressBar1
Height = 255
Left = 0
TabIndex = 0
Top = 0
Width = 9735
_ExtentX = 17171
_ExtentY = 450
_Version = 327680
BorderStyle = 1
Appearance = 1
End
End
frmUniform - 1
Option Explicit
Screen.MousePointer = 11
file = "Sigma.prf"
File1 = "Media.prf"
gMsg = "El resultado se guardará" & Chr(10) & _
"en los archivos " & file & " y" & Chr(10) & _
File1
gTitulo = "RESULTADOS"
MsgBox gMsg, vbInformation + vbOKOnly, gTitulo
f = FreeFile
Open file For Output As #f
f1 = FreeFile
Open File1 For Output As #f1
For col = 1 To Fich.Columnas
ProgressBar1.Value = col
'Media
media = 0
For i = 1 To Fich.filas
media = media + gZ(i, col)
Next i
media = media / Fich.filas
Print #f1, Str(col), Str(Format(media, "##0.0000"))
'Desviación
std = 0
For i = 1 To Fich.filas
std = std + (gZ(i, col) - media) ^ 2
Next i
std = Sqr(std / Fich.filas)
Print #f, Str(col), Str(Format(std, "##0.0000"))
Next col
Close #f, #f1
Toolbar1.Visible = True
Toolbar1.Refresh
Screen.MousePointer = 0
End Sub
With ProgressBar1
.min = 0
.max = Fich.Columnas
.Value = 0
End With
End Sub
frmUniform - 2
Call Caption_a_cero
End Sub
Call Caption_a_cero
End Sub
Call Caption_a_cero
End Sub
Call Caption_a_cero
End Sub
End Sub
Unload frmUniform
End Sub
Picture1.Cls
f = FreeFile
Open file For Input As #f
f1 = FreeFile
Open "dibujo.tmp" For Output As #f1
For i = 1 To Fich.filas
Input #f, a, b
Print #f1, Str(a) & ", " & Str(b)
Call ValoresExtremos(b, YMax, Ymin)
'Datos del Chart
fX(i, 1) = Str(a)
fX(i, 2) = b
Next i
Close #f, #f1
Select Case file
Case Is = "Media.prf"
MSChart1.TitleText = "PERFIL MEDIO"
frmUniform - 3
MSChart1.chartType = VtChChartType2dLine
Case Else
MSChart1.TitleText = "DESVIACIÓN"
MSChart1.chartType = VtChChartType2dBar
End Select
MSChart1.ChartData = fX
'Dibujo
If -(YMax - Ymin) = 0 Then
gMsg = "El valor de la función" & Chr(10) & _
"es nulo en todo el dominio."
If file = "Sigma.prf" Then gMsg = gMsg & Chr(10) & _
"La batimetría es uniforme"
gTitulo = "UNIFORMIDAD"
MsgBox gMsg, vbInformation + vbOKOnly, gTitulo
Exit Sub
End If
End Sub
Private Sub Caption_a_cero()
End Sub
End Sub
frmUniform - 1
VERSION 5.00
Object = "{02B5E320-7292-11CF-93D5-0020AF99504A}#1.0#0"; "MSCHART.OCX"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0"; "COMCTL32.OCX"
Begin VB.Form frmUniform
Caption = "UNIFORMIDAD"
ClientHeight = 4545
ClientLeft = 165
ClientTop = 1245
ClientWidth = 11595
Icon = (Icono)
LinkTopic = "Form1"
ScaleHeight = 4545
ScaleWidth = 11595
Begin VB.Frame Frame4
BorderStyle = 0 'None
Height = 495
Left = 2040
TabIndex = 20
Top = 3960
Width = 615
Begin ComctlLib.Toolbar Toolbar2
Height = 390
Left = 120
TabIndex = 21
Top = 120
Width = 375
_ExtentX = 661
_ExtentY = 688
ImageList = "ImageList1"
_Version = 327680
BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
NumButtons = 1
BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
Enabled = 0 'False
Key = "Grafico"
Object.ToolTipText = "Visualizar gráfico"
Object.Tag = ""
ImageIndex = 3
EndProperty
EndProperty
End
End
Begin VB.Frame Frame3
Caption = "Coordenadas"
ForeColor = &H00C00000&
Height = 975
Left = 120
TabIndex = 13
Top = 2880
Width = 2535
Begin VB.Label Label10
Alignment = 2 'Center
BackColor = &H8000000E&
BorderStyle = 1 'Fixed Single
Caption = "Label10"
Height = 255
Left = 360
TabIndex = 17
Top = 600
Width = 1095
End
Begin VB.Label Label9
Alignment = 2 'Center
BackColor = &H8000000E&
BorderStyle = 1 'Fixed Single
Caption = "Label9"
Height = 255
Left = 360
TabIndex = 16
Top = 240
Width = 1095
End
Begin VB.Label Label8
AutoSize = -1 'True
frmUniform - 2
Caption = "&Calcular"
Height = 255
Left = 120
TabIndex = 10
Top = 240
Width = 735
End
End
Begin VB.PictureBox Picture1
AutoRedraw = -1 'True
BackColor = &H8000000E&
Height = 4335
Left = 2760
MousePointer = 2 'Cross
ScaleHeight = 4275
ScaleWidth = 8715
TabIndex = 8
Top = 120
Width = 8775
Begin MSChartLib.MSChart MSChart1
Height = 4335
Left = 0
TabIndex = 19
Top = 0
Visible = 0 'False
Width = 8775
End
End
Begin VB.CommandButton Salir
Caption = "&Salir"
Height = 255
Left = 120
TabIndex = 7
Top = 4200
Width = 975
End
Begin VB.Frame Frame1
Caption = "Batimetría"
ForeColor = &H00C00000&
Height = 1335
Left = 120
TabIndex = 0
Top = 0
Width = 2535
Begin VB.Label Label6
Alignment = 2 'Center
BackColor = &H8000000E&
BorderStyle = 1 'Fixed Single
Caption = " "
Height = 255
Left = 1440
TabIndex = 6
Top = 960
Width = 975
End
Begin VB.Label Label5
Alignment = 2 'Center
BackColor = &H8000000E&
BorderStyle = 1 'Fixed Single
Caption = " "
Height = 255
Left = 1440
TabIndex = 5
Top = 600
Width = 975
End
Begin VB.Label Label4
Alignment = 2 'Center
BackColor = &H8000000E&
BorderStyle = 1 'Fixed Single
Caption = " "
Height = 255
Left = 1440
TabIndex = 4
frmUniform - 4
Top = 240
Width = 975
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "Resolución [x, y]: "
Height = 195
Left = 120
TabIndex = 3
Top = 960
Width = 1260
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "Columnas: "
Height = 195
Left = 120
TabIndex = 2
Top = 600
Width = 780
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Filas: "
Height = 195
Left = 120
TabIndex = 1
Top = 240
Width = 405
End
End
Begin ComctlLib.ImageList ImageList1
Left = 1200
Top = 3960
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 327680
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 3
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = ""
EndProperty
BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = ""
EndProperty
BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = {Binary}
Key = "Grafico"
EndProperty
EndProperty
End
End
Module1 - 1
Option Explicit
Type Tipo_gProyecto
Nombre As String
Batimetria As String
Oleaje As String
Calibracion As String
End Type
Type Tipo_gProyecto_NP
Nombre As String
Batimetria As String
Oleaje As String
Calibracion As String
End Type
Global Perfil_R As Node, Hm_R As Node, Hrms_R As Node, Cg_R As Node, L_R As Node, _
Q_R As Node, S_R As Node, SXX_R As Node, SXY_R As Node, _
SYY_R As Node, E_R As Node, D_R As Node, DR_R As Node, DF_R As Node, _
Ur As Node, SU As Node, Uorb_R As Node, R As Node, _
Rx_R As Node, Ry_R As Node, Fw_R As Node, _
Px_R As Node, Py_R As Node
'DATOS BATIMÉTRICOS
Type DatosGrd
Clase As String * 4
Columnas As Integer
filas As Integer
MinX As Double
MaxX As Double
MinY As Double
MaxY As Double
Minz As Double
MaxZ As Double
Null As String * 4
End Type
'Datos de calibración
Global gK As Single, gG1 As Single, gG2 As Single, gDL As Single, gAlfa As Single, _
gr As Single, gDmin As Single, gInter As Integer, gTipo As String, _
gPrecQb As Single, gPrecLonda As Single, gKf As Single, gUL As Integer
'Gráfico de utilización
Global gChart() As Variant 'Datos del gráfico
Global gChart2() As Variant 'Datos del gráfico de altura de ola
Global gChart3() As Variant 'Datos del gráfico de perfil
Global gChart4() As Variant 'Datos del gráfico de Qb
'Constantes
Global Const g = 9.8182 'Aceleración de la gravedad
Global Const pi = 3.14159265358979 'Constante circular
Global Const rho = 1.026 'Densidad media del agua del mar
Global Const rhoS = 2.5 'Densidad media del sedimento
Global gVer
End Sub
Sub errores(codigo)
'Rutina de captura de errores
End Sub
Sub Dimensionar(i, j)
Call DibujaPerfilChart
End Sub
Sub DibujaPerfilChart()
Screen.MousePointer = 11
For j = 1 To Fich.Columnas
gChart3(j, 1) = Str(j)
gChart3(j, 2) = gZ(1, j)
Next j
frmMain.MSChart3 = gChart3
frmMain.Frame9.Caption = gProyectoNP.Nombre & " (perfil)"
frmMain.MSChart3.Visible = True
Screen.MousePointer = 0
End Sub
Sub HSeno(X As Single)
End Sub
Sub Ayuda(Texto As String)
frmMain.StatusBar1.Panels(4).Text = Texto
End Sub
Sub NoImplementado()
Module1 - 4
End Sub
Sub Existe(file As String)
gTitulo = "¡ATENCIÓN!"
gMsg = "El archivo " & file & _
" existe." & Chr(10) & "¿Sobreescribo?"
gResponse = MsgBox(gMsg, vbCritical + vbYesNo + vbDefaultButton1, gTitulo)
End Sub
Public Sub Tanh(X As Single)
End Sub
Sub LaSonda_Inicio(mensaje As String, Maximo As Integer, Minimo As Integer)
End Sub
Sub Inicializa_Picture1()
frmMain.Picture1.Cls
frmMain.Picture1.ScaleHeight = 4635
frmMain.Picture1.ScaleLeft = 0
frmMain.Picture1.ScaleTop = 0
frmMain.Picture1.ScaleWidth = 6675
frmMain.Picture1.CurrentX = 0
frmMain.Picture1.CurrentY = 0
End Sub
Sub LaSonda_Final()
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print " Final: "; Time; " (";
gFinEvento = Timer
gElapsEvento = gFinEvento - gInicEvento
Call TiempoTranscurrido(gElapsEvento, 1)
gTpo = gElapsEvento
frmMain.StatusBar1.Panels(1).Text = Time
frmMain.Refresh
Unload frmSonda
End Sub
Sub TiempoTranscurrido(tiempo As Single, formato As Integer)
If formato = 1 Then
frmMain.Picture1.Print Str(Format(tiempo, "##0.00")) _
& " segundos)"
Else
frmMain.Picture1.Print "Se emplearon " & _
Str(Format(tiempo, "##0.00")) _
& " segundos en total"
End If
End Sub
Sub Elimina(file As String, sonda As Integer)
frmMain.ProgressBar1.Value = sonda
On Error GoTo Salir
Module1 - 5
Kill file
On Error GoTo 0
Exit Sub
Salir:
frmMain.Picture1.Print "Archivo " & file & " no encontrado"
End Sub
Module2 - 1
Option Explicit
Sub Herramientas()
End Sub
Dim f As Integer
Screen.MousePointer = 11
f = FreeFile
Open file For Input As #f
Input #f, Fich.Clase
Input #f, Fich.Columnas
Input #f, Fich.filas
Input #f, Fich.MinX
Input #f, Fich.MaxX
Input #f, Fich.MinY
Input #f, Fich.MaxY
Input #f, Fich.Minz
Input #f, Fich.MaxZ
'Input #f, Fich.Null
Close #f
gDy = (Fich.MaxY - Fich.MinY) / (Fich.filas - 1)
gDx = (Fich.MaxX - Fich.MinX) / (Fich.Columnas - 1)
Screen.MousePointer = 0
End Sub
Sub LeeCabBinario(file As String)
Dim f As Integer
Screen.MousePointer = 11
f = FreeFile
Open file For Binary As #f
Get #f, , Fich.Clase
Get #f, , Fich.Columnas
Get #f, , Fich.filas
Get #f, , Fich.MinX
Get #f, , Fich.MaxX
Get #f, , Fich.MinY
Get #f, , Fich.MaxY
Get #f, , Fich.Minz
Get #f, , Fich.MaxZ
Close #f
gDy = (Fich.MaxY - Fich.MinY) / (Fich.filas - 1)
gDx = (Fich.MaxX - Fich.MinX) / (Fich.Columnas - 1)
Screen.MousePointer = 0
End Sub
Sub NoHay()
Screen.MousePointer = 0
gMsg = "No existe el archivo especificado" & Chr(10) _
& "Por favor, compruebe que el nombre" & Chr(10) _
& "y la ruta son correctos"
End Sub
Sub leeASCI(file As String)
Screen.MousePointer = 11
f = FreeFile
Open file For Input As #f
Input #f, Fich.Clase
Input #f, Fich.Columnas
Input #f, Fich.filas
Input #f, Fich.MinX
Input #f, Fich.MaxX
Input #f, Fich.MinY
Input #f, Fich.MaxY
Input #f, Fich.Minz
Input #f, Fich.MaxZ
frmMain.Picture1.FontBold = True
frmMain.ProgressBar2.min = 0
frmMain.ProgressBar2.max = Fich.filas
For i = 1 To Fich.filas
frmMain.ProgressBar1.Value = i
frmMain.ProgressBar2.Value = i
For j = 1 To Fich.Columnas
Input #f, gZ(i, j)
Next j
Input #f, Fich.Null
Next i
Close #f
frmMain.Dibujo.Enabled = True
frmMain.Playa_Cilindrica.Enabled = True
frmMain.A_Grapher.Enabled = True
Screen.MousePointer = 0
End Sub
Sub LeeBinario(file As String)
Screen.MousePointer = 11
f = FreeFile
Open file For Binary As #f
Get #f, , Fich.Clase
Get #f, , Fich.Columnas
Get #f, , Fich.filas
Get #f, , Fich.MinX
Get #f, , Fich.MaxX
Get #f, , Fich.MinY
Get #f, , Fich.MaxY
Get #f, , Fich.Minz
Get #f, , Fich.MaxZ
frmMain.Picture1.FontBold = True
frmMain.ProgressBar2.min = 1
frmMain.ProgressBar2.max = Fich.filas
frmMain.ProgressBar1.min = 1
frmMain.ProgressBar1.max = Fich.filas
For i = 1 To Fich.filas
frmMain.ProgressBar1.Value = i
frmMain.ProgressBar2.Value = i
For j = 1 To Fich.Columnas
Get #f, , gZ(i, j)
Next j
Next i
Module2 - 3
Close #f
frmMain.Dibujo.Enabled = True
frmMain.Playa_Cilindrica.Enabled = True
frmMain.A_Grapher.Enabled = True
Screen.MousePointer = 0
End Sub
Sub TipoGrd(file As String)
Dim f As Integer
f = FreeFile
Open file For Binary As #f
Get #f, , Fich.Clase
Close #f
End Sub
Sub ImprimeCabBati()
Screen.MousePointer = 11
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Filas: ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Fich.filas,
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Columnas: ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Fich.Columnas
frmMain.Picture1.Print
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Coordenada X: Entre ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Fich.MinX;
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print " y ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Fich.MaxX
frmMain.Picture1.Print
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Coordenada Y: Entre ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Fich.MinY;
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print " y ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Fich.MaxY
frmMain.Picture1.Print
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Coordenada Z: Entre ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Fich.Minz;
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print " y ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Fich.MaxZ
frmMain.Picture1.Print
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Distancia entre filas: ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Format(gDy, "#####0.00")
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Distancia entre columnas: ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Format(gDx, "#####0.00")
Screen.MousePointer = 0
End Sub
Sub LeeOlas(file As String)
Dim f As Integer
Screen.MousePointer = 11
Module2 - 4
f = FreeFile
Screen.MousePointer = 0
End Sub
Sub ImprimeOleaje()
Screen.MousePointer = 11
frmMain.Picture1.Print
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Altura de ola media cuadrática [m]: ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Format(gHo, "###0.00")
frmMain.Picture1.Print
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Periodo [s]: ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Format(gTo, "###0.00")
frmMain.Picture1.Print
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Oblicuidad [º]: ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Format(gObo, "###0.00")
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print
frmMain.Picture1.Print "Longitud de onda Lo [m]: ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Format(gLo, "###0.00")
frmMain.Picture1.FontBold = False
Screen.MousePointer = 0
End Sub
Dim f As Integer
Screen.MousePointer = 11
Incompleto:
Resume Next
End Sub
Sub ImprimeCalibra()
Module2 - 5
Screen.MousePointer = 11
frmMain.Picture1.Print
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Parámetro de Dally: ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Str(Format(gK, "####0.00"))
frmMain.Picture1.Print
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Parámetro de Battjes y Stive: ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Str(Format(gG1, "0.00"))
frmMain.Picture1.Print
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Relación H/d para máxima ola estable: ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Str(Format(gG2, "####0.00"))
frmMain.Picture1.Print
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Límite de profundidades reducidas: ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Str(Format(gDL, "####0.00"))
frmMain.Picture1.Print
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Coeficiente de disipación de energía por rotura de oleaje: ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Str(Format(gAlfa, "####0.00"))
frmMain.Picture1.Print
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Parámetro modificador de la fricción con el fondo: ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Str(Format(gKf, "####0.00"))
frmMain.Picture1.Print
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Parámetro de Nikuradse: ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Str(Format(gr, "####0.00"))
frmMain.Picture1.Print
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print "Profundidad mínima de cálculo: ";
frmMain.Picture1.FontBold = True
frmMain.Picture1.Print Str(Format(gDmin, "####0.00"))
frmMain.Picture1.Print
frmMain.Picture1.FontBold = True
If gInter = 1 Then
frmMain.Picture1.Print "Interacción oleaje - corriente /";
Else
frmMain.Picture1.Print "Sin interacción oleaje - corriente /";
End If
frmMain.Picture1.FontItalic = True
frmMain.Picture1.FontUnderline = True
frmMain.Picture1.ForeColor = vbRed
If gUL = 1 Then
frmMain.Picture1.Print " Playa cilíndrica";
Else
frmMain.Picture1.Print " Playa no uniforme";
End If
frmMain.Picture1.FontItalic = False
frmMain.Picture1.FontUnderline = False
frmMain.Picture1.ForeColor = vbBlack
frmMain.Picture1.Print
frmMain.Picture1.FontBold = False
frmMain.Picture1.Print
frmMain.Picture1.Print "Tipo de archivos de resultados: ";
frmMain.Picture1.FontBold = True
If gTipo = "DSBB" Then
frmMain.Picture1.Print "Binario"
ElseIf gTipo = "DSAA" Then
frmMain.Picture1.Print "ASCI"
Else
frmMain.Picture1.Print "Binario"
gTipo = "DSBB"
End If
Screen.MousePointer = 0
Module2 - 6
End Sub
Module3 - 1
Option Explicit
frmMain.Label19.Caption = ""
frmMain.Label20.Caption = ""
End Sub
Sub perfil(fila As Integer, ventana As String, file As String)
'Rutina de dibujo del perfil_dato
Screen.MousePointer = 11
ReDim d(1 To Fich.Columnas) As Single, _
X(1 To Fich.Columnas) As Single
Call Extremos("Dibujo.tmp")
Call Escala(ventana)
Call ejes(ventana)
Call Grafico(ventana, file)
Call Rotulos(ventana)
Call Grid(ventana)
Screen.MousePointer = 0
End Sub
Sub Rotulos(ventana As String)
End Sub
Sub Grid(ventana As String)
End Sub
Sub Escala(ventana As String)
aiaiai:
gZonaError = "Dibujo de perfiles"
Call errores(Err.Number)
End Sub
Sub Extremos(file As String)
'Rutina de cálculo de extremos de los datos contenidos en el archivo "file"
Dim f As Integer
f = FreeFile
XMax = -1E+32
Xmin = -XMax
YMax = XMax
Ymin = Xmin
NoTmp:
Screen.MousePointer = 0
gMsg = "No se ha generado el archivo temporal"
gTitulo = "ERROR DE DIBUJO"
MsgBox gMsg, vbCritical + vbOKOnly, gTitulo
Exit Sub
End Sub
Sub ejes(ventana As String)
Case Is = "frmUnifrom"
With frmUniform
.Picture1.Line (Xmin, 0)-(XMax, 0), RGB(255, 0, 0)
End With
End Select
End Sub
'**************************************************************
'* MODULO "Modelo_BJG" *
'* ---------------------------------------------------------- *
'* Modelo de Battjes & Janssen (1.978)eliminando la hipótesis *
'* de uniformidad longitudinal *
'**************************************************************
Select Case i
Case Is = 1
gRx(i, j) = (gSxx(i, j) - gSxx(i, j - 1)) / gDx
gRx(i, j) = Deno * gRx(i, j)
End Sub
Select Case i
Case Is = 1
S = (gSxx(i, j) - gSxx(i, j - 1)) / gDx
Case Else
S = (gSxx(i, j) - gSxx(i, j - 1)) / gDx + _
(gSxy(i, j) - gSxy(i - 1, j)) / gDy
End Select
End Sub
Sub TensorRadiacion(i As Integer, j As Integer)
ob = gOb(i, j) * pi / 180
g = 2 * gNO(i, j) * (-1) * gZ(i, j)
Call HSeno(g)
Module4 - 2
g = g / gSh
End Sub
Sub Ursell(i As Integer, j As Integer)
End Sub
End Sub
Sub Hrms(i, j)
End Sub
Sub Qb(i As Integer, j As Integer)
delta = 10000
mi = 0.00001
rH = (gHrms(i, j) / gHm(i, j)) ^ 2
Select Case gHrms(i, j)
Case Is < gHm(i, j)
Do While delta > 0.0001
gQb(i, j) = Exp(-(1 - mi) / rH)
delta = Abs(gQb(i, j) - mi)
mi = gQb(i, j)
Loop
Case Else
gQb(i, j) = rH
End Select
End Sub
Sub U_orb(i As Integer, j As Integer)
End Sub
Sub Df(i As Integer, j As Integer)
Dim k As Single
End Sub
Sub Db(i As Integer, j As Integer)
End Sub
Sub Cg(i As Integer, j As Integer)
End Sub
End Sub
Sub Datos_Iniciales()
Dim f As Integer
Screen.MousePointer = 11
frmMain.Picture1.FontBold = True
Call LeeOlas(gProyecto.Oleaje)
For i = 1 To Fich.filas
gHrms(i, 1) = gHo
gOb(i, 1) = gObo
gE(i, 1) = rho * g * gHo * gHo / 8
gSU(i, 1) = 0
Next i
Screen.MousePointer = 0
End Sub
Sub LOnda(i As Integer, j As Integer)
Dim ob As Single
For i = 1 To Fich.filas
ob = gOb(i, 1) * pi / 180
'gCteOb(i) = Sin(ob) / gCg(i, 1) 'Evalúa la constante en radianes
gCteOb(i) = Sin(ob) * gNO(i, 1) 'Evalúa la constante en radianes
Next i
End Sub
Sub Alfa(i As Integer, j As Integer)
Module4 - 5
End Sub
Sub Hm_Miche(i As Integer, j As Integer)
End Sub
Module5 - 1
Option Explicit
End Sub
Sub Escribe_Binario(file As String, canal As Integer, _
min As Double, max As Double, variable As String)
Case Is = "Ur"
Put #canal, , gUr(i, j)
Case Is = "SU"
Put #canal, , gSU(i, j)
Case Is = "Rx"
Put #canal, , gRx(i, j)
Case Is = "Ry"
Put #canal, , gRy(i, j)
Case Is = "Fw"
Put #canal, , gFw(i, j)
Case Else
gTitulo = "FALTA ALGO"
gMsg = "El archivo con referencia " & variable & Chr(10) & _
"no se ha grabado satisfactoriamente." & Chr(10) & _
"Hay un fallo de codificación"
MsgBox gMsg, vbInformation + vbOKOnly, gTitulo
Close #canal
Exit Sub
End Select
Next j
Next i
Close #canal
End Sub
Sub Add_ASCI_linea(file As String, canal As Integer, cadena As String)
End Sub
Sub Add_ASCI_fin(file As String, canal As Integer, cadena As String)
End Sub