1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
| 'Initialisation d'un parseur
Set Gfi_XMLDoc(Gfi_Index) = CreateObject("Microsoft.XMLDOM")
'Chargement du fichier en mémoire avant de commencer à le parser
Gfi_XMLDoc(Gfi_Index).Async = "False"
Gfi_NomFichierBMIDE = Application.GetOpenFilename("xml Files (*.xml), *.xml, Text Files (*.txt), *.txt, All Files (*.*), *.*", 1, "Selection du Fichier")
Gfi_XMLDoc(Gfi_Index).Load (Gfi_NomFichierBMIDE)
Gfi_XMLDoc_file(Gfi_Index) = Gfi_NomFichierBMIDE
For Each WF_classElement In Gfi_XMLDoc(Gfi_Position_modele(Gfi_indice_modele)).SelectNodes("/PLMXML/WorkflowTemplate")
Gfi_module_enCours = Gfi_indice_modele
GFI_a7_WF_className = WF_classElement.getAttribute("name")
GFI_a7_WF_className_trunc = Left(GFI_a7_WF_className, 30)
GFI_a7_WF_iconKey = WF_classElement.getAttribute("iconKey")
If (InStrRev(GFI_a7_WF_iconKey, "process", , vbTextCompare) > 0) Then
If fct_WsExist(GFI_a7_WF_className_trunc) Then
Sheets(GFI_a7_WF_className_trunc).Cells.Clear
Sheets(GFI_a7_WF_className_trunc).Cells.ClearContents
Sheets(GFI_a7_WF_className_trunc).Activate
Else
ActiveWorkbook.Sheets.Add After:=Worksheets(Worksheets.Count)
ActiveSheet.Name = GFI_a7_WF_className_trunc
End If
Else
GoTo Next_Sentence
End If
'Renseignement des deux informations sur la ligne 2
Sheets(GFI_a7_WF_className_trunc).Cells(2, 3).Value = GFI_a7_WF_className
'Renseignement des deux informations sur la ligne 7
For Each WF_articles_autoriseElement In Gfi_XMLDoc(Gfi_Position_modele(Gfi_indice_modele)).SelectNodes("/PLMXML/WorkflowBusinessRuleHandler[@name='EPM-check-target-object']/Arguments/UserValue")
GFI_a7_articles_autorisés = WF_articles_autoriseElement.getAttribute("value")
If (InStrRev(GFI_a7_articles_autorisés, "-status_allow=", , vbTextCompare) > 0) Then
Sheets(GFI_a7_WF_className_trunc).Cells(7, 3).Value = GFI_a7_articles_autorisés
Exit For
End If
Next
'Renseignement des deux informations sur la ligne 9
For Each WF_status_autoriseElement In Gfi_XMLDoc(Gfi_Position_modele(Gfi_indice_modele)).SelectNodes("/PLMXML/WorkflowBusinessRuleHandler/Arguments/UserValue")
GFI_a7_status_autorisés = WF_status_autoriseElement.getAttribute("value")
If (InStrRev(GFI_a7_status_autorisés, "-status_disallow=", , vbTextCompare) > 0) Then
Sheets(GFI_a7_WF_className_trunc).Cells(9, 3).Value = Mid(GFI_a7_status_autorisés, 18)
Exit For
End If
Next
Next_Sentence:
Next
EXIT_SUB:
End Sub |
Partager