Get numeric sequence by predefined list value

Get numeric sequence by predefined list value

GabrieleZelasco
Enthusiast Enthusiast
404 Views
2 Replies
Message 1 of 3

Get numeric sequence by predefined list value

GabrieleZelasco
Enthusiast
Enthusiast

Hi everyone,
I'm developing in C# (Vault 2023 api).
I created an item numbering scheme in the Vault with a predefined list (A,B,H,V, I) and a number sequence (0-999999999) step 1.
I would like to know how to get a new incremental number depending on the letter passed by code. I'll explain.
The user selects a value associated with a letter from the combobox (selectedValues: A,B,H,V,I). I have to pass this letter to the numbering scheme and obtain the corresponding progressive numbering.
E.g. user selects an item from the Valves list (letter: "V") -> numbering scheme releases a new progressive number like this V000000007.
If the next user selects "A" I will obtain the following progressive sequence: A000000003.
And so on.
I don't know how to pass the letter to the numbering scheme and get the progressive numeric part. I attach screenshots. A thousand thanks.

0 Likes
Accepted solutions (1)
405 Views
2 Replies
Replies (2)
Message 2 of 3

Markus.Koechl
Autodesk
Autodesk

You can find a fully coded (sorry, it is PowerShell, not C#) sample here: VDS-Sample-Configuration-2023/VDS-2023-MFG-Sample/Vault.Custom/addinVault/ADSK.QS.ReserveFileNumber....

The concept is the same for all numbering schemes: build an array of all inputs in the order the user would type.

I hope this helps.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe
0 Likes
Message 3 of 3

GabrieleZelasco
Enthusiast
Enthusiast
Accepted solution

Good morning Markus, 

Once again you were a big help. It wasn't complicated but I needed a little push to go on.

Let me share the complete ItemCreation method both for your verification (it works correctly on my system) and for anyone who needs it in the future of course.

Thank you.