-
Notifications
You must be signed in to change notification settings - Fork 1
/
Main.bas
55 lines (38 loc) · 1.27 KB
/
Main.bas
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Attribute VB_Name = "Main"
Global numPatches As Integer
Global filePath As String
Global patchSizes(70, 1) As Variant
Public Sub patchMatcher(flag As Integer)
Dim frm As Frame
Set frm = App.Frame
Dim location As String
Dim drw As Drawing
Set drw = App.ActiveDrawing
Dim geos As Paths
location = frm.PathOfThisAddin
If flag = 1 Then
numPatches = 70
filePath = location & "/patchSizesTop.txt"
initPatchSizes filePath
Set geos = drw.UserSelectMultiGeosCollection("Select Patch Geometries", 0)
searchAndReplace geos
ElseIf flag = 2 Then
numPatches = 60
filePath = location & "/patchSizesBottom.txt"
initPatchSizes filePath
Set geos = drw.UserSelectMultiGeosCollection("Select Patch Geometries", 0)
searchAndReplace geos
ElseIf flag = 3 Then
numPatches = 7
filePath = location & "/woodButterflies.txt"
initPatchSizes filePath
Set geos = drw.UserSelectMultiGeosCollection("Select Patch Geometries", 0)
butterfly geos
ElseIf flag = 4 Then
numPatches = 2
filePath = location & "/bronzeButterflies.txt"
initPatchSizes filePath
Set geos = drw.UserSelectMultiGeosCollection("Select Patch Geometries", 0)
butterfly geos
End If
End Sub