Applies To:
  • CitectSCADA 6.00, 6.10, 7.00

Summary:
How can a web client access DBF files, graphics, help files, etc. that are located in the Citect project folders on the server?  

Solution:
The web client only downloads Citect project runtime files automatically. However, you can create a zip file named misc.zip in your project folder. Put the additional files in it and the web client will automatically download the zipfile and unzip it to the project folder. The zip file may contain subdirectories and they will be correctly extracted under the project folder. Misc.zip is normally in the main project, but included projects may have their own misc.zip. Each one will be unzipped to the corresponding project folder on the web client. If the zip files are too large to download at once, the individual files could be downloaded on demand using Cicode and a FTP server (see Q3911).

See Q4577 for the paths the web client uses to store project files. Since this may vary from PC to PC and will be different from normal clients, path substitutions should be used instead of hard-coded paths. Normally, the substitution [User]:\<Project Name> could be used. However, web clients don't use this path substitution and just have a copy of the value from the server which is invalid on the web client ( Q4484 ). The correct project path can be determined relative to the main project path using the [Run] path substitution. For example:

sUserPath = StrLeft(sRunPath, StrSearchRev(PathToStr("[RUN]"), "\");

Note: The above statement requires the StrSearchRev() function from Q4944.

Another solution is to save the correct path to the citect.ini parameter [CtEdit]User on web clients. After that, the [User] path substitution can be used normally. The SetUserPath() function in the attached Cicode file demonstrates how to do this. Just call it on startup before trying to use the [User] path substitution.

 

Keywords: