2.4.2.3 Updating an Existing Origin C File

Introduction

There are cases where a group leader or a developer wants to release a new version of an Origin C file to other Origin users. In such cases, if the end users have already installed an older version of the Origin C file, they will have a corresponding .OCB file in their User Files Folder (UFF). It is possible that the time stamp of the new Origin C file is older than the time stamp of the .OCB file. When this happens Origin will think the .OCB file is already updated and will not recompile the new Origin C file. To avoid this possible scenario it is best to delete the .OCB file when the new Origin C file is installed. Once deleted, Origin will be forced to remake the .OCB file and will do so by compiling the new Origin C file.

Manually Deleting OCB Files

The OCB file corresponding to the Origin C file in question, can be manually deleted from the OCTEMP folder in the Users Files Folder on the end user's computer. Depending on the location of the Origin C file, it is possible for the OCB file to be in nested subfolders within the OCTemp folder. Once located, the end user can delete the OCB file and rebuild their workspace to create an updated OCB file.

Programmatically Deleting OCB Files

A group leader or developer can programmatically delete the corresponding OCB files using LabTalk's Delete command with the OCB option. This is very useful when distributing Origin C files in an Origin package and it is not acceptable to have the end user manually delete the .OCB files.

Below are some examples of how to call LabTalk's Delete command with the OCB option:

del -ocb filepathname1.c
del -ocb filepathname1.ocw
del -ocb filepathname1.c filepathname2.c // delete multiple files
del -ocb %YOCTEMP\filename.c // use %Y to get to the Users Files Folder