Skip to content

Editing glass catalogs

Question

I want to use only preferred or recommended glass from glass manufacturers. Is there an easy way to edit the current catalog from glass vendors to exclude some exotic/expansive glass?

Synopsis

Editing glass catalogs

Workaround

"Note that as of OSLO 6.3.1 the ""Private"" glass catalog is the only one that is placed in the private directory. All other glass catalogs are contained in the public directory and may be updated (i.e. overwritten) with future updates of OSLO. If you edit any glass catalog files in the public directory, it is recommended that you back up the original file (in case you need to return to it) and also the version of the file that contains your changes (in case it gets overwritten). It is important to remember that users cannot add new glass catalogs to OSLO. Adding new catalogs is a task that must be done by Lambda Research. Therefore, any specialized glass catalogs you want to use must be made by editing existing glass catalogs. The ""Private"" and ""Shared"" catalogs are expressly made for the purpose of user editing. The ""Private"" catalog can be updated from within OSLO (see the menu item ""Lens>>Glass Catalogs>>Update Private Catalog""). Any other glass catalog must be edited using a text editor and/or file renaming (if necessary). For example: the ""Corning"" catalog can be renamed to be ""Shared"" (overwriting the file of the same name) and then edited. An example of how to edit a glass catalog file and rename it follows in the ""Solution"" section below."

Solution

" Example: Let's assume that you want to edit the glasses in the ""Corning"" glass catalog and place the results in the ""Shared"" catalog:
  1. Use Windows Explorer to go to your OSLO "".../bin/glc/"" directory.
  2. Rename the existing ""Shared.glc"" file to be ""Shared.old""
  3. Make a copy the ""Corning.glc"" file and rename the copy to be ""Shared.glc"". Examine the ""Properties"" of this new ""Shared.glc"" file and make sure that the ""Read Only"" flag for the file is unchecked.
  4. Open the new ""Shared.glc"" file using the OSLO Text Editor or some other MS Windows text editor (such as UltraEdit or NotePad).
  5. Each line in the ""Shared.glc"" file refers to an individual glass in the catalog. Delete the glasses you want by deleting those lines. Add glasses you want by copying lines from other OSLO glass catalog files.
  6. Note that the 2nd data item on the first line of the file needs to be the total number of glasses in the glass catalog file. Count the number of glasses in your edited file and change the number on the first line.
  7. Every glass in every glass catalog in OSLO needs to have a unique name. In this example, some of the glasses in this edited ""Shared"" file will also appear in the ""Corning"" file. To avoid confusion, the glass names in this file should be altered so they are unique. Example: add extra an extra letter or letters to the front of the glass name (such as ""S""). Note that for any glass names longer than 10 characters, the characters 11 and higher will be ignored within OSLO.
  8. Save the fully edited ""Shared.glc"" glass catalog file and restart OSLO.
  9. The changed ""Shared"" glass catalog can now be used within OSLO as you would any other glass catalog.
You can edit other glass catalogs in the same manner. Note: The old, un-edited glass catalog will still appear in the glass database function accessed by the OSLO menu item: ""Lens>>Glass Catalogs>>Browse Glass Database"" To incorporate the edited glass catalog into the glass database function, you need to perform a few more steps:
  1. Use Windows Explorer to go to your OSLO "".../public/cdb/"" directory.
  2. Select all the *.cdb files in this directory at once and make sure that their ""Read Only"" flag is unchecked (right click the mouse and choose ""Properties"")
  3. Issue the command ""mkglass public"" (no quotes) on the command line.
  4. If an error message is generated that says:
      Error in mkglass  Command is currently disabled
    Restart OSLO and issue the preceeding command again.
  5. The updated glass catalog database should now be able to be accessed from the ""Lens>>Glass Catalogs>>Browse Glass Database"" menu item."