SHOW:
|
|
- or go back to the newest paste.
1 | - | 'STP Orona |
1 | + | 'Principale |
2 | ||
3 | - | Sub S_1006897D(ByVal NND As Integer) |
3 | + | Sub MAIN() |
4 | - | ACT_MOD = "1006897" |
4 | + | |
5 | - | CLAMP = 0 |
5 | + | '***********IMPOSTAZIONI |
6 | If InStr(1, PRG_TOT, "C") = 0 And InStr(1, PRG_TOT, "B") = 0 Then FNL_SEQUENCING = 1 Else FNL_SEQUENCING = 0 'ATTIVA O MENO LA SEQUENZA | |
7 | Call SETTING | |
8 | - | L = INPUT_NUM(NND, "L", L, ACT_MOD) |
8 | + | |
9 | - | H = INPUT_NUM(NND, "H", H, ACT_MOD) |
9 | + | If LISTA_MAT_FNL = 1 Then |
10 | - | SPS = INPUT_NUM(NND, "SPS", SPS, ACT_MOD) / 10 |
10 | + | Call READ_DATA(PRG_NUM(1)) |
11 | - | M1 = INPUT_NUM(NND, "M1", M1, ACT_MOD) |
11 | + | Exit Sub |
12 | - | M2 = INPUT_NUM(NND, "M2", M2, ACT_MOD) |
12 | + | |
13 | - | M3 = INPUT_NUM(NND, "M3", M3, ACT_MOD) |
13 | + | |
14 | - | M4 = INPUT_NUM(NND, "M4", M4, ACT_MOD) |
14 | + | Call COD_DISEGNO_FNL |
15 | - | M5 = INPUT_NUM(NND, "M5", M5, ACT_MOD) |
15 | + | Call DESC_MAT |
16 | - | M6 = INPUT_NUM(NND, "M6", M6, ACT_MOD) |
16 | + | |
17 | - | M7 = INPUT_NUM(NND, "M7", M7, ACT_MOD) |
17 | + | Call LISTA_DXF 'LISTA DXF GIA' PRODOTTI ESTERNAMENTE |
18 | - | M8 = INPUT_NUM(NND, "M8", M8, ACT_MOD) |
18 | + | |
19 | - | M9 = INPUT_NUM(NND, "M9", M9, ACT_MOD) |
19 | + | SPC_R_OLD = "" |
20 | - | M10 = INPUT_NUM(NND, "M10", M10, ACT_MOD) |
20 | + | QCSP_OLD = 0 |
21 | - | M11 = INPUT_NUM(NND, "M11", M11, ACT_MOD) |
21 | + | |
22 | - | M12 = INPUT_NUM(NND, "M12", M12, ACT_MOD) |
22 | + | |
23 | '*******************************blocco dati | |
24 | Call VALIDAZIONE | |
25 | - | DF = INPUT_NUM(NND, "DF", DF, ACT_MOD) |
25 | + | If kl = 1 Then Exit Sub |
26 | - | sf = INPUT_NUM(NND, "SF", sf, ACT_MOD) |
26 | + | '******************************* |
27 | - | SB = INPUT_NUM(NND, "SB", SB, ACT_MOD) |
27 | + | Call TORRETTE |
28 | - | LH = INPUT_NUM(NND, "LH", LH, ACT_MOD) |
28 | + | Call VALORI |
29 | - | CD_SP = INPUT_NUM(NND, "SPC.", CD_SP, ACT_MOD) |
29 | + | |
30 | - | VV = INPUT_STR(NND, "VER.", VV, ACT_MOD) |
30 | + | |
31 | - | BNB = INPUT_NUM(NND, "BNB", BNB, ACT_MOD) |
31 | + | |
32 | - | ODP = INFO_DAT(NND, 0, 5) |
32 | + | |
33 | If VAR_APE = True Then '*************************************************************'PRODUZIONE ESTERNA | |
34 | - | OFSS = 0 '0.5 |
34 | + | |
35 | Call EXTERNAL_PROD | |
36 | ||
37 | - | If Val(LH) = 0 Then |
37 | + | Else '********************************************************************************PRODUZIONE INTERNA |
38 | - | SP = M1 + 50 |
38 | + | |
39 | - | LH = H - SP |
39 | + | |
40 | If VCF = 6 Or VCF = 0 Then Call PROG_MAC_S4 | |
41 | Call PUNCH_TOOL 'legge gli utensili per ogni pezzo | |
42 | ||
43 | - | If VV = "1" Or VV = "3" Or VV = "5" Or VV = "7" Then 'PINZE |
43 | + | |
44 | - | If CD_SP = 0 Then |
44 | + | VNP = MsgBox("VUOI NESTARE IL PROGRAMMA " & PRG_TOT & " ?", vbYesNo) |
45 | - | If SP = 90 And LH = 2000 Then |
45 | + | If VNP = 6 Then |
46 | - | 'CLAMP = 1 |
46 | + | |
47 | For MP = 1 To 11 | |
48 | 'If MP <> 3 Then GoTo NO_NESTING | |
49 | '*****************************************************SETTAGGI MAPPATURA | |
50 | ''If MP = 1 And InStr(1, PRG_TOT, "R") = 0 And InStr(1, PRG_TOT, "C") = 0 Then GoTo NO_NESTING 'BLOCCO LE ANTE SE NON SONO UN REWORK | |
51 | If VAR_ACCORP = True And (MP <> 7 And MP <> 4 And MP <> 8 And MP <> 11) Then GoTo NO_NESTING 'PER ACCORPAMENTO | |
52 | - | VV = Replace(VV, "H", "") |
52 | + | If VAR_ACCORP = False And (MP = 7 Or MP = 4 Or MP = 8 Or MP = 11) Then GoTo NO_NESTING 'PER ACCORPAMENTO - NO CPR PER SINGOLO PROGRAMMA |
53 | If VAR_PIASTRFIBRA = True And MP = 5 Then GoTo NO_NESTING | |
54 | - | If VV > 8 Then MsgBox "ERRORE VERSIONE SU " & ACT_MOD, vbCritical |
54 | + | |
55 | Select Case MP | |
56 | Case 1 'ante | |
57 | - | SCS = 6 |
57 | + | NAMEMAP = NPAR_FLD & PRG_TOT & "ANTE.MNE" |
58 | NOME_REP = "ANTE" | |
59 | STR_ACCESSO = ANTE | |
60 | - | sf = 1 * sf '+ 1 * SB |
60 | + | Case 2 'stipiti, lato battuta |
61 | - | If sf = 0 Then |
61 | + | NAMEMAP = NPAR_FLD & PRG_TOT & "STIPITI.MNE" |
62 | - | sf = 1 * SB |
62 | + | NOME_REP = "STIPITI" |
63 | - | MsgBox "ERRORE DATI SB-SF IN " & ACT_MOD |
63 | + | STR_ACCESSO = STIPITI & TRAVERSA & LATO_BATTUTA |
64 | Case 3 'rivestimenti anta | |
65 | NAMEMAP = NPAR_FLD & PRG_TOT & "RIVESTIMENTI.MNE" | |
66 | NOME_REP = "RIV_ANTE" | |
67 | STR_ACCESSO = RIVESTIMENTI_ANTA | |
68 | - | Select Case VV |
68 | + | Case 4 'rinforzi |
69 | - | Case 2, 4, 6, 8 |
69 | + | NAMEMAP = NPAR_FLD & PRG_TOT & "RINFORZI.MNE" |
70 | NOME_REP = "RINFORZI" | |
71 | STR_ACCESSO = RINFORZI_MTG & RINFORZI_SALD & ALTRO_EMZ | |
72 | - | '*******************************************SPACCO |
72 | + | Case 5 'piastroni |
73 | - | If CD_SP <> "" And CD_SP <> "0" Then |
73 | + | NAMEMAP = NPAR_FLD & PRG_TOT & "PIASTRONI.MNE" |
74 | - | R01 = SPC_PULS(NND, CD_SP, 25 + DF - 4.8, H, L, 2, sf, 0) 'MODIFICATO DA 25 A 15mm |
74 | + | NOME_REP = "PIASTRONI" |
75 | STR_ACCESSO = PIASTRONI_LAND & PIASTRONI_CAR | |
76 | - | If DF >= 40 Then M5 = DF - 25 Else M5 = 0 |
76 | + | Case 6 'PORTALI |
77 | NAMEMAP = NPAR_FLD & PRG_TOT & "PORTALI.MNE" | |
78 | NOME_REP = "PORTALI" | |
79 | - | If CD_SP = "50522" Or CD_SP = "50522" Or CD_SP = "50522" Then |
79 | + | STR_ACCESSO = STIPITI_PORTALI & TRAVERSA_PORTALE |
80 | - | R02 = T_CIRC(H - M11, L - 5.2, 5.5) & T_CIRC(H - M11 - 375.5, L - 5.2, 5.5) |
80 | + | Case 7 'coprifessura |
81 | - | R02 = R02 & T_CIRC(H - M12, L - 5.2, 5.5) & T_CIRC(H - M12 - 275.5, L - 5.2, 5.5) |
81 | + | NAMEMAP = NPAR_FLD & PRG_TOT & "CPR.MNE" |
82 | - | R02 = R02 & T_SLOT(H - M11, 24.1, 8, 5, 90) & T_SLOT(H - M11, 24.1 + M5, 8, 5, 90) |
82 | + | NOME_REP = "COPRIFESSURA" |
83 | - | R02 = R02 & T_SLOT(H - M11 - 375.5, 24.1, 8, 5, 90) & T_SLOT(H - M11 - 375.5, 24.1 + M5, 8, 5, 90) |
83 | + | STR_ACCESSO = COPRIFESSURA |
84 | - | R02 = R02 & T_SLOT(H - M12, 24.1, 8, 5, 90) & T_SLOT(H - M12, 24.1 + M5, 8, 5, 90) |
84 | + | Case 8 'PARAMENTI |
85 | - | R02 = R02 & T_SLOT(H - M12 - 275.5, 24.1, 8, 5, 90) & T_SLOT(H - M12 - 275.5, 24.1 + M5, 8, 5, 90) |
85 | + | NAMEMAP = NPAR_FLD & PRG_TOT & "PRM.MNE" |
86 | NOME_REP = "PARAMENTI" | |
87 | - | Else |
87 | + | STR_ACCESSO = PARAMENTI |
88 | - | R02 = T_CIRC(QCSP + 187.75, L - 5.2, 5.5) |
88 | + | Case 9 'slim |
89 | - | R02 = R02 & T_CIRC(QCSP - 187.75, L - 5.2, 5.5) |
89 | + | NAMEMAP = NPAR_FLD & PRG_TOT & "SLIM.MNE" |
90 | - | R02 = R02 & T_SLOT(QCSP + 187.75, 24.1, 8, 5, 90) |
90 | + | NOME_REP = "SLIM" |
91 | - | R02 = R02 & T_SLOT(QCSP + 187.75, 24.1 + M5, 8, 5, 90) |
91 | + | STR_ACCESSO = RIVESTIMENTI_SLIM |
92 | - | R02 = R02 & T_SLOT(QCSP - 187.75, 24.1, 8, 5, 90) |
92 | + | Case 10 'ENTRANCE |
93 | - | R02 = R02 & T_SLOT(QCSP - 187.75, 24.1 + M5, 8, 5, 90) |
93 | + | NAMEMAP = NPAR_FLD & PRG_TOT & "ENTR.MNE" |
94 | NOME_REP = "ENTRANCE" | |
95 | STR_ACCESSO = ENTRANCE | |
96 | - | If M3 = 0 Then |
96 | + | Case 11 'componenti ENTRANCE |
97 | NAMEMAP = NPAR_FLD & PRG_TOT & "ENTR2.MNE" | |
98 | - | MsgBox "M3=0" |
98 | + | NOME_REP = "ENTRANCE2" |
99 | - | Select Case LH |
99 | + | STR_ACCESSO = ENTRANCE2 |
100 | End Select | |
101 | - | Case 1900 |
101 | + | '************************************************************** |
102 | - | If H - QCSP < 1030 Then M3 = H - QCSP - 530 |
102 | + | |
103 | - | If H - QCSP > 1080 Then M3 = (H - QCSP) / 2 - 40 |
103 | + | Select Case MP |
104 | - | If (H - QCSP >= 1030 And H - QCSP <= 1080) Then M3 = 500 |
104 | + | Case 1 'ante 'OK PER ESTERNO |
105 | NHD = 17 '14 | |
106 | - | Case 1950 |
106 | + | Call WRITE_REPORT |
107 | - | If H - QCSP < 1055 Then M3 = H - QCSP - 530 |
107 | + | If InStr(1, PRG_TOT, "R") > 0 Or InStr(1, PRG_TOT, "C") > 0 Or InStr(1, PRG_TOT, "B") > 0 Then |
108 | - | If H - QCSP > 1130 Then M3 = (H - QCSP) / 2 - 40 |
108 | + | Call MAPPATURA(NM_DT, MP, NAMEMAP) 'solo reworking |
109 | - | If (H - QCSP >= 1055 And H - QCSP <= 1130) Then M3 = 525 |
109 | + | Else |
110 | Call NEST(MP, NAMEMAP, STR_ACCESSO) | |
111 | - | Case 2000 |
111 | + | End If |
112 | - | If H - QCSP < 1080 Then M3 = H - QCSP - 530 |
112 | + | |
113 | - | If H - QCSP > 1180 Then M3 = (H - QCSP) / 2 - 40 |
113 | + | Case 2 'stipiti basic 'OK |
114 | - | If (H - QCSP >= 1080 And H - QCSP <= 1180) Then M3 = 550 |
114 | + | NHD = 14 |
115 | ||
116 | - | Case 2050 |
116 | + | If FNL_SEQUENCING = 1 Then |
117 | - | If H - QCSP < 1105 Then M3 = H - QCSP - 530 |
117 | + | Call NEST(MP, NAMEMAP, STR_ACCESSO) |
118 | - | If H - QCSP > 1230 Then M3 = (H - QCSP) / 2 - 40 |
118 | + | Else |
119 | - | If (H - QCSP >= 1105 And H - QCSP <= 1230) Then M3 = 575 |
119 | + | Call MAPPATURA(NM_DT, MP, NAMEMAP) |
120 | End If | |
121 | - | Case 2100 |
121 | + | |
122 | - | If H - QCSP < 1130 Then M3 = H - QCSP - 530 |
122 | + | Case 3 'riv anta |
123 | - | If H - QCSP > 1280 Then M3 = (H - QCSP) / 2 - 40 |
123 | + | NHD = 14 |
124 | - | If (H - QCSP >= 1130 And H - QCSP <= 1280) Then M3 = 600 |
124 | + | |
125 | If FNL_SEQUENCING = 1 Then | |
126 | - | Case Else |
126 | + | Call NEST(MP, NAMEMAP, STR_ACCESSO) |
127 | - | MsgBox "ERRORE VALORE LH " & ACT_MOD, vbCritical |
127 | + | Else |
128 | - | End Select |
128 | + | Call MAPPATURA(NM_DT, MP, NAMEMAP) |
129 | End If | |
130 | ||
131 | - | Else |
131 | + | Case 4 'rinforzi 'OK |
132 | - | R01 = "" |
132 | + | NHD = 14 |
133 | - | R02 = "" |
133 | + | Call MAPPATURA(NM_DT, MP, NAMEMAP) |
134 | ||
135 | - | '******************************************************* |
135 | + | Case 5 'piastroni 'OK |
136 | NHD = 15 | |
137 | ||
138 | - | R03 = T_RECT1(-SCS, M2, L - 26.6, L + SCS) |
138 | + | If FNL_SEQUENCING = 1 Then |
139 | - | R03 = R03 & T_RECT1(-SCS, M2, -SCS, 16.6) |
139 | + | ' Call NEST(MP, NAMEMAP, STR_ACCESSO) |
140 | - | R03 = R03 & T_RECT1(H - 70, H + SCS, -SCS, 16.6) |
140 | + | Call MAPPATURA(NM_DT, MP, NAMEMAP) |
141 | Else | |
142 | - | R03 = R03 & T_RECT1(H - 345, H - 290, 12.5, 17.5) |
142 | + | Call MAPPATURA(NM_DT, MP, NAMEMAP) |
143 | - | R03 = R03 & T_RECT1(H - (345 + M3), H - (290 + M3), 12.5, 17.5) |
143 | + | End If |
144 | - | If CD_SP = "50522" Or CD_SP = "50522" Or CD_SP = "50522" Then |
144 | + | |
145 | - | R03 = R03 & T_RECT1(H - (345 + M3 + M10), H - (290 + M3 + M10), 12.5, 17.5) |
145 | + | Case 6 'portali 'OK |
146 | - | Else |
146 | + | NHD = 14 |
147 | - | R03 = R03 & T_RECT1(H - (345 + 2 * M3), H - (290 + 2 * M3), 12.5, 17.5) |
147 | + | |
148 | If FNL_SEQUENCING = 1 Then | |
149 | - | R03 = R03 & T_RECT1(M2 + 20, M2 + 75, 12.5, 17.5) |
149 | + | Call NEST(MP, NAMEMAP, STR_ACCESSO) |
150 | Else | |
151 | - | R03 = R03 & T_SLOT(H - 25, DF - 18 + 15 - 2.4, 8, 5, 90) |
151 | + | Call MAPPATURA(NM_DT, MP, NAMEMAP) |
152 | - | R03 = R03 & T_SLOT(H - 55, DF - 18 + 15 - 2.4, 8, 5, 90) |
152 | + | End If |
153 | ||
154 | - | R03 = R03 & T_CIRC(20, DF / 2 + 15 - 2.4, 7.2) |
154 | + | Case 7 'cpr 'OK |
155 | - | R03 = R03 & T_CIRC(20 + M1, DF / 2 + 15 - 2.4, 7.2) |
155 | + | NHD = 14 |
156 | - | R03 = R03 & T_CIRC(20, L - (DF / 2 + 25 - 2.4), 7.2) |
156 | + | Call MAPPATURA(NM_DT, MP, NAMEMAP) |
157 | - | R03 = R03 & T_CIRC(20 + M1, L - (DF / 2 + 25 - 2.4), 7.2) |
157 | + | |
158 | Case 8 'PRM 'OK | |
159 | - | R03 = R03 & T_SLOT(H - 25, L - 9.5, 8, 5, 90) |
159 | + | NHD = 15 |
160 | - | R03 = R03 & T_SLOT(H - 55, L - 9.5, 8, 5, 90) |
160 | + | Call MAPPATURA(NM_DT, MP, NAMEMAP) |
161 | ||
162 | - | R03 = R03 & T_CIRC(H - 283, L - 10, 8.5) |
162 | + | Case 9 'SLIM |
163 | - | R03 = R03 & T_CIRC(H - (283 + 34), L - 10, 8.5) |
163 | + | NHD = 14 |
164 | - | R03 = R03 & T_CIRC(H - (283 + M3), L - 10, 8.5) |
164 | + | Call MAPPATURA(NM_DT, MP, NAMEMAP) |
165 | - | R03 = R03 & T_CIRC(H - (283 + 34 + M3), L - 10, 8.5) |
165 | + | |
166 | - | If CD_SP = "50522" Or CD_SP = "50522" Or CD_SP = "50522" Then |
166 | + | Case 10 'ENTRANCE |
167 | - | R03 = R03 & T_CIRC(H - (283 + M3 + M10), L - 10, 8.5) |
167 | + | NHD = 16 |
168 | - | R03 = R03 & T_CIRC(H - (283 + 34 + M3 + M10), L - 10, 8.5) |
168 | + | Call MAPPATURA(NM_DT, MP, NAMEMAP) |
169 | - | Else |
169 | + | |
170 | - | R03 = R03 & T_CIRC(H - (283 + 2 * M3), L - 10, 8.5) |
170 | + | Case 11 'componenti ENTRANCE |
171 | - | R03 = R03 & T_CIRC(H - (283 + 34 + 2 * M3), L - 10, 8.5) |
171 | + | NHD = 16 |
172 | Call MAPPATURA(NM_DT, MP, NAMEMAP) | |
173 | - | R03 = R03 & T_CIRC(M2 + 82, L - 10, 8.5) |
173 | + | |
174 | - | R03 = R03 & T_CIRC(M2 + 82 - 34, L - 10, 8.5) |
174 | + | End Select |
175 | ||
176 | ||
177 | - | If M6 > 0 Then R04 = T_CIRC(H - 1500, 15 + M6 - 2.4, 22) Else R04 = "" |
177 | + | If Len(Dir(NAMEMAP)) > 0 Then |
178 | Call MM4(NAMEMAP) | |
179 | - | 'SMUSSI |
179 | + | For XX = 1 To INST(0, 0, 0, 0, 2) |
180 | - | R05 = T_RAD(0 - OFSS, 15 + 4 - 2.4 - OFSS, 3) |
180 | + | Call NESTING2(XX, NOME_REP) |
181 | - | R05 = R05 & T_RAD(M2 - OFSS, 0 - OFSS, 3) |
181 | + | Next XX |
182 | - | R05 = R05 & T_RAD(0 - OFSS, L - (25 + 4 - 2.4) + OFSS, 2) |
182 | + | ' Call TIEMPO |
183 | - | R05 = R05 & T_RAD(M2 - OFSS, L + OFSS, 2) |
183 | + | Call RAW_MATERIAL(NOME_REP) |
184 | - | R05 = R05 & T_RAD(H - 70 + OFSS, 0 - OFSS, 4) |
184 | + | End If |
185 | - | R05 = R05 & T_RAD(H + OFSS, 15 + 4 - 2.4 - OFSS, 4) |
185 | + | |
186 | - | R05 = R05 & T_RAD(H + OFSS, L + OFSS, 1) |
186 | + | NO_NESTING: |
187 | Next MP | |
188 | - | 'Print #NF, T_BLQ(H - 1000 - 5.65, L, H - 1000, L - 5.65, 1, 0) |
188 | + | |
189 | - | 'Print #NF, T_BLQ(H - 1000, L - 5.65, H - 1000 + 5.65, L, 0, 1) |
189 | + | Call TIEMPO |
190 | - | R06 = T_SMUS(H - 1000, L + 0.2) |
190 | + | |
191 | - | 'Print #NF, T_CIRC(H - 1000, L, 3.3) |
191 | + | |
192 | Call EXTERNAL_PROD | |
193 | - | R11 = T_DATAMATRIX(ODP, H - 283 + 10, 15 + 2.5, "O") |
193 | + | 'Call LISTA_MATERIALI_KSL 'no lista unica |
194 | ||
195 | - | R12 = "" |
195 | + | |
196 | - | If M7 > 0 Then |
196 | + | |
197 | - | R12 = T_HEX(H - M7, 15 + 28.5 - 2.4, 11) & T_HEX(H - M7 - 859, 15 + 28.5 - 2.4, 11) & T_HEX(H - M7 - 859 - 398, 15 + 28.5 - 2.4, 11) |
197 | + | BBBB = MsgBox("VUOI STAMPARE LE ETICHETTE ?", vbYesNo) |
198 | If BBBB = 6 Then | |
199 | - | If M8 > 0 Then |
199 | + | 'REPORT*********************************************************** |
200 | - | R12 = R12 & T_HEX(H - M8 - 1257, 15 + 28.5 - 2.4, 11) & T_HEX(H - M8, 15 + 28.5 - 2.4, 11) |
200 | + | For RP = 1 To 5 |
201 | If PRG_NUM(RP) = "" Then Exit For | |
202 | - | If M9 > 0 Then |
202 | + | Call VPR_FNL1(INPUT_FOLDER, PRG_NUM(RP), OUTPUT_FOLDER) |
203 | - | R12 = R12 & T_HEX(H - M9, 15 + 28.5 - 2.4, 11) |
203 | + | Next RP |
204 | '***************************************************************** | |
205 | End If | |
206 | ||
207 | ||
208 | - | Case 1, 3, 5, 7 |
208 | + | |
209 | ||
210 | - | '*******************************************SPACCO |
210 | + | '''LISTA PIASTRONI |
211 | - | If CD_SP <> "" And CD_SP <> "0" Then |
211 | + | '''************************************ |
212 | - | R01 = SPC_PULS(NND, CD_SP, 25 + DF - 4.8, H, L, 1, sf, 0) |
212 | + | ''If Dir(NPAR_FLD & PRG_TOT & "PIASTRONI.MNE") <> "" Then |
213 | ''Application.ScreenUpdating = False | |
214 | ''For RP = 1 To 5 | |
215 | - | If DF >= 40 Then M5 = DF - 25 Else M5 = 0 |
215 | + | ''If PRG_NUM(RP) = "" Then Exit For |
216 | ''Workbooks.Open "\\NT1\CUT-VAULT\ARCHIVIO\lista_FNL_PIAST.xlsm" | |
217 | ''Application.Run "lista_FNL_PIAST.xlsm!VALORI", PRG_NUM(RP), OUTPUT_FOLDER, INPUT_FOLDER | |
218 | - | If CD_SP = "50522" Or CD_SP = "50522" Or CD_SP = "50522" Then |
218 | + | ''Workbooks("lista_FNL_PIAST.xlsm").Close savechanges:=False |
219 | - | R02 = T_CIRC(H - M11, 5.2, 5.5) & T_CIRC(H - M11 - 375.5, 5.2, 5.5) |
219 | + | ''Next RP |
220 | - | R02 = R02 & T_CIRC(H - M12, 5.2, 5.5) & T_CIRC(H - M12 - 275.5, 5.2, 5.5) |
220 | + | ''Application.ScreenUpdating = True |
221 | - | R02 = R02 & T_SLOT(H - M11, L - 24.1, 8, 5, 90) & T_SLOT(H - M11, L - 24.1 - M5, 8, 5, 90) |
221 | + | ''End If |
222 | - | R02 = R02 & T_SLOT(H - M11 - 375.5, L - 24.1, 8, 5, 90) & T_SLOT(H - M11 - 375.5, L - 24.1 - M5, 8, 5, 90) |
222 | + | '''************************************ |
223 | - | R02 = R02 & T_SLOT(H - M12, L - 24.1, 8, 5, 90) & T_SLOT(H - M12, L - 24.1 - M5, 8, 5, 90) |
223 | + | |
224 | - | R02 = R02 & T_SLOT(H - M12 - 275.5, L - 24.1, 8, 5, 90) & T_SLOT(H - M12 - 275.5, L - 24.1 - M5, 8, 5, 90) |
224 | + | |
225 | '***************WRITE REPORT SPACCHI | |
226 | - | Else |
226 | + | If RP > 0 Then |
227 | - | R02 = T_CIRC(QCSP + 187.75, 5.2, 5.5) |
227 | + | NAM = OUTPUT_FOLDER & "\REPORT_SPACCHI.TXT" |
228 | - | R02 = R02 & T_CIRC(QCSP - 187.75, 5.2, 5.5) |
228 | + | NFK = FreeFile |
229 | - | R02 = R02 & T_SLOT(QCSP + 187.75, L - 24.1, 8, 5, 90) |
229 | + | Open NAM For Output As NFK |
230 | - | R02 = R02 & T_SLOT(QCSP + 187.75, L - 24.1 - M5, 8, 5, 90) |
230 | + | For JJ1 = 1 To RP |
231 | - | R02 = R02 & T_SLOT(QCSP - 187.75, L - 24.1, 8, 5, 90) |
231 | + | If RPT_SPC(JJ1, 1, 1) <> "" Then |
232 | - | R02 = R02 & T_SLOT(QCSP - 187.75, L - 24.1 - M5, 8, 5, 90) |
232 | + | For JJ2 = 1 To 20 |
233 | If RPT_SPC(JJ1, JJ2, 1) <> "" Then | |
234 | ||
235 | Print #NFK, RPT_SPC(JJ1, JJ2, 2) | |
236 | Print #NFK, RPT_SPC(JJ1, JJ2, 1) | |
237 | - | If M3 = 0 Then |
237 | + | |
238 | - | Select Case LH |
238 | + | |
239 | Print #NFK, "" | |
240 | - | Case 1900 |
240 | + | Next JJ2 |
241 | - | If H - QCSP < 1030 Then M3 = H - QCSP - 530 |
241 | + | |
242 | - | If H - QCSP > 1080 Then M3 = (H - QCSP) / 2 - 40 |
242 | + | Next JJ1 |
243 | - | If (H - QCSP >= 1030 And H - QCSP <= 1080) Then M3 = 500 |
243 | + | Close #NFK |
244 | End If | |
245 | - | Case 1950 |
245 | + | '*********************************** |
246 | - | If H - QCSP < 1055 Then M3 = H - QCSP - 530 |
246 | + | |
247 | - | If H - QCSP > 1130 Then M3 = (H - QCSP) / 2 - 40 |
247 | + | '********************************* WRITE REPORT ULTIMO FOGLIO |
248 | - | If (H - QCSP >= 1055 And H - QCSP <= 1130) Then M3 = 525 |
248 | + | If ULTF > 0 Then |
249 | NAM = OUTPUT_FOLDER & "\SCARICO_RECUPERO_FOGLIO.TXT" | |
250 | - | Case 2000 |
250 | + | NFK = FreeFile |
251 | - | If H - QCSP < 1080 Then M3 = H - QCSP - 530 |
251 | + | Open NAM For Output As NFK |
252 | - | If H - QCSP > 1180 Then M3 = (H - QCSP) / 2 - 40 |
252 | + | For JJ1 = 1 To ULTF |
253 | - | If (H - QCSP >= 1080 And H - QCSP <= 1180) Then M3 = 550 |
253 | + | If ULTF2(JJ1) <> "" Then |
254 | 'For JJ2 = 1 To 20 | |
255 | - | Case 2050 |
255 | + | 'If RPT_SPC(JJ1, JJ2, 1) <> "" Then |
256 | - | If H - QCSP < 1105 Then M3 = H - QCSP - 530 |
256 | + | |
257 | - | If H - QCSP > 1230 Then M3 = (H - QCSP) / 2 - 40 |
257 | + | Print #NFK, ULTF2(JJ1) |
258 | - | If (H - QCSP >= 1105 And H - QCSP <= 1230) Then M3 = 575 |
258 | + | 'Print #NFK, RPT_SPC(JJ1, JJ2, 1) |
259 | ||
260 | - | Case 2100 |
260 | + | 'End If |
261 | - | If H - QCSP < 1130 Then M3 = H - QCSP - 530 |
261 | + | 'Next JJ1 |
262 | - | If H - QCSP > 1280 Then M3 = (H - QCSP) / 2 - 40 |
262 | + | Print #NFK, "" |
263 | - | If (H - QCSP >= 1130 And H - QCSP <= 1280) Then M3 = 600 |
263 | + | 'Next JJ2 |
264 | End If | |
265 | - | Case Else |
265 | + | Next JJ1 |
266 | - | MsgBox "ERRORE VALORE LH " & ACT_MOD, vbCritical |
266 | + | Close #NFK |
267 | - | End Select |
267 | + | |
268 | '********************************* | |
269 | ||
270 | - | Else |
270 | + | |
271 | - | R01 = "" |
271 | + | End If '***************************************************************************'FINE FINELINE |
272 | - | R02 = "" |
272 | + | |
273 | ||
274 | - | '************************************************ |
274 | + | MsgBox ("ELABORAZIONE TERMINATA") |
275 | End Sub | |
276 | - | R03 = R03 & T_RECT1(-SCS, M2, -SCS, 26.6) |
276 | + | |
277 | - | R03 = R03 & T_RECT1(-SCS, M2, L - 16.6, L + SCS) |
277 | + | |
278 | - | R03 = R03 & T_RECT1(H - 70, H + SCS, L - 16.6, L + SCS) |
278 | + | 'Sub LISTA_MATERIALI_KSL() |
279 | ' | |
280 | - | R03 = R03 & T_RECT1(H - 345, H - 290, L - 17.5, L - 12.5) |
280 | + | 'FileNamesList = FILELIST(NPAR_FLD, True, "MNE") |
281 | - | R03 = R03 & T_RECT1(H - (345 + M3), H - (290 + M3), L - 17.5, L - 12.5) |
281 | + | ' |
282 | - | If CD_SP = "50522" Or CD_SP = "50522" Or CD_SP = "50522" Then |
282 | + | 'NFDATA33 = FreeFile |
283 | - | R03 = R03 & T_RECT1(H - (345 + M3 + M10), H - (290 + M3 + M10), L - 17.5, L - 12.5) |
283 | + | 'NF_DAT33 = NPAR_FLD & "\" & PROG_NUMB & "_TEMP.MNE" |
284 | - | Else |
284 | + | 'Open NF_DAT33 For Output As #NFDATA33 |
285 | - | R03 = R03 & T_RECT1(H - (345 + 2 * M3), H - (290 + 2 * M3), L - 17.5, L - 12.5) |
285 | + | ' |
286 | ' | |
287 | - | R03 = R03 & T_RECT1(M2 + 20, M2 + 75, L - 17.5, L - 12.5) |
287 | + | 'For MM = 1 To UBound(FileNamesList) |
288 | ' | |
289 | - | R03 = R03 & T_SLOT(H - 25, L - (DF - 18 + 15 - 2.4), 8, 5, 90) |
289 | + | ' |
290 | - | R03 = R03 & T_SLOT(H - 55, L - (DF - 18 + 15 - 2.4), 8, 5, 90) |
290 | + | 'NFDATA44 = FreeFile |
291 | - | R03 = R03 & T_CIRC(20, L - (DF / 2 + 15 - 2.4), 7.2) |
291 | + | 'NF_DAT44 = FileNamesList(MM) |
292 | - | R03 = R03 & T_CIRC(20 + M1, L - (DF / 2 + 15 - 2.4), 7.2) |
292 | + | ' |
293 | - | R03 = R03 & T_CIRC(20, DF / 2 + 25 - 2.4, 7.2) |
293 | + | 'Open NF_DAT44 For Input As #NFDATA44 |
294 | - | R03 = R03 & T_CIRC(20 + M1, DF / 2 + 25 - 2.4, 7.2) |
294 | + | ' |
295 | - | R03 = R03 & T_SLOT(H - 25, 9.5, 8, 5, 90) |
295 | + | 'Do While Not EOF(NFDATA44) |
296 | - | R03 = R03 & T_SLOT(H - 55, 9.5, 8, 5, 90) |
296 | + | 'Line Input #NFDATA44, VVV |
297 | - | R03 = R03 & T_CIRC(H - 283, 10, 8.5) |
297 | + | ' |
298 | - | R03 = R03 & T_CIRC(H - (283 + 34), 10, 8.5) |
298 | + | 'Print #NFDATA33, VVV |
299 | - | R03 = R03 & T_CIRC(H - (283 + M3), 10, 8.5) |
299 | + | 'Loop |
300 | - | R03 = R03 & T_CIRC(H - (283 + 34 + M3), 10, 8.5) |
300 | + | 'Close #NFDATA44 |
301 | - | If CD_SP = "50522" Or CD_SP = "50522" Or CD_SP = "50522" Then |
301 | + | ''Kill (NF_DAT44) |
302 | - | R03 = R03 & T_CIRC(H - (283 + M3 + M10), 10, 8.5) |
302 | + | ' |
303 | - | R03 = R03 & T_CIRC(H - (283 + 34 + M3 + M10), 10, 8.5) |
303 | + | 'Next MM |
304 | - | Else |
304 | + | 'Close #NFDATA33 |
305 | - | R03 = R03 & T_CIRC(H - (283 + 2 * M3), 10, 8.5) |
305 | + | ' |
306 | - | R03 = R03 & T_CIRC(H - (283 + 34 + 2 * M3), 10, 8.5) |
306 | + | 'Call MM4(NF_DAT33) |
307 | 'Call RAW_MATERIAL | |
308 | - | R03 = R03 & T_CIRC(M2 + 82, 10, 8.5) |
308 | + | ' |
309 | - | R03 = R03 & T_CIRC(M2 + 82 - 34, 10, 8.5) |
309 | + | 'Kill (NF_DAT33) |
310 | ' | |
311 | - | If M6 > 0 Then R04 = T_CIRC(H - 1500, L - (15 + M6 - 2.4), 22) Else R04 = "" |
311 | + | 'End Sub |
312 | ' | |
313 | - | 'SMUSSI |
313 | + | |
314 | - | R05 = T_RAD(0 - OFSS, L - (15 + 4 - 2.4) + OFSS, 2) |
314 | + | |
315 | - | R05 = R05 & T_RAD(M2 - OFSS, L + OFSS, 2) |
315 | + | |
316 | - | R05 = R05 & T_RAD(0 - OFSS, 25 + 4 - 2.4 - OFSS, 3) |
316 | + | |
317 | - | R05 = R05 & T_RAD(M2 - OFSS, 0 - OFSS, 3) |
317 | + |