Via functions, external files can be referenced to as well. This occurs with vbs files.
![]() | Note |
|---|---|
A special license is required here (PSAPI), unless the file is coded as a .vbb file. (CNS2009*PSAPI*LANG*VBS) | |
A simple use-case would be for example if for DIN 912 the CAD file name is to be created differently than from the other DIN standards and different again for all other projects.
SHORTNB =SCRIPT('nb.ruletable','$CALCED_ROW.','$SHORTNB.')
function ruletable (table,calced_row,orgNB)
normbezeichnung=table.rows.item(mmrow).resolvevariables("$NB.",0)
result="ISO4762"+"_"+table.rows.item(mmrow).resolvevariables("$NENN.$MATERIAL.",0)
'Variables NENN and MATERIAL receive ISO4762 as prefix.
pos=Instr(1,normbezeichnung,"DIN")
result=tmp+table.rows.item(mmrow).resolvevariables("$NENN.$MATERIAL.",0)
'All other DIN standards are made up of NN, NENN and MATERIAL.

![[Note]](https://webapi.partcommunity.com/service/help/latest/pages/fr/partsolutions_user/doc/images/note.png)