14 Replies Latest reply on Jun 28, 2012 12:04 PM by Joy Garon

    Naming a new part/assembly

    Derek Hindsberg

      Hello everybody

       

      I have a few hopefully easy questions that I hope to get an answer for.

       

      1. When I save a new part/assy solidworks names it to partnumber.sldprt. Is it possible to add part descripton to the filename? Say part number is 12345 and description is bracket, now I want to save the part as 12345-bracket.sldrpt not 12345.sldprt.

       

      partname.jpg

       

      How do I rename all the old parts in my vault to names like 12345-bracket.sldprt? Now all the parts have only the partnumber as filename.

       

       

      2. In our company we have standard machines that we customize for new customers. Whats the smartest way to customize a machine without changing anything in the standard machine folder? Should we use "copy tree" to a new project? If we use this, does all the references to the old assy dissapear and there will be a bunch of new parts in the new project folder?

       

      Thanks in advance

        • Re: Naming a new part/assembly
          Michael Dekoning

          1. You can't do this out of the box. You'll have to write an addin for a custom serial number. If you have alot of files to be renamed, you should wrte a program using the API to do this as well.

           

          2. You could copy tree the top-level assembly for the machine with a new number. All of the references will still oint to the standard machine. Then replace any exisintg models in the new assembly with the custom ones.

          • Re: Naming a new part/assembly
            Martin Solem

            Regarding the first question, if API and programming sounds unbearable, you should also be able to use the Dispatch Add-in.

            • Re: Naming a new part/assembly
              Ravi Teja

              Hi Derek,

                        Are you able to Name a part based on a serial number ?. Are serial number and Description present on File Data Card ?

               

              You can use Dispatch to rename file with any variable present on the data card.

               

              In dispatch you have to pick filename,seperate name and extension,modify the name and reattach the extension.

               

               

               

              Regards

              Ravi T

                • Re: Naming a new part/assembly
                  Derek Hindsberg

                  Hi Ravi,

                   

                  All new parts automatically gets a number as their name, and yes, the number and description is present on data card.

                  I read the admin guide for epdm and there was some things that I didn't understand.

                       I'm not the admin but my user have all rights. Can I install dispatches anyway?

                       Are dispatches installed on every computer or is it sufficient to install it on my computer. The vault isn't on my computer, it's on a server in a different building.

                       Which dispatch should I install? Probably first Dispatch64.dll or Dispatch.dll. (My computer is 64bit but dunno if every computer is it).

                   

                  You probably noticed I don't have any clue how to do this thing so a better guide than epdm admin guide is appreciated

                   

                  Thanks in advance

                  Derek

                    • Re: Naming a new part/assembly
                      Ravi Teja

                      Hi Derek,

                               Dispatch is an addin provided by SolidWorks.It needs to be added on the server.However it can be added from any client machine.with a user who have "Can Administrate Add-ins".

                       

                      f1.png

                       

                      2. After the dipatch has been added,you can use the procedures in dipatch to achive whatever result you want.

                      3. Few things diptach can do are renameing file by taking values from card,getting latest version of files,copying files to other location,checkin checkout etc.

                       

                      Do some research on the this forum and go through the documentation you can find readymade dispatch scripts in .acn formats.

                       

                      You can modify them according to your need.

                       

                       

                      If i get time ill upload the dipatch .what is the extension of files to be renamed? and what are the variable names in which serial and descriptions are stored?

                       

                       

                       

                       

                       

                       

                      Regards

                      Ravi T

                        • Re: Naming a new part/assembly
                          Derek Hindsberg

                          Hello Ravi,

                           

                          Now I have dispatch64 installed in the vault. How do I continue? I want to rename all parts and assys (except files in purchased components folder) to number-description.sldprt/asm. Number is a variable on the datacard and it is a running number for every new part added to the vault (like a serial number for each file). Description is also a variable on the datacard.

                           

                          If parts are renamed, do assemblies find the new names or are all references broken in a assembly?

                           

                          When the dispatch is loaded, does all new files get a name like number-description? If not, how do you set up that solidworks automatically names parts and assemblies to number-description? Now when I save a new part in the vault it only gets the number as it's name.

                           

                          Thank you for helping me out and sorry for bad english

                           

                          Derek

                    • Re: Naming a new part/assembly
                      Derek Hindsberg

                      I did a quick test but i get an error saying "Error renaming file, the method was successfully executed but returned 'false'". What is wrong with my settings? I'm trying to rename only one file now for testing. Here is a PrtScr of my settings.

                      rename_fail.jpg

                      For all tl;dr's out there, I'm trying to rename my parts and assys to number-description.sldprt/asm. Number and description are variables on the datacard.

                       

                      -Derek