The serial number generator itself does not track where the serial numbers it issues are used.
What mechanism are you using to assign the serial number to the DCN?
I suspect it ends being being a variable of the DCN document. If that is the case then you need to use the variable APIs to read the value of the variable assigned by the the serial number generator.
I would start at this Method to start getting the variables : IEdmFile5::GetEnumeratorVariable.
To assign serial numbers to documents, i'm just linking a predefined, numerical serial number to the data card variable of new document as its produced (from a template); I'm new to API programming so (lets see if I understand), by calling the method you have suggested, I can specify a variable which takes on the value generated by the serial number?
You are using the Vault template function to assign the serial number to a document? The method I mentioned will let you programatically access the datacard variables of a particular file.
If you want to generate a new serial number and assign it, you would have to do something a little different. In that case I would:
- Use IEdmSerNoGen7::AllocSerNoValue to get a new serial number from the generator
- Use IEdmSerNoValue.Value to read that new serial number
- Use IEdmFile5::GetEnumeratorVariable to ge the Variable Enumerator for the file you want to assign the serial number to
- Use IEdmEnumeratorVariable5::SetVar to assign the serial number from step 2.
Not that I am missing steps in this, that is a rough overview. Also I have not done exactly what I listed above so I don't know that is the best way, or even a good way to do it. Hopefully it points you in the right direction though.
thanks for you're insight; it took me a little longer, but the steps you outlined give a good indication of the actual process.