Professional Documents
Culture Documents
Lampiran F
Lampiran F
Algoritma
Perselingan
Sisipan
plpl
glgl
pbpb
pkpk
pgpg
plp
lpl
bpb
pbp
glg
lgl
pkp
kpk
pb
bp
pl
lp
gl
lg
pg
gp
pk
kp
pbm
bpm
plm
lpm
glm
lgm
pgm
gpm
pkm
kpm
pp
bb
gg
kk
ll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Fungsi
Kode
Simbol
Litologi
Satulitologi
Berlapis
No
Litologi
Batupasir-Batulempung
Batugamping-Batulempung
Batupasir-Breksi
Batupasir-Konglomerat
Batupasir-Batugamping
Batupasir-Batulempung
Batulempung-Batupasir
Breksi-Batupasir
Batupasir-Breksi
Batugamping-Batulempung
Batulempung-Batugamping
Batupasir-Konglomerat
Konglomerat-Batupasir
Batupasir-Breksi
Breksi-Batupasir
Batupasir-Batulempung
Batulempung-Batupasir
Batugamping-Batulempung
Batulempung-Batugamping
Batupasir-Batugamping
Batugamping-Batupasir
Batupasir-Konglomerat
Konglomerat-Batupasir
Batupasir-Breksi
Breksi-Batupasir
Batupasir-Batulempung
Batulempung-Batupasir
Batugamping-Batulempung
Batulempung-Batugamping
Batupasir-Batugamping
Batugamping-Batupasir
Batupasir-Konglomerat
Konglomerat-Batupasir
Batupasir
Breksi
Batugamping
Konglomerat
Batulempung
Algoritma
No
Kode
Simbol
Litologi
39
40
41
42
43
44
45
46
47
48
49
p
b
g
k
l
f
gn
al
la
lv
di
Fungsi
Litologi
Satulitologi masif
Lampiran F
Batupasir
Breksi
Batugamping
Konglomerat
Batulempung
Filit
Gneiss
Aluvial
Lanau
Lava
Diorit
Catatan : Untuk menjalankan program, kolom yang ditandai dengan warna kuning wajib diisi
dengan posisi kolom dan baris awal sesuai database diatas. Selebihnya boleh tidak
diisi.
Lampiran F
Algoritma
Lampiran F
ExcelApp As Object
ms As AcadModelSpace
batu As AcadHatch
pt(14) As Double
kotak(0) As AcadEntity
ktk(0) As AcadEntity
var As Integer
p, p2, p3, p4, t As Double
Function ExcelConnect()
' This function connects excel with autocad
On Error Resume Next
Set ExcelApp = GetObject(, "Excel.Application")
If Err Then
Err.Clear
Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.Visible = True
If Err Then
MsgBox Err.Description
Exit Function
End If
End If
End Function
Function ExcelClose()
' This function closes the connection between excel ana Autocad
Set ExcelApp = Nothing
End Function
Function GetCellValue(row As Integer, column As Integer) As Variant
' This function returns the value of a given cell in excel.
GetCellValue = ExcelApp.ActiveSheet.Cells(row, column).Value
End Function
Sub QuickExample()
Dim MyString As String 'Create string variable
Dim Point(2) As Double 'koordinat singkapan
Dim SPoint(2) As Double 'koordinat ujung garis strike
Dim EPoint(2) As Double 'koordinat ujung garis strike2
Dim DPoint(2) As Double 'koordinat ujung garis dip
Dim TextHeight As Double 'tinggi huruf
Dim Strike As Integer
Dim DIP As Integer
Dim Pjng As Integer 'panjang garis strike
Dim z As Integer
Dim o(2) As Double 'koordinat angka dip
Dim C As String
Dim circlea As AcadCircle
Dim w As Double
Dim simlit As String
Dim kolok As String
Dim tampil As String
w = 30
Pjng = 125
Point(2) = 0
TextHeight = 20
For z = 3 To 194 Step 1
Algoritma
Lampiran F
Algoritma
Call ExcelToAcad(Point(), Strike, z, DIP, C, simlit, kolok, tampil) 'nginput data dari
excel
If Not tampil = "x" Then
If C = "v" Then
Call kodelokasi(Point(), kolok) 'bikin kodelokasi
Call GetCoord(Point(), Strike, Pjng, SPoint(), EPoint(), DPoint()) 'ngitung koordinat
garis-garis kedudukan
Call simbolbatu(EPoint(), SPoint(), Strike, C, Point(), simlit) 'gambar simbol litologi
Dim lineObj As AcadLine
Set lineObj = ThisDrawing.ModelSpace.AddLine(SPoint, EPoint)
lineObj.Lineweight = acLnWt025 'tebal garis
Set lineObj = ThisDrawing.ModelSpace.AddLine(Point, DPoint)
lineObj.Lineweight = acLnWt025
If (Strike > 90) And (Strike < 180) Then
o(0) = DPoint(0) - 20
o(1) = DPoint(1) - 30
ThisDrawing.ModelSpace.AddText DIP, o, TextHeight
Else
ThisDrawing.ModelSpace.AddText DIP, DPoint, TextHeight
End If
ElseIf C = "x" Then
Call kodelokasi(Point(), kolok)
Call simbolbatu(EPoint(), SPoint(), Strike, C, Point(), simlit)
End If
End If
Next
End Sub
Sub ExcelToAcad(A() As Double, S As Integer, z As Integer, D As Integer, x As String, lit As
String, kod As String, tampil As String)
ExcelConnect
x = GetCellValue(z, 9)
A(0) = GetCellValue(z, 4) ' Ax
A(1) = GetCellValue(z, 5) ' Ay
lit = GetCellValue(z, 11)
kod = GetCellValue(z, 3)
tampil = GetCellValue(z, 13)
If x = "v" Then
S = GetCellValue(z, 7)
D = GetCellValue(z, 8)
End If
' Closing the excel-autocad link
ExcelClose
End Sub
Sub GetCoord(TtkPus() As Double, STRnya, Pjn, SS() As Double, ES() As Double, DIP() As Double)
Dim Phi As Single
Phi = 22 / 7
Dim DumSP(2) As Double
Dim SdtRad As Single
SdtRad = (90 - STRnya) * Phi / 180
'x = xr + (x xr) cos a (y yr) sin a
'y = yr + (y yr) cos a + (x xr) sin a
DumSP(0) = TtkPus(0) - Pjn * 0.5: DumSP(1) = TtkPus(1): DumSP(2) = TtkPus(2)
SS(0) = TtkPus(0) + ((DumSP(0) - TtkPus(0)) * Cos(SdtRad)) - ((DumSP(1) - TtkPus(1)) *
Sin(SdtRad))
SS(1) = TtkPus(1) + ((DumSP(1) - TtkPus(1)) * Cos(SdtRad)) + ((DumSP(0) - TtkPus(0)) *
Sin(SdtRad))
SS(2) = 0
Lampiran F
Algoritma
End Sub
Sub simbolbatu(kn() As Double, kr() As Double, jurus As Integer, cekdip As String, pusat() As
Double, simb As String)
Lampiran F
Algoritma
Lampiran F
Algoritma
Dim
Dim
Dim
Dim
Dim
Dim
radius As Double
panjang As Double
garis As AcadLine
ling As AcadCircle
g(8) As Double
wrn(1) As AcadEntity
panjang = 350
radius = 55
B(0)
C(0)
D(0)
E(0)
F(0)
=
=
=
=
=
A(0)
B(0)
B(0)
C(0)
C(0)
+
+
+
Lampiran F
Algoritma
Lampiran F
Algoritma
Lampiran F
Algoritma
pt(9) = kr(0) - (p2 * (var + 1) * Sin((90 - jurus) * (22 / 7 / 180))): pt(10) = kr(1) + (p2 *
(var + 1) * Cos((90 - jurus) * (22 / 7 / 180))): pt(11) = 0
pt(12) = kr(0) - (p2 * var * Sin((90 - jurus) * (22 / 7 / 180))): pt(13) = kr(1) + (p2 * var *
Cos((90 - jurus) * (22 / 7 / 180))): pt(14) = 0
If var = 0 Then
hatchwarnakotak warnasatu, pt()
hatchpolakotak polasatu, skalapolasatu, jurus, pt()
ElseIf var = 1 Then
hatchwarnakotak warnadua, pt()
hatchpolakotak poladua, skalapoladua, jurus, pt()
End If
Next
End Function
Function dualitmasif(pusat() As Double, kn() As Double, kr() As Double, jurus As Integer,
warnasatu As Integer, warnadua As Integer, polasatu As String, poladua As String, skalapolasatu
As Integer, skalapoladua As Integer)
p = 12.5
p2 = 25
p3 = 37.5
p4 = 62.5
t = 25
t2 = 40
pt(0) = pusat(0) - p4: pt(1) = pusat(1): pt(2) = 0
pt(3) = pusat(0) + p4: pt(4) = pusat(1): pt(5) = 0
pt(6) = pusat(0) + p4: pt(7) = pusat(1) + t2: pt(8) = 0
pt(9) = pusat(0) - p4: pt(10) = pusat(1) + t2: pt(11) = 0
pt(12) = pusat(0) - p4: pt(13) = pusat(1): pt(14) = 0
hatchwarnakotak warnasatu, pt()
hatchpolakotaksatu polasatu, skalapolasatu, pt()
pt(0) = pusat(0) - p4: pt(1) = pusat(1): pt(2) = 0
pt(3) = pusat(0) + p4: pt(4) = pusat(1): pt(5) = 0
pt(6) = pusat(0) + p4: pt(7) = pusat(1) - t2: pt(8) = 0
pt(9) = pusat(0) - p4: pt(10) = pusat(1) - t2: pt(11) = 0
pt(12) = pusat(0) - p4: pt(13) = pusat(1): pt(14) = 0
hatchwarnakotak warnadua, pt()
hatchpolakotaksatu poladua, skalapoladua, pt()
End Function
Function litabcab(pusat() As Double, kn() As Double, kr() As Double, jurus As Integer, warnasatu
As Integer, warnadua As Integer, warnatiga As Integer, polasatu As String, poladua As String,
polatiga As String, skalapolasatu As Integer, skalapoladua As Integer, skalapolatiga As Integer)
p = 20
p2 = 25
p3 = 37.5
p4 = 62.5
t = 25
t2 = 25
For var = 0 To 4 Step 1
pt(0) = kr(0) - (p * var * Sin((90 - jurus) * (22 / 7 / 180))): pt(1) = kr(1) + (p * var *
Cos((90 - jurus) * (22 / 7 / 180))): pt(2) = 0
pt(3) = kn(0) - (p * var * Sin((90 - jurus) * (22 / 7 / 180))): pt(4) = kn(1) + (p * var *
Cos((90 - jurus) * (22 / 7 / 180))): pt(5) = 0
pt(6) = kn(0) - (p * (var + 1) * Sin((90 - jurus) * (22 / 7 / 180))): pt(7) = kn(1) + (p * (var
+ 1) * Cos((90 - jurus) * (22 / 7 / 180))): pt(8) = 0
pt(9) = kr(0) - (p * (var + 1) * Sin((90 - jurus) * (22 / 7 / 180))): pt(10) = kr(1) + (p *
(var + 1) * Cos((90 - jurus) * (22 / 7 / 180))): pt(11) = 0
pt(12) = kr(0) - (p * var * Sin((90 - jurus) * (22 / 7 / 180))): pt(13) = kr(1) + (p * var *
Cos((90 - jurus) * (22 / 7 / 180))): pt(14) = 0
If var = 0 Or var = 3 Then
hatchwarnakotak warnasatu, pt()
hatchpolakotak polasatu, skalapolasatu, jurus, pt()
ElseIf var = 2 Then
hatchwarnakotak warnatiga, pt()
hatchpolakotak polatiga, skalapolatiga, jurus, pt()
ElseIf var = 1 Or var = 4 Then
hatchwarnakotak warnadua, pt()
hatchpolakotak poladua, skalapoladua, jurus, pt()
End If
Next
End Function
Lampiran F
Algoritma
Function litabcba(pusat() As Double, kn() As Double, kr() As Double, jurus As Integer, warnasatu
As Integer, warnadua As Integer, warnatiga As Integer, polasatu As String, poladua As String,
polatiga As String, skalapolasatu As Integer, skalapoladua As Integer, skalapolatiga As Integer)
p = 12.5
p2 = 25
p3 = 37.5
p4 = 62.5
t = 25
t2 = 25
For var = 0 To 4 Step 1
pt(0) = kr(0) - (p * var * Sin((90 - jurus) * (22 / 7 / 180))): pt(1) = kr(1) + (p * var *
Cos((90 - jurus) * (22 / 7 / 180))): pt(2) = 0
pt(3) = kn(0) - (p * var * Sin((90 - jurus) * (22 / 7 / 180))): pt(4) = kn(1) + (p * var *
Cos((90 - jurus) * (22 / 7 / 180))): pt(5) = 0
pt(6) = kn(0) - (p * (var + 1) * Sin((90 - jurus) * (22 / 7 / 180))): pt(7) = kn(1) + (p * (var
+ 1) * Cos((90 - jurus) * (22 / 7 / 180))): pt(8) = 0
pt(9) = kr(0) - (p * (var + 1) * Sin((90 - jurus) * (22 / 7 / 180))): pt(10) = kr(1) + (p *
(var + 1) * Cos((90 - jurus) * (22 / 7 / 180))): pt(11) = 0
pt(12) = kr(0) - (p * var * Sin((90 - jurus) * (22 / 7 / 180))): pt(13) = kr(1) + (p * var *
Cos((90 - jurus) * (22 / 7 / 180))): pt(14) = 0
If var = 0 Or var = 4 Then
hatchwarnakotak warnasatu, pt()
hatchpolakotak polasatu, skalapolasatu, jurus, pt()
ElseIf var = 2 Then
hatchwarnakotak warnatiga, pt()
hatchpolakotak polatiga, skalapolatiga, jurus, pt()
ElseIf var = 1 Or var = 3 Then
hatchwarnakotak warnadua, pt()
hatchpolakotak poladua, skalapoladua, jurus, pt()
End If
Next
End Function
Function liatabac(pusat() As Double, kn() As Double, kr() As Double, jurus As Integer, warnasatu
As Integer, warnadua As Integer, warnatiga As Integer, polasatu As String, poladua As String,
polatiga As String, skalapolasatu As Integer, skalapoladua As Integer, skalapolatiga As Integer)
p = 12.5
p2 = 25
p3 = 37.5
p4 = 62.5
t = 25
t2 = 25
For var = 0 To 4 Step 1
pt(0) = kr(0) - (p * var * Sin((90 - jurus) * (22 / 7 / 180))): pt(1) = kr(1) + (p * var *
Cos((90 - jurus) * (22 / 7 / 180))): pt(2) = 0
pt(3) = kn(0) - (p * var * Sin((90 - jurus) * (22 / 7 / 180))): pt(4) = kn(1) + (p * var *
Cos((90 - jurus) * (22 / 7 / 180))): pt(5) = 0
pt(6) = kn(0) - (p * (var + 1) * Sin((90 - jurus) * (22 / 7 / 180))): pt(7) = kn(1) + (p * (var
+ 1) * Cos((90 - jurus) * (22 / 7 / 180))): pt(8) = 0
pt(9) = kr(0) - (p * (var + 1) * Sin((90 - jurus) * (22 / 7 / 180))): pt(10) = kr(1) + (p *
(var + 1) * Cos((90 - jurus) * (22 / 7 / 180))): pt(11) = 0
pt(12) = kr(0) - (p * var * Sin((90 - jurus) * (22 / 7 / 180))): pt(13) = kr(1) + (p * var *
Cos((90 - jurus) * (22 / 7 / 180))): pt(14) = 0
If var = 0 Or var = 2 Then
hatchwarnakotak warnasatu, pt()
hatchpolakotak polasatu, skalapolasatu, jurus, pt()
ElseIf var = 1 Then
hatchwarnakotak warnadua, pt()
hatchpolakotak poladua, skalapoladua, jurus, pt()
ElseIf var = 3 Then
hatchwarnakotak warnatiga, pt()
hatchpolakotak polatiga, skalapolatiga, jurus, pt()
End If
Next
End Function
Lampiran F
Algoritma
Lampiran F
ExcelApp As Object
ms As AcadModelSpace
kotak(0) As AcadEntity
batu As AcadHatch
Function ExcelConnect()
' This function connects excel with autocad
On Error Resume Next
Set ExcelApp = GetObject(, "Excel.Application")
If Err Then
Err.Clear
Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.Visible = True
If Err Then
MsgBox Err.Description
Exit Function
End If
End If
End Function
Function ExcelClose()
' This function closes the connection between excel ana Autocad
Set ExcelApp = Nothing
End Function
Function GetCellValue(row As Integer, column As Integer) As Variant
' This function returns the value of a given cell in excel.
GetCellValue = ExcelApp.ActiveSheet.Cells(row, column).Value
End Function
Sub kolom()
Dim beta As Double 'sudut antara strike dan bearing
Dim jarak As Double
Dim sdtbr As Double
Dim alpha As Double 'sudut antara 0 dan bearing
Dim tebal As Double
Dim t1 As Double
Dim t2 As Double
Dim phi As Double
Dim a As Integer
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
strike As Double
dip As Double
x(2) As Double
y(2) As Double
z(2) As Double
dx As Double
dy As Double
dz As Double
dxperdy As Double
pos1(2) As Double
pos2(2) As Double
pos3(2) As Double
pos4(2) As Double
kolok As String
kode(2) As String
warna As Integer
tb(2) As Double
thc As Double
hubungan As String
m As Double
n As Double
jumdat As Integer
ExcelConnect
jumdat = GetCellValue(1, 2)
ExcelClose
jumdat = jumdat + 2
Algoritma
Lampiran F
Algoritma
m = 1
n = 100
pos3(0) = 0: pos3(1) = 0: pos3(2) = 0
For a = 4 To jumdat Step 1
Call ExcelToAcad(a, x(), y(), z(), strike, dip, kolok)
dx = x(1) - x(0)
dy = y(1) - y(0)
jarak = ((dx ^ 2) + (dy ^ 2)) ^ 0.5
phi = (22 / 7) / 180
dxperdy = (dy / dx)
alpha = Atn(dxperdy)
sdtbr = alpha - ((90 - strike) * phi)
t1 = jarak * Sin(sdtbr) * Sin(dip * phi)
dz = z(1) - z(0)
t2 = dz * Cos(dip * phi)
tebal = (t1 + t2) * m
pos1(0) = pos3(0): pos1(1) = pos3(1): pos1(2) = 0
pos2(0) = pos1(0): pos2(1) = pos1(1) + tebal: pos2(2) = 0
pos4(0) = pos1(0) + n: pos4(1) = pos1(1)
Call bikinskala(pos1, pos2, tebal, kolok)
ThisDrawing.ModelSpace.AddLine pos1, pos2
ThisDrawing.ModelSpace.AddLine pos1, pos4
'Call gambarlito(thc, tb(), pos3(0), pos3(1), hubungan, kode())
ThisDrawing.ModelSpace.AddText kolok, pos4, 12
pos3(0) = pos2(0): pos3(1) = pos2(1): pos3(2) = 0
Next
ExcelConnect
kolok = GetCellValue(a, 1)
ExcelClose
pos4(0) = pos3(0) + n: pos4(1) = pos3(1)
ThisDrawing.ModelSpace.AddLine pos3, pos4
ThisDrawing.ModelSpace.AddText kolok, pos4, 12
End Sub
Function
Dim p(2)
Dim q(2)
Dim r(2)
Dim s(2)
Dim t(2)
Dim u(2)
Dim v(2)
Dim w(2)
Dim o As
Dim h As Double
Dim i As Double
o = Abs(tebal)
h = 10
i = 10
p(0)
q(0)
r(0)
t(0)
u(0)
s(0)
=
=
=
=
=
=
pos1(0) p(0) - i:
q(0) + (i
pos2(0) t(0) - i:
u(0) + (i
= 0
= 0
= 0
= 0
ThisDrawing.ModelSpace.AddLine p, q
ThisDrawing.ModelSpace.AddLine r, s
ThisDrawing.ModelSpace.AddLine t, u
v(0) = q(0) - 50: v(1) = p(1) + (tebal / 2): v(2) = 0
w(0) = v(0) + 30: w(1) = v(1): w(2) = 0
ThisDrawing.ModelSpace.AddText o, v, 12
Lampiran F
Algoritma
ThisDrawing.ModelSpace.AddText "m", w, 12
End Function
Sub ExcelToAcad(z As Integer, b() As Double, c() As Double, d() As Double, str As Double, dp
As Double, klk As String)
' declaration of variables
Dim r As Integer
Dim p As Integer
Dim q As Integer
ExcelConnect
b(0) = GetCellValue(z, 2)
b(1) = GetCellValue(z + 1, 2)
c(0) = GetCellValue(z, 3)
c(1) = GetCellValue(z + 1, 3)
d(0) = GetCellValue(z, 4)
d(1) = GetCellValue(z + 1, 4)
str = GetCellValue(z, 5)
dp = GetCellValue(z, 6)
klk = GetCellValue(z, 1)
' Closing the excel-autocad link
ExcelClose
End Sub
Function bikinkotak(x As Double, krx As Double, kry As Double, warna As Integer, pola As
String)
Dim pt(14) As Double
pt(0) = krx: pt(1) = kry: pt(2) = 0
pt(3) = krx + 500: pt(4) = kry: pt(5) = 0
pt(6) = krx + 500: pt(7) = kry + x: pt(8) = 0
pt(9) = krx: pt(10) = kry + x: pt(11) = 0
pt(12) = krx: pt(13) = kry: pt(14) = 0
Set kotak(0) = ThisDrawing.ModelSpace.AddPolyline(pt)
Set batu = ThisDrawing.ModelSpace.AddHatch(acHatchPatternTypePreDefined, "solid", True)
batu.AppendOuterLoop (kotak)
batu.Color = warna
batu.Evaluate
batu.Update
End Function
Lampiran F
Algoritma
kode
ss
cl
bx
cal
kode
cl
st
vfs
fs
ms
cs
vcs
gr
pb
cb
bl
Lampiran F
Algoritma
ExcelApp As Object
ms As AcadModelSpace
kotak(0) As AcadEntity
batu As AcadHatch
Function ExcelConnect()
' This function connects excel with autocad
On Error Resume Next
Set ExcelApp = GetObject(, "Excel.Application")
If Err Then
Err.Clear
Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.Visible = True
If Err Then
MsgBox Err.Description
Exit Function
End If
End If
End Function
Function ExcelClose()
' This function closes the connection between excel ana Autocad
Set ExcelApp = Nothing
End Function
Function GetCellValue(row As Integer, column As Integer) As Variant
' This function returns the value of a given cell in excel.
GetCellValue = ExcelApp.ActiveSheet.Cells(row, column).Value
End Function
Sub profil()
Dim tebal As Double
Dim umin As String
Dim umax As String
Dim bmin As Double
Dim bmax As Double
Dim litologi As String
Dim kodelokasi As String
Dim krx As Double
Dim kry As Double
Dim ptr As String
Dim clr As Integer
Dim awal As Double
Dim jumdat As Integer
ExcelConnect
jumdat = GetCellValue(2, 2) + 4
ExcelClose
krx = 0: kry = 0
awal = kry
Dim a As Integer
For a = 5 To jumdat
Call ExcelToAcad(a, tebal, umin, umax, litologi, kodelokasi)
Call kbtr(umin, umax, bmin, bmax)
Call simbol(litologi, clr, ptr)
Call gambar(tebal, bmin, bmax, krx, kry, clr, ptr)
Next
bikintabel krx, kry, awal, kodelokasi
End Sub
Sub ExcelToAcad(z As Integer, t As Double, min As String, max As String, lito As String, kolok
As String)
ExcelConnect
t = GetCellValue(z, 1)
min = GetCellValue(z, 3)
max = GetCellValue(z, 4)
lito = GetCellValue(z, 2)
Lampiran F
Algoritma
kolok = GetCellValue(1, 2)
' Closing the excel-autocad link
ExcelClose
End Sub
Sub kbtr(imin As String, imax As String, omin As Double, omax As Double)
Dim m As Integer
Dim n As Integer
m = 7
n = 7
If imin = "cl" Then
omin = (0 * m) + n
ElseIf imin = "st" Then
omin = (1 * m) + n
ElseIf imin = "vfs" Then
omin = (2 * m) + n
ElseIf imin = "fs" Then
omin = (2.5 * m) + n
ElseIf imin = "ms" Then
omin = (3 * m) + n
ElseIf imin = "cs" Then
omin = (3.5 * m) + n
ElseIf imin = "vcs" Then
omin = (4 * m) + n
ElseIf imin = "gr" Then
omin = (5 * m) + n
ElseIf imin = "pb" Then
omin = (6 * m) + n
ElseIf imin = "cb" Then
omin = (7 * m) + n
ElseIf imin = "bl" Then
omin = (8 * m) + n
End If
If imax = "cl" Then
omax = (0 * m) + n
ElseIf imax = "st" Then
omax = (1 * m) + n
ElseIf imax = "vfs" Then
omax = (2 * m) + n
ElseIf imax = "fs" Then
omax = (2.5 * m) + n
ElseIf imax = "ms" Then
omax = (3 * m) + n
ElseIf imax = "cs" Then
omax = (3.5 * m) + n
ElseIf imax = "vcs" Then
omax = (4 * m) + n
ElseIf imax = "gr" Then
omax = (5 * m) + n
ElseIf imax = "pb" Then
omax = (6 * m) + n
ElseIf imax = "cb" Then
omax = (7 * m) + n
ElseIf imax = "bl" Then
omax = (8 * m) + n
End If
End Sub
Sub gambar(tbl As Double, mn As Double, mx As Double, kx As Double, ky As Double, col As
Integer, prn As String)
Dim pt(14) As Double
Call ekspresitopo(kx, ky, mn, mx, tbl, prn, col)
pt(0) = kx: pt(1) = ky: pt(2) = 0
pt(3) = kx - mn: pt(4) = ky: pt(5) = 0
pt(6) = kx - mx: pt(7) = ky + tbl: pt(8) = 0
pt(9) = kx: pt(10) = ky + tbl: pt(11) = 0
pt(12) = kx: pt(13) = ky: pt(14) = 0
Set kotak(0) = ThisDrawing.ModelSpace.AddPolyline(pt)
ky = ky + tbl
End Sub
Function ekspresitopo(kx, ky, bt, tp, kandel, pola, warna)
Dim ps(11) As Double
Dim pm(5) As Double
Lampiran F
Algoritma
End Function
Sub simbol(kodes As String, warna As Integer, pola As String)
If kodes = "ss" Then
warna = acYellow
pola = "dots"
ElseIf kodes = "cl" Then
warna = acGreen
pola = "dash"
ElseIf kodes = "bx" Then
warna = 20
pola = "triang"
ElseIf kodes = "ml" Then
warna = 130
pola = "dash"
ElseIf kodes = "cal" Then
warna = acBlue
pola = "brick"
Lampiran F
Algoritma
End If
End Sub
Function hatchpolakotak(pola As String, pt() As Double)
Set batu = ThisDrawing.ModelSpace.AddHatch(acHatchPatternTypePreDefined, pola, True)
batu.AppendOuterLoop (pt)
batu.Evaluate
batu.Update
End Function
Function bikintabel(x As Double, y As Double, yawal As Double, kolok As String)
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
Dim
pn(14) As Double
pl(14) As Double
pm(2) As Double
po(2) As Double
pp(2) As Double
e As Double
f As Double
g As Double
h As Double
i As Integer
e =
f =
g =
h =
i =
Dim
Dim
125
15
425
70
7
lineobj As AcadLine
ket As AcadText
Lampiran F
Set ket = ThisDrawing.ModelSpace.AddText("Foto", pp, 7)
pm(0) = x + 400: pm(1) = y + h: pm(2) = 0
po(0) = pm(0): po(1) = yawal - f: po(2) = 0
Set lineobj = ThisDrawing.ModelSpace.AddLine(pm, po)
pp(o) = pm(o) + 7: pp(1) = pn(1) + 5: pp(2) = 0
Set ket = ThisDrawing.ModelSpace.AddText("Lingkungan", pp, 5)
ket.Rotate pp, 22 / 14
pp(o) = pm(o) + 17: pp(1) = pn(1) + 3: pp(2) = 0
Set ket = ThisDrawing.ModelSpace.AddText("Pengendapan", pp, 5)
ket.Rotate pp, 22 / 14
'garis skala
y = y + f
x = x - 7
e = 2
g = 3
pm(0) = x: pm(1) = y + e: pm(2) = 0
po(0) = pm(0): po(1) = y - e: po(2) = 0
Set lineobj = ThisDrawing.ModelSpace.AddLine(pm, po)
pp(o) = pm(o) + 1: pp(1) = pm(1): pp(2) = 0
Set ket = ThisDrawing.ModelSpace.AddText("cl", pp, g)
ket.Rotate pp, 22 / 14
pm(0) = x - i: pm(1) = y + e: pm(2) = 0
po(0) = pm(0): po(1) = y - e: po(2) = 0
Set lineobj = ThisDrawing.ModelSpace.AddLine(pm, po)
pp(o) = pm(o) + 1: pp(1) = pm(1): pp(2) = 0
Set ket = ThisDrawing.ModelSpace.AddText("st", pp, g)
ket.Rotate pp, 22 / 14
pm(0) = x - i * 2: pm(1) = y + e: pm(2) = 0
po(0) = pm(0): po(1) = y - e: po(2) = 0
Set lineobj = ThisDrawing.ModelSpace.AddLine(pm, po)
pp(o) = pm(o) + 1: pp(1) = pm(1): pp(2) = 0
Set ket = ThisDrawing.ModelSpace.AddText("vf", pp, g)
ket.Rotate pp, 22 / 14
pm(0) = x - i * 2.5: pm(1) = y + e: pm(2) = 0
po(0) = pm(0): po(1) = y - e: po(2) = 0
Set lineobj = ThisDrawing.ModelSpace.AddLine(pm, po)
pp(o) = pm(o) + 1: pp(1) = pm(1): pp(2) = 0
Set ket = ThisDrawing.ModelSpace.AddText("f", pp, g)
ket.Rotate pp, 22 / 14
pm(0) = x - i * 3: pm(1) = y + e: pm(2) = 0
po(0) = pm(0): po(1) = y - e: po(2) = 0
Set lineobj = ThisDrawing.ModelSpace.AddLine(pm, po)
pp(o) = pm(o) + 1: pp(1) = pm(1): pp(2) = 0
Set ket = ThisDrawing.ModelSpace.AddText("m", pp, g)
ket.Rotate pp, 22 / 14
pm(0) = x - i * 3.5: pm(1) = y + e: pm(2) = 0
po(0) = pm(0): po(1) = y - e: po(2) = 0
Set lineobj = ThisDrawing.ModelSpace.AddLine(pm, po)
pp(o) = pm(o) + 1: pp(1) = pm(1): pp(2) = 0
Set ket = ThisDrawing.ModelSpace.AddText("c", pp, g)
ket.Rotate pp, 22 / 14
pm(0) = x - i * 4: pm(1) = y + e: pm(2) = 0
po(0) = pm(0): po(1) = y - e: po(2) = 0
Set lineobj = ThisDrawing.ModelSpace.AddLine(pm, po)
pp(o) = pm(o) + 1: pp(1) = pm(1): pp(2) = 0
Set ket = ThisDrawing.ModelSpace.AddText("vc", pp, g)
ket.Rotate pp, 22 / 14
pm(0) = x - i * 5: pm(1) = y + e: pm(2) = 0
po(0) = pm(0): po(1) = y - e: po(2) = 0
Set lineobj = ThisDrawing.ModelSpace.AddLine(pm, po)
pp(o) = pm(o) + 1: pp(1) = pm(1): pp(2) = 0
Set ket = ThisDrawing.ModelSpace.AddText("gr", pp, g)
ket.Rotate pp, 22 / 14
pm(0) = x - i * 6: pm(1) = y + e: pm(2) = 0
po(0) = pm(0): po(1) = y - e: po(2) = 0
Set lineobj = ThisDrawing.ModelSpace.AddLine(pm, po)
pp(o) = pm(o) + 1: pp(1) = pm(1): pp(2) = 0
Algoritma
Lampiran F
Set ket = ThisDrawing.ModelSpace.AddText("pbl", pp, g)
ket.Rotate pp, 22 / 14
pm(0) = x - i * 7: pm(1) = y + e: pm(2) = 0
po(0) = pm(0): po(1) = y - e: po(2) = 0
Set lineobj = ThisDrawing.ModelSpace.AddLine(pm, po)
pp(o) = pm(o) + 1: pp(1) = pm(1): pp(2) = 0
Set ket = ThisDrawing.ModelSpace.AddText("cbl", pp, g)
ket.Rotate pp, 22 / 14
pm(0) = x - i * 8: pm(1) = y + e: pm(2) = 0
po(0) = pm(0): po(1) = y - e: po(2) = 0
Set lineobj = ThisDrawing.ModelSpace.AddLine(pm, po)
pp(o) = pm(o) + 1: pp(1) = pm(1): pp(2) = 0
Set ket = ThisDrawing.ModelSpace.AddText("bld", pp, g)
ket.Rotate pp, 22 / 14
'skala
Dim per As Integer
Dim s As Integer
Dim ber As Integer
If y > 70 Then
per = y / 50
e = 50
Else
per = y / 10
e = 10
End If
For s = 0
pm(0)
po(0)
pp(0)
ber =
To per - 1
= -102: pm(1) = yawal + (s * e): pm(2) = 0
= pm(0) + 4: po(1) = pm(1): po(2) = 0
= pm(0) - 15: pp(1) = pm(1) - 3: pp(2) = 0
s * e
Algoritma