HOW TO
Code:
'Hotlink to multiple images
theView = av.GetActiveDoc
found = false
p = theView.GetDisplay.ReturnUserPoint
for each t in theView.GetActiveThemes
if (t.Is(FTheme)) then
recs = t.FindByPoint(p)
for each rec in recs
theimage1 = t.getftab.returnvaluestring(t.getftab.Findfield("Newfield"),rec)
if (File.Exists(theimage1.AsFileName)) then
srcImage = SrcName.Make(theimage1)
Ithme = Theme.Make(srcImage)
Ithme.SetVisible(TRUE)
v = View.Make
v.AddTheme(Ithme)
v.SetTOCWidth(0)
v.SetTOCUnresizable(TRUE)
v.SetName(theimage1.AsFileName.GetBaseName)
end
v.GetWin.Open
'===============================================
theimage2 =
t.getftab.returnvaluestring(t.getftab.Findfield("Newfield1"),rec)
if (File.Exists(theimage2.AsFileName)) then
srcImage2 = SrcName.Make(theimage2)
Ithme2 = Theme.Make(srcImage2)
Ithme2.SetVisible(TRUE)
v = View.Make
v.AddTheme(Ithme2)
v.SetTOCWidth(0)
v.SetTOCUnresizable(TRUE)
v.SetName(theimage2.AsFileName.GetBaseName)
end
v.GetWin.Open
'==================================================
found = true
end
end
end
if (not found) then
System.Beep
end
Note:
ESRI hopes that these sample scripts, extensions, and other items are useful and that they contribute to your success in using ArcView. Please note that these samples are not supported by ESRI.
These samples are provided for non-commercial purposes only. Permission to use, copy, and distribute is hereby granted, provided there is no charge or fee for such copies.
THESE SAMPLES ARE PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ESRI shall not be liable for any damages under any theory of law related to Licensee's use of these samples, even if ESRI is advised of the possibility of such damage.
Article ID:000001516
Get help from ArcGIS experts
Download the Esri Support App