Retrieving the ePDM serial number

Hello

I'm writing a VBA maccro to create tools on SW. I want to retrieve the value of the incremental counter allowing to give a serial number automatically to the parts models in pdm. Is it possible to return the first available value of this meter? And if so, how?

Thank you in advance.