12.07.2015 Views

Proposition de nouvelle organisation des données SIG et création d ...

Proposition de nouvelle organisation des données SIG et création d ...

Proposition de nouvelle organisation des données SIG et création d ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Proposition</strong> <strong>de</strong> <strong>nouvelle</strong> <strong>organisation</strong> <strong>de</strong>s données <strong>SIG</strong> <strong>et</strong> création d’un outil <strong>de</strong> catalogage <strong>et</strong> <strong>de</strong> consultation<strong>de</strong>s métadonnées <strong>SIG</strong> pour le Parc Naturel régional Scarpe EscautAnnexe 10 : Comman<strong>de</strong> <strong>de</strong> visualisation <strong>de</strong>s données‘Déclaration <strong>de</strong> la procédurePrivate Sub Comman<strong>de</strong>240_Click()On Error GoTo Err_Comman<strong>de</strong>240_Click‘si le format <strong>de</strong> fichier indiqué dans le formulaire <strong>de</strong> consultation est un shapefile alors la function Filewrite estéxécutée <strong>et</strong> le proj<strong>et</strong> .aep ouvert dans Arc Explorer.les 3 vatiables sont déclarées juste après l’appel <strong>de</strong> lafonction.If Forms![métadonnée].Form![format_donnée].Form![liste_co<strong>de</strong>_format] = "SHP" ThenFileWrite "O:\stage\sig\arborescence\visualisation.AEP",Forms![métadonnée].Form![chemin_donnée].Value,Forms![métadonnée].Form![nom_informatique].ValueDim stAppName As StringstAppName = "C:\ESRI\ArcExplorer\ArcExplorer.exeO:\stage\sig\arborescence\visualisation.AEP"Call Shell(stAppName, 1)End If‘si le format <strong>de</strong> fichier indiqué dans le formulaire <strong>de</strong> consultation est un DBF, le logicielExcel s’ouvre en chargeant la donnée affichée dans le formulaire <strong>de</strong> consultationIf Forms![métadonnée].Form![format_donnée].Form![liste_co<strong>de</strong>_format] = "DB" ThenDim stAppName2 As StringDim chemin As StringDim nomdbf As Stringchemin = Forms![métadonnée].Form![chemin_donnée].Valuenomdbf = Forms![métadonnée].Form![nom_informatique].ValuestAppName2 = "C:\Program Files\Microsoft Office\Office\EXCEL.EXE" + " " + chemin +"\" + nomdbf + ".dbf"Call Shell(stAppName2, 1)End If‘si le format <strong>de</strong> fichier indiqué dans le formulaire <strong>de</strong> consultation est un .xls, le logiciel Excel s’ouvre enchargeant la donnée affichée dans le formulaire <strong>de</strong> consultationIf Forms![métadonnée].Form![format_donnée].Form![liste_co<strong>de</strong>_format] = "XLS" ThenDim stAppName3 As StringDim chemin2 As StringDim nom2 As Stringchemin2 = Forms![métadonnée].Form![chemin_donnée].Valuenom2 = Forms![métadonnée].Form![nom_informatique].ValuestAppName3 = "C:\Program Files\Microsoft Office\Office\EXCEL.EXE" + " " + chemin2 +"\" + nom2 + ".xls"Call Shell(stAppName3, 1)‘Fin <strong>de</strong>s boucles <strong>de</strong> conditionsEnd If164

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!