![]() |
4.24.5.6. Tabbed pages
Standard name , Standard name (short) , BOM name
4.24.5.6.4. Change NB via vbs scripting
|
|
---|---|
Prev | Next |
If the options in the entry field do not suffice, you can generate a reference to a vbs script and work with complex conditions.
Set the entries under Standard name, Standard name (short) or BOM name.
In the example, the script is called nb.vbs and is located under …/setup/scripts/common.
The opened function is here called "ruletable".
function ruletable(table,calced_row,orgNB) result="" mmrow=cint(calced_row) if mmrow >= 0 then tmp=table.NN normbezeichnung=table.rows.item(mmrow).resolvevariables("$NB.",0) '0.************************************************ pos=Instr(1,normbezeichnung,"DIN") if pos = 1 then result=tmp+"_"+table.rows.item(mmrow).resolvevariables("$NENN.$MAT_NAME.",0) end if '1.************************************************ if tmp="DIN 912" then result="ISO4762abcd"+"_"+table.rows.item(mmrow).resolvevariables ("$NENN.$MAT_NAME.",0) end if '2.************************************************ if tmp="DIN 2448" then result="DIN 2448"+"_"+table.rows.item(mmrow).resolvevariables ("$D._$S._$L.___$MAT_NAME.",0) end if '3.************************************************ if tmp="DIN 2576" then result=tmp+"_"+table.rows.item(mmrow).resolvevariables ("$NENN._$D1.$MAT_NAME.",0) end if '4.************************************************ pos=Instr(1,normbezeichnung,"FAG") if pos >= 1 then result=table.rows.item(mmrow).resolvevariables("$NB.",0) end if '5.************************************************ pos=Instr(1,normbezeichnung,"EO EL L-Verschraubung mit Dichtkegel") if pos >= 1 then result=table.rows.item(mmrow).resolvevariables("$ERP_PDM_NUMBER.",0)+ "-EL"+table.rows.item(mmrow).resolvevariables("$ROHR.$S.",0) end if '6.************************************************ if tmp="DIN 7993-B 2" then result=table.rows.item(mmrow).resolvevariables("$ERP_PDM_NUMBER.",0)+ "-A"+table.rows.item(mmrow).resolvevariables("$D1.",0)+"---DIN7993" end if ' ************************************************* if result="" then result=orgNB end if end if ruletable=result end function