API serial number based on variable value selection.

Is there a Visual Basic (VB) .Net example of how to create an SOLIDWORKS® PDM Professional API serial number add-in based on the selected value from a variable in a file datacard (like value selected from droplist)?

And how to use it in the file card to generate a serial number ?

SolidworksApi/macros