No announcement yet.

Self defined .dat and .gci names

  • Filter
  • Time
  • Show
Clear All
new posts

  • Self defined .dat and .gci names

    How can I define the .dat and .gci names so that it never gets changed by the Workshop4 or defined by workshop4 pro.

    I have only 1 image and would like this the .dat and .gci to always have the same name across different programs so that I don't have to keep renaming or looking for what file name is for each flash drive.

    I would like have the names fixed at AAA.dat and AAA.gci.


  • #2
    Hello ua100k,

    There are no settings for defining the .dat and .gci naming convention in WS4.

    Fortunately, to resolve the auto-renaming of the filename of .dat and .gci on the file_LoadImageControl in WS4. First, You must modify these by renaming into AAA.dat and AAA.gci before saving(rename your project different). Because, before WS4 save the current project, it will search for the keyword that matched to the name of the unmodified project, and replaces by the name of the modified project.

    Additionally, the naming of the generated files must be not more than 12 characters(8 characters+3characters(.dat/.gci)). Otherwise, the display module won't able to access the file needed (character "~1" is used to cut the length of the filename of the generated files if more than 8 characters).

    Basically, you have to do the manual approach in which you will keep renaming the .dat and .gci on the file_LoadImage function (with not more than 12 characters) and check if these exist on the SD card.

    Best regards,



    • #3
      Can I ask why?


      • #4
        When installing the software, the graphics don't change, only the software. When a new rev of software is done, 4d workshop pro changing the name of this file so the open fails. This makes it har to do first productions runs and makes everything more manual. It is also making it hard to update software in the field as the file names keep changing without the user changing it.

        A good option is to have the graphics in the flash memory downloaded with the program - I read the manual but fail to see how I can load a jpg into the flash and then display this as a image. If this is possible, can you please share that code. Thanks.


        • #5
          I don't quite follow.

          The filenames of the .dat and .gci are generated by Windows. When you first save the program Workshop works out what names Windows has given the files and changes the source to match. So from then on they will be the same for any number of compiles.

          If you use 'Save as' to create a new version Workshop will change the again, work out what Windows has called the new files and change the source to match.

          So there should be no issue there.

          The uSD is updated when the code is rebuilt, or at least workshop offers to copy the files and will unless you click 'no thanks' to its offer.


          • #6
            While the software is updated, there is no change to the images. So the uSD should not or need not be changed or updated. The graphics can be put on the uSD in bulk and then used for every software version. If Workshop keeps changing the names, even though the graphics has not changed, then we have to go hunting for the file name.

            Note the key point is that the graphics or images do not change. So there is not need to update the file on the uSD or the previously created uSD. the images are constant.
            Only the software code is changing. .dat and .gci file names are generated by workshop.

            Original from program.
            hndl := file_LoadImageControl("DJ0G0N~B.dat", "DJ0G0N~B.gci", 1);

            New when done as SaveAs for new version of the same program. This is to keep track of versions that are shipped. Note the file name has change even though the graphics/images in the program have not. This creates a problem of having to chase down what name workshop has changed it to or to have to keep changing this back to the original.
            hndl := file_LoadImageControl("D6D9IN~E.dat", "D6D9IN~E.gci", 1);


            • #7
              OK, so I presume you are using ViSi, all you need to do is create a Designer version of your program.

              Copy the .4dg file outside of Workshop to a new name. Then edit and maintain that program.

              You could also strip the code out of the original ViSi program, so it just becomes a stub for the images.

              When that is done the images will be completely separate to the program, and thus you can maintain both separately.

              If you are using Genie, then there is no way to separate the two, and, to ensure consistency, you should not assume that the images are the same and haven't changed. If you want the same image name you need to use the same program name, maybe consider using file, zip project and renaming the zip file to create version backups.