Quote:
|
Originally Posted by Casca
Type mismatch: cSymbol1.symbol
|
I doublechecked the code, and to me it looks right. I'm wondering if you didn't heed this line in the settings:
'Icons are branched off the script's folder
What you can do to check this is to edit ns04mappoint.vbs, and just above this line:
cSymbol1 = .Symbols.Add(nameDir & cSymbol1)
add this line:
MsgBox "I'm looking for a file named:" & vbCRLF & nameDir & cSymbol1
and that will show where it's looking.
If that
still doesn't show the error then please declare your cSymbol1 setting.
Upon further analysis, it looks like the useCustIcon setting isn't being honoured - the custom icons are always added to MapPoint even if you don't want them. This code might work:
if useCustIcon then
if not FSO.FileExists(nameDir & cSymbol1) or not FSO.FileExists(nameDir & cSymbol2) or not FSO.FileExists(nameDir & cSymbol3) or not FSO.FileExists(nameDir & cSymbol4) then
useCustIcon = "Unable to find the following custom icons, disabling feature:"
if not FSO.FileExists(nameDir & cSymbol1) then useCustIcon = useCustIcon & vbCRLF & nameDir & cSymbol1
if not FSO.FileExists(nameDir & cSymbol2) then useCustIcon = useCustIcon & vbCRLF & nameDir & cSymbol2
if not FSO.FileExists(nameDir & cSymbol3) then useCustIcon = useCustIcon & vbCRLF & nameDir & cSymbol3
if not FSO.FileExists(nameDir & cSymbol4) then useCustIcon = useCustIcon & vbCRLF & nameDir & cSymbol4
MsgBox useCustIcon, vbCritical, nameScript
useCustIcon = False
else
...
end if
end if
after making useCustIcon a non-const (gee, that whole section is non-const-able!)
Can I blame Laidback?
