1 Reply Latest reply on Feb 26, 2015 7:22 PM by Alexey Groutso

    Driveworks Express adding Prefix to filename Rule

    Tony Thompson

      I am working on a project that I am having problems getting the rules builder to allow me to add a project number to the beginning of the existing filename. I am able to get it to add it to the end of the existing filename but not before it. I have an assembly that only consist of (3) part files and the assembly file. I have the assembly filename as -00.sldasm and the three parts are named -01.sldprt, -02.sldprt and -03.sldprt. I am capturing a project number in the form that is structured with 3 letters a - and then a 5 digit number example XXX-12345 and I would like to add this to the beginning of the current filename not after it so the new assembly would look like this XXX-12345-00.sldasm and the parts would look like this XXX-12345-01.sldprt, XXX-12345-02.sldprt and XXX-12345-03.sldprt

       

      Thanks

      Tony

        • Re: Driveworks Express adding Prefix to filename Rule
          Alexey Groutso

          Hi Tony,

           

          Working on exactly the same type of solution at the moment. This is what I've done to make it "work".

          Because your assembly and part names will always stay the same you can simply replace the original file names entirely. In your case you have:

          -00.SLDASM

          -01.SLDPRT

          -02.SLDPRT

          -02.SLDPRT

           

          Following information I gathered from SolidWorks help (2015 SOLIDWORKS Help - Rule Type: File Name ) The rules that you'd write for each file are:

          -00.SLDASM = "*" & ProjectNumber & SerialNumber & "-00"

          -01.SLDPRT = "*" & ProjectNumber & SerialNumber & "-01"

          -02.SLDPRT = "*" & ProjectNumber & SerialNumber & "-02"

          -02.SLDPRT = "*" & ProjectNumber & SerialNumber & "-03"

           

          Where ProjectNumber is your text field form and SerialNumber is your 5 digit either numerical or text field form. Numerical field would need a bit of work if you want it to always be 5 digits long as in 00010 and not 10, but that's just a simple nested in statement.

           

          I'm not sure if it's possible to automate the 5 digit serialnumber that would increment itself using DriveworksXpress but I'll let you know if I find a solution. Let me know if this helps

           

           

          Regards

          Alexey