10.1 Working with Custom Columns Definitions

This chapter covers advanced topics related to custom columns definitions. Most users will be able to work with Ascolog Insight effectively without reading this chapter. However, before you study this chapter please read chapter 4 Working with Logs and Layouts which is important forch understanding this chapter.

Besides columns created by the nonterminal symbols of a grammar definition Ascolog Insight also knows custom columns which are generated by a script which is called custom columns definition.

The commands which can be used in this script are documented in the application's Help Topics, chapter CCD Script Commands.

Custom columns are added by the user in order to extract additional meaningful information from the logs. A custom columns definition of a layout can consist of several files and among these files there is one file that is the “main” file. The execution of a script always starts in the “main” file (analogous to the Main function in many programming languages). Open the Layout menu and select Edit... to open the Edit Layout dialog shown in figure Editing a layout.

 

Editing a layout
Editing a layout

The field Custom column definition file name of the Edit Layout dialog displays what file is the “main” file. The “main” file can be changed with the Save & Apply command from the File menu of the Custom Columns Definition dialog (see table Commands of the File menu, File menu description below).

A custom columns definition is saved in a custom columns definition file which has the file extension “.cdf”. In order to create a custom columns definition open the Tools menu and select Customs Columns Definition... which opens the editor shown in figure Custom Column Definition editor.

Custom Column Definition editor
Custom Column Definition editor editor

In the editor you can use Ascolog Insight's commands to create custom columns definitions. Commands are displayed in blue in the editor (e.g. map and xtr). Open the Help menu and select Info to get a list of the available commands with a description. Macros can be used to combine commands in order to solve more complex problems (in Custom Column Definition editor TIME_SHIFT is such a macro). When in a custom columns definition a macro is found the macro is replaced by its definition (like in the programming language C). In the Edit menu you will find some useful functionality for working with a custom columns definition file. Select the Find... command to specify a search in the currently loaded custom columns definition. Use Find Next to navigate to the next occurrence of the search term. If you change the custom columns definition you can use Undo/Redo to undo/redo any changes in the script.

In the File menu you will find the commands listed in table Commands of the File menu to work with custom columns definition files.

Commands of the File menu
File menu Description
Load Loads a custom columns definition file (file extension “.cdf”). A previously loaded custom columns definition file will be closed and any changes that were not stored will be discarded without any warning.
Save & Apply Saves the current script to the custom columns definition file displayed in the title bar, makes this file the “main” custom columns definition file and subsequently applies the script.
Save As Saves the current script to a custom columns definition file. The Save CCD File dialog will be opened where you have to provide a name for the custom columns definition file.
Recent Files Displays the previously loaded custom columns definition files. Select a file to open it.
Exit Closes the Customs Column Definition dialog without saving any changes.

It is important to know how custom columns definitions are organized respectively stored in the file system. This is is shown in table Custom columns definition files and folders. Where you find the data folder is described in How to Install. Folder names are in bold, files are displayed in a normal font.

Custom columns definition files and folders
Folders and files  
<Application's data folder> e.g. C:\ProgramData\AscologInsight or C:\MySpecialPathXYZ
LAYOUTS  
TestLayout  
TestLayout.cdf  
_SHARED_  
Columns  
basecolumns.cdf  
extendedcolumns.cdf  
Macros  
basemacros.cdf  
sdkmacros.cdf  

If a custom columns definition should be valid for all layouts it must be added to the file “basecolumns.cdf” or “extendedcolumns.cdf”. If a custom columns definition should be valid only for a specific layout it must be added to the layout's custom columns definition file. The name of this file normally consists of the layout name and the file extension “.cdf”, i.e. “TestLayout.cdf” in the example above (see table Custom columns definition files and folders). Custom columns definition files can be split and stored in several other files which are not listed in the example. All files that should be used by a layout must be included using the #include directive, e.g. the file “basecolumns.cdf” must be included in the layout's custom columns definition file when it shall be used by the layout.

In order to include a file open the Edit menu and select Includes... to open the Includes dialog shown in figure Includes dialog.

Includes dialog</span>
Includes dialog

Add the path where the file is located that has to be included to the Path name edit control. It is recommended to use relative paths especially when you used the XCOPY installation method. This ensures that you can copy Ascolog Insight to a different folder without having to modify the include paths again. If you use a relative path it is relative to the layout folder of the currently loaded layout (e.g. folder “TestLayout” in the file structure given above). It is also possible to specify absolute paths. Instead of directly entering a path you can also use the button with the three dots to start the Browse For Folder dialog. In the Browse For Folder dialog you can navigate to the path you want to add. However, in this case absolute paths will be used. If the path in the Path name edit control is correct press the Add button to add the path to the Additional include directories list. Select a path in this list and press the Remove button to delete it from the list. If all settings are correct press the OK button to quit the dialog and save the settings.

Some functionality (e.g. certain custom columns definitions, macros) has to be enabled before it can be used because of performance reasons. Creating certain custom columns consumes a lot of processing power and memory of your computer. In order to enable/disable functionality go to the Edit menu and select Defines... to open the Defines dialog which is shown in figure Defines dialog. Insert the name of the define (e.g. USE_FULLROW_COLUMN) that controls the functionality you want to enable/disable in the Name field and set the appropriate value in the Value field (very often it's the value 1). In order to figure out what define has to be used you might have to browse the custom columns definition files (e.g. “basecolumns.cdf” or “extendedcolumns.cdf”). When you press the Set button next to the Defines or Undefines list the define will be added to the appropriate list. In order to delete a define/undefine select it and press the Remove button.

Defines
Defines

When all settings are correct press the OK button to save the settings and exit the dialog.