7 Replies Latest reply on Aug 21, 2018 7:00 AM by Tony Tieuli

    Why are some file references upper case while others are lower case?

    Dan Pihlaja

      This is more of a general Solidworks question.

       

       

       

      As far as I can tell, these were saved in exactly the same manner.  I didn't change the case.  Something else changed it.

       

      I have noticed this over the years and never really thought much of it.   Today, I ran into it and thought....let's ask.

       

       

      Below is another example:

       

      Here, in the BOM, when I RMB on the part, it shows up lower case:

      In fact, for every part in the BOM the "Open.." spot on the RMB tree is all lower case.

       

       

      But when I open that part, you can see that it is Upper case in the actual file name and the title at the top of the tree:

      When I create a drawing of it, all upper case:

       

      I find this odd, because in order to make it lower case, Solidworks programmers have you have to to specify it to be lower case because it was saved in uppercase.  It seems like this was done on purpose, but I don't understand it.

       

      The only reason that I really bring this up is that at one point, we (Rick Becker and I) were having an issue with part templates in which, which seemed to stem from uppercase template extensions vs lowercase template extensions.  Jim Wilkinson resolved the issue, but I just wonder......

       

       

      Why?

       

      SW 2015 Sp5 / Windows 10 64bit.

        • Re: Why are some file references upper case while others are lower case?
          Rick Becker

          Dan Pihlaja wrote:

          The only reason that I really bring this up is that at one point, we (Rick Becker and I) were having an issue with part templates in which, which seemed to stem from uppercase template extensions vs lowercase template extensions. Jim Wilkinson resolved the issue, but I just wonder...

           

          Dan, here is the forum posting of that discussion...

          Open SW2017files on SW2016 caused the SW freezed

           

          I also found this...

          CAPITAL/LOWERCASE letters changing themself

          • Re: Why are some file references upper case while others are lower case?
            Jim Wilkinson

            Dan Pihlaja wrote:

             

            This is more of a general Solidworks question.

             

             

             

            As far as I can tell, these were saved in exactly the same manner. I didn't change the case. Something else changed it.

             

            I have noticed this over the years and never really thought much of it. Today, I ran into it and thought....let's ask.

             

             

            Below is another example:

             

            Here, in the BOM, when I RMB on the part, it shows up lower case:

            In fact, for every part in the BOM the "Open.." spot on the RMB tree is all lower case.

             

             

            But when I open that part, you can see that it is Upper case in the actual file name and the title at the top of the tree:

            When I create a drawing of it, all upper case:

             

            I find this odd, because in order to make it lower case, Solidworks programmers have you have to to specify it to be lower case because it was saved in uppercase. It seems like this was done on purpose, but I don't understand it.

             

            The only reason that I really bring this up is that at one point, we (Rick Becker and I) were having an issue with part templates in which, which seemed to stem from uppercase template extensions vs lowercase template extensions. Jim Wilkinson resolved the issue, but I just wonder......

             

             

            Why?

             

            SW 2015 Sp5 / Windows 10 64bit.

            Windows is not case sensitive in general; meaning you can't actually have files with the same name with just case being different. For instance, you can't have two files in the same folder called file.txt and FILE.txt or file.TXT or FiLe.TxT.

             

            So, case is really just a convenience for users for visualization of the filename in the Window OS. It has varied over the years and releases of MS. I remember in past OS versions when the operating system would change the case of text in a filename without the user trying to do so. I also remember that if you had a file called file.TXT and tried to change it to file.txt, you couldn't do it...you'd have to change it to file1.txt and then file.txt (it didn't see capitalization changes as filename changes so you had to change it to some other name and back to the original name to get the capitalization to change).

             

            Now, some things about SOLIDWORKS and the case sensitivity:

            • If there are different negative behaviors in SOLIDWORKS caused by the case of the text in filenames, it is a bug; it should not be case sensitive. That earlier situation that you referenced where SOLIDWORKS was freezing due to the capitalization of the file extension was one example of that. The code was looking for it to be upper case and it failed if it was not; it should have been programmed to be case insensitive. These would be considered high fairly high priority bugs.
            • I've seen different places in SOLIDWORKS where, when making new files, it will, by default when it adds the extension, create them either with small letter extensions, or with capital letter extensions (i.e. sldasm vs. SLDASM). This theoretically should do no harm, but it would be best if it were consistent just so it does not add to the confusion. This probably just happens from different developers adding different code for saving files years apart from one another. Maybe time for us to go through and try to clean that up to make it consistent. I would consider these bugs too, but they would be considered lower priority to things that make the software fail due to capitalization (like I talk about in the first bullet).
            • And finally, what you are referring to in this particular post; the display of capitalization in different places in the software when it is just there for reference. It would be best if this were also consistent and showed exactly the capitalization that is shown when looking at the files in File Explorer. My guess is the reason they are different is again because they were implemented at different times by different developers. I don't think the developer went out of their way to remove the capitalization in the BOM case. My guess is that they just used a Microsoft function that strips the capitalization out. It may have been implemented way back when Microsoft didn't allow the capitalization control by the user that it does today and the function just needs to be updated to use a newer function that does not strip the capitalization. BTW....you'll actually notice that your bolt example above is not ALL upper case; the "mm" in the middle of it is lower case. So I think the two situations you are seeing here are:
              • The capitalization is left alone and shows exactly how it shows in File Explorer.
              • The capitalization is stripped and everything is shown in lower case. I would again consider this a bug that should be reported when you encounter it, but again, would probably be lower priority since it doesn't do any functional harm; but it makes it harder to associate visually with the capitalization that was used at the OS level.

             

            I hope that explains it all,

            Jim