AnsweredAssumed Answered

EPDM Set Revision:  Str to Int. to get revision counter number

Question asked by Matthew aDAMS on Nov 16, 2015
Latest reply on Nov 16, 2015 by Matthew aDAMS

Hi guys,


I have run into a little bit of an issue today that I am not sure how to tackle.  I have been using the SolidWorks API example: Set Revisions (Visual Basic) to manually set revisions on some older files that failed during migration..  Everything was working great until today, I need to set a manually revision on an older document that is "AD". This revision is support by my revision schema but the API is using Asc(RevisionProp.ToUpper()) - Asc("A") + 1 (roughly line 218 of sample code) to get the revision number.  This all makes since but I can not figure out how to get this to work for a double letter.  Asc or AscW only takes the first character that it come to.  Basically I need to convert a double letter string to an integer. I'm not sure if an IF statement that would calculate differently if the string count is equal to 2 would work or what that formula would like.


Has anyone run into this before?  I don't really want to run this though a workflow as that seems to be the hard way of doing things.


Thanks in advance!