'=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 'From: sim@ecoline.ru 'To: gis-lab 'Date: Friday, November 22, 2002, 6:31:52 PM 'Subject: hotlink with low precision 'Comments: Must be named View.Hotlink to work properly, ' path to IrfanView should be checked also. ' Search radius is set by pressing shift and drawing circle 'Name: View.Hotlink 'Filename: Hotlink2Region-radius 'Version: 1.2 '--====----====----====----====----====----====----====----====----====----===-- if (SELF.is(control)) then theParameter = SELF.GetTag else return NIL end theView = av.GetActiveDoc if (System.IsShiftKeyDown) then c = theView.ReturnUserCircle if (c.IsNull) then else rad = c.getradius circflag = true theParameter = SELF.SetTag(rad.asstring) end else if (theParameter.isNull) then rad = 0.1 else rad = self.gettag.asnumber end found = false p = theView.GetDisplay.ReturnUserPoint circ = Circle.Make(p, rad) for each t in theView.GetActiveThemes if ((t.HasAttributes) and (t.GetHotField <> nil)) then theDisplay = theView.GetDisplay t.SelectByShapes({circ}, #VTAB_SELTYPE_NEW) recs = t.getftab.GetSelection for each rec in recs theField = t.GetHotField found = true theVal = t.ReturnValueString(theField.GetName,rec) if (not (theVal.IsNull)) then if (File.Exists(theVal.AsFileName)) then System.Execute("c:\Tools\i_view32.exe"++theVal) else MsgBox.Warning("Файл "+theVal+" не найден","Hotlink") end end end end if (not found) then System.Beep end end end