I generally find it hard to visualize what is happening in dispatch. I've outlined the below in excel, but it is the same calculation (although the syntax in dispatch is pretty much the same!).
You would need to create a series of variables (t_...) which are calculated as the task is run. This can be done using static strings with values equal to 'length', 'left', 'right' functions. Once done it is simply a case of:
'Set Variable Value' of 'Description' to the value of the calculated 't_Description'
Depending on how many files I have, I would consider also calculating the part number and then subsequently renaming the file to that value. Throw in a "For all files" and you can do it larger groups (test first haha)
I've tried to lay it out logically for you.
Hope the below helps!!!
Have they not setup their serial number as " 'Counter-07' '%Description%' ". If that were the case, they could assign the variable description to the custom props of the solidworks file.
The attached file should work. I've included a r_NoDigit in the event the serial number changes for whatever reason, if necessary you can set this to a runtime variable and have a user input the number of digits for the numeric portion of the serial number.
Please note that I have not included a jump to check the files State, currently it will write to all documents regardless of the state.
setdescription.acn.zip 539 bytes
Lawson, Stavros, thank you both so much for your replies. I will try both suggestions and get back to you soon.