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 72 73 74 75 76 77
|
Open "C:\" & Nom & "2.unv" For Output As #NF
'Noeuds
Ligne = String(75, " ")
NB = Format(-1)
Mid(Ligne, 6 - Len(NB) + 1, Len(NB)) = NB
Debug.Print Ligne
Print #NF, Ligne
NB = Format(2411)
Mid(Ligne, 6 - Len(NB) + 1, Len(NB)) = NB
Debug.Print Ligne
Print #NF, Ligne
i = 1
j = 1
o = 1
n = 1
Do
Do
Do
Ligne = String(75, " ")
'Numéro de label
'NB = Format(i, "000") & Format(j, "000") & Format(o, "000")
NB = Format(n)
Mid(Ligne, 11 - Len(NB), Len(NB)) = NB
'système de coordonnées principal
NB = Format(1)
Mid(Ligne, 21 - Len(NB), Len(NB)) = NB
'système de coordonnées des déplacements
NB = Format(1)
Mid(Ligne, 31 - Len(NB), Len(NB)) = NB
'couleur des noeuds
NB = Format(11)
Mid(Ligne, 41 - Len(NB), Len(NB)) = NB
Debug.Print Ligne
Print #NF, Ligne
CX = String(25, " ")
NB = F.Range(x).Cells(i, 1).Text
Mid(CX, 26 - Len(NB), Len(NB)) = NB
Mid(CX, 22, 1) = "D"
Mid(CX, 6, 1) = "."
CY = String(25, " ")
NB = F.Range(y).Cells(1, j).Text
Mid(CY, 26 - Len(NB), Len(NB)) = NB
Mid(CY, 22, 1) = "D"
Mid(CY, 6, 1) = "."
CZ = String(25, " ")
NB = F.Range(z).Cells(o, 1).Text
Mid(CZ, 26 - Len(NB), Len(NB)) = NB
Mid(CZ, 22, 1) = "D"
Mid(CZ, 6, 1) = "."
Ligne = String(75, " ")
Mid(Ligne, 1, 25) = CX
Mid(Ligne, 26, 25) = CY
Mid(Ligne, 51, 25) = CZ
Debug.Print Ligne
Print #NF, Ligne
n = n + 1
i = i + 1
Loop While i <= NbPX + 1
i = 1
j = j + 1
Loop While j <= NbPY + 1
i = 1
j = 1
o = o + 1
Loop While o <= iL - 2
Ligne = String(6, " ")
NB = Format(-1)
Mid(Ligne, 6 - Len(NB) + 1, Len(NB)) = NB
Print #NF, Ligne |