Monday, December 20, 2010
Tuesday, November 9, 2010
Multiple line labels
Function FindLabel ([Suburb],[Organisati],[Total])
maxChrs = 24
oldTxt = [Suburb]&vbnewline&[Organisati]&vbnewline&[Total]
While Len(oldTxt) > maxChrs
ptr = InStrRev(Left(oldTxt, maxChrs), " ")
If ptr = 0 Then
ptr = InStr(oldTxt, " ")
If ptr = 0 Then ptr = Len(oldTxt) + 1
End If
newTxt = newTxt + Left(oldTxt, ptr - 1) + vbCrLf
oldTxt = Mid(oldTxt, ptr + 1)
Wend
If oldTxt <> "" Then newTxt = newTxt + oldTxt
FindLabel = newTxt
End Function
maxChrs = 24
oldTxt = [Suburb]&vbnewline&[Organisati]&vbnewline&[Total]
While Len(oldTxt) > maxChrs
ptr = InStrRev(Left(oldTxt, maxChrs), " ")
If ptr = 0 Then
ptr = InStr(oldTxt, " ")
If ptr = 0 Then ptr = Len(oldTxt) + 1
End If
newTxt = newTxt + Left(oldTxt, ptr - 1) + vbCrLf
oldTxt = Mid(oldTxt, ptr + 1)
Wend
If oldTxt <> "" Then newTxt = newTxt + oldTxt
FindLabel = newTxt
End Function
Thursday, November 4, 2010
Wednesday, November 3, 2010
Wednesday, October 27, 2010
Xmas list
Cycle computer
mountain bike shoes and cleat
lights
best aussie albums book
zen art of bike maintenence book
mountain bike shoes and cleat
lights
best aussie albums book
zen art of bike maintenence book
Tuesday, October 19, 2010
Road labels
Function FindLabel ( [ROADNAMEBASE] , [ROADNAMETYPE] )
FindLabel = PCase( [ROADNAMEBASE] & " " & [ROADNAMETYPE] )
End Function
Function PCase(strInput)
Dim iPosition
Dim iSpace
Dim strOutput
iPosition = 1
Do While InStr(iPosition, strInput, " ", 1) <> 0
iSpace = InStr(iPosition, strInput, " ", 1)
strOutput = strOutput & UCase(Mid(strInput, iPosition, 1))
strOutput = strOutput & LCase(Mid(strInput, iPosition + 1, iSpace - iPosition))
iPosition = iSpace + 1
Loop
strOutput = strOutput & UCase(Mid(strInput, iPosition, 1))
strOutput = strOutput & LCase(Mid(strInput, iPosition + 1))
PCase = strOutput
End Function
FindLabel = PCase( [ROADNAMEBASE] & " " & [ROADNAMETYPE] )
End Function
Function PCase(strInput)
Dim iPosition
Dim iSpace
Dim strOutput
iPosition = 1
Do While InStr(iPosition, strInput, " ", 1) <> 0
iSpace = InStr(iPosition, strInput, " ", 1)
strOutput = strOutput & UCase(Mid(strInput, iPosition, 1))
strOutput = strOutput & LCase(Mid(strInput, iPosition + 1, iSpace - iPosition))
iPosition = iSpace + 1
Loop
strOutput = strOutput & UCase(Mid(strInput, iPosition, 1))
strOutput = strOutput & LCase(Mid(strInput, iPosition + 1))
PCase = strOutput
End Function
Monday, September 27, 2010
Wednesday, September 1, 2010
Duplicates in tables
How to identify duplicate field values
Static d As Object
Static i As Long
Dim iDup As Integer
Dim sField
'========================
'Replace the field name below
sField = [b]
'========================
If (i = 0) Then
Set d = CreateObject("Scripting.Dictionary")
End If
If (d.Exists(CStr(sField))) Then
iDup = 1
Else
d.Add CStr(sField), 1
iDup = 0
End If
i = i + 1
# Type iDup in the lower text box of the Field Calculator dialog box.
http://resources.arcgis.com/content/kbase?fa=articleShow&d=31854
Static d As Object
Static i As Long
Dim iDup As Integer
Dim sField
'========================
'Replace the field name below
sField = [b]
'========================
If (i = 0) Then
Set d = CreateObject("Scripting.Dictionary")
End If
If (d.Exists(CStr(sField))) Then
iDup = 1
Else
d.Add CStr(sField), 1
iDup = 0
End If
i = i + 1
# Type iDup in the lower text box of the Field Calculator dialog box.
http://resources.arcgis.com/content/kbase?fa=articleShow&d=31854
Subscribe to:
Posts (Atom)