Here Is the format I'm looking for:
...but I want to reset the two digit portion every day. I'm not even seeing a way to do this via the api.
Am I missing something?
Yeah, I don't see any either. You may have to go directly to the counter's db table and reset it with SQL.
If the Serial Number generator was used 5 times in one day, then the "Next counter value" would be 6.
Reset using the API, can't help you there
I'm aware that you can reset the counter in that dialog...I want to reset it on a schedule (every day). I don't see anything exposing that in the api.
OK, sorry about that.
I recommend Jeff Cope or Mike Spens for custom code writing, just google their names.
I can code myself...I just don't see anyway to interact with the s/n generators via api. I was wondering if I missed something.
That's what I was thinking...I hate to step outside of the api unless I have to.
Another alt that I've found is in the API help file (example):
Creating Serial Numbers Using Visual Basic
Public Sub GetAddInInfo(ByRef poInfo As EdmLib.EdmAddInInfo, ByVal poVault As EdmLib.IEdmVault5, ByVal poCmdMgr As EdmLib.IEdmCmdMgr5) Implements EdmLib.IEdmAddIn5.GetAddInInfo
'Return information about this add-in to PDMWE in the struct
poInfo.mbsAddInName = "My serial number generator"
poInfo.mbsCompany = "The name of my company"
poInfo.mbsDescription = "Implements serial numbers."
poInfo.mlAddInVersion = 1
poInfo.mlRequiredVersionMajor = 5
poInfo.mlRequiredVersionMinor = 2
'Tell SolidWorks Enterprise PDM that we can generate serial numbers.
Public Sub OnCmd(ByRef poCmd As EdmLib.EdmCmd, ByRef ppoData As System.Array) Implements EdmLib.IEdmAddIn5.OnCmd
'Check the upper and lower bounds of the array.
Dim index As Long index = LBound(ppoData)
Dim last As Long last = UBound(ppoData)
If index <= last Then
Dim cnt As Integer
cnt = last - index + 1
'Create a temporary array we have full access to
Dim tmpArr(cnt) As EdmCmdData
tmpArr = ppoData
'Generate serial numbers for all of the affected files.
Dim CounterVal As String
While index <= last
CounterVal = tmpArr(index).mlLongData1
Dim s As String
s = "My serno(" + CounterVal + ")"
tmpArr(index).mbsStrData1 = s
index = index + 1
'Return the updated data
ppoData = tmpArr
Obviously, you can get that format within the normal generator but it shows you can color outside of the box if you desire.
Have you gotten any further than this I would like it to reset with a button or a variable of some sort.
Retrieving data ...