Share via


Customizing Code in the Code Librarian

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The Code Librarian uses a database format to store its code so you can easily update the existing information in the Code Librarian, or you can create a new code database.

You can add new code, delete existing code, rename the code, and add or modify keywords, categories, and code item types. With the Code Librarian, you can associate all of the source code with descriptions, keywords, and searchable text and titles.

Modifying Existing Code Databases

If you have write permissions to the Code Librarian database, you can make changes to the code snippets. For example, you can add new code, delete existing code, rename the code, add new keywords, and change the categories or code item types.

Note   If you are accessing the Code Librarian database over a network, you might not have write privileges to that database. To make changes to a database, you must have the appropriate permissions.

Note   When adding new code, it is recommended that you include keywords and a description that will be helpful to others searching for code.

Defining Categories and Code Items

You can associate the source code in the Code window with categories and code items. By using categories, you can make it easier to find specific code within the Code Librarian. The code item option provides another way to organize your code, and displays a code item's properties.

The Code Librarian provides default values for both category and code item type, but you can create your own categories. A single piece of code can be associated with numerous categories. When you add new code to the library, you can associate it with existing categories, or you can create new categories.

To define categories and code items

  1. Open the Code Librarian. For details, see Opening the Code Librarian.
  2. In the Code Librarian menu, select Add, and then select either New Category or New Code Item, depending on what you want to do.
  3. When in the Code Librarian window, you can rename your category or new code item. To change the category or code item type, display the Properties window by selecting the View menu, then Properties Window. With the code item selected in the Code Librarian, change the Type property in the Properties window. Select the browse (...) button, and then select Type to display the dialog box.
  4. If you want to create a new item, select the New button. If you want to delete an item, select the Delete button. If you want to change the icon for your item, select the Change Icon button. Follow the instructions for your specific task.
  5. Click OK.

See Also

Sharing Code with the Code Librarian | Making the Code Librarian Available to Multi-users | Distributing Code Samples with the Code Librarian Viewer