|
|
Iscritto: Feb 2003
Posts: 12
Junior Member
|
OP
Junior Member
Iscritto: Feb 2003
Posts: 12 |
'AV31 'Script: Link to MicroSoft office file '************************************************************************* 'MicroSoft Word : Microsoft .doc's only. 'Add a new field to your Fthemes table with the following; 'fieldname = worddoc; type = string; length = 50 (depending on string length) 'This field should contain the pathname of a MicroSoft word document. For example, 'c:\my documents\instructions.doc 'Under Theme Properties, set the Field to be worddoc, Predefined Action to be 'Link to user script, and apply this script as the script. 'Note that the script assumes that the MicroSoft Word is installed at 'C:\Program Files\Microsoft Office\Office. Modify the script if the MicroSoft 'is installed elsewhere on your machine. '************************************************************************
'Find MicroSoft Word Executable
sWord = "C:\Programmi\Microsoft Office\Office\winword.exe"
theView = av.GetActiveDoc found = FALSE p = theView.GetDisplay.ReturnUserPoint thedpy = theView.GetDisplay for each t in theView.GetActiveThemes if (t.Is( FTHEME )) then t.SelectbyPoint(theDpy.GetMouseLoc, #VTAB_SELTYPE_NEW) v = t.GetFTab linkField = v.Findfield("worddoc") if (linkField = nil) then msgbox.error("No word field specified!","") av.run("view.clearselect","") exit else FOR each rec in v.GetSelection stringvalue = v.ReturnValueString(LinkField, rec) if (stringvalue = "") then msgbox.error("No MicroSoft word file specified","*.doc's") av.run("view.clearselect","") exit else commandLine = sWord++stringvalue system.execute (commandLine) av.run("View.clearselect","") end end end end end
if (not found) then System.Beep end
Crea lo script importalo in arcview avvialo e setta il fulmine in modo che usi lo script per aprire il documento allegato al poligono. Ti ricordo che nella tabella devi creare una cella per ogni record all'interno del quale metti il percorso al file.
|
|
|
Link Copiato negli Appunti