You are here: AxTools > CodeSMART 2007 for VB6 > Documentation > User's Guide > Error Handling > Inserting and Removing Line Numbers
While browsing this page, why not start downloading the evaluation setup kit (direct download, no questions asked).

Inserting and Removing Line Numbers

CodeSMART can automatically insert and remove line numbers into and from your projects. Because in the CodeSMART error handling system line numbers are in conjunction with error handling code we provided this tool to manipulate only the line numbers without affecting the effective error handling code. This can be very useful when new code lines are added or some code lines are removed and you just want to update the line numbers to reflect these changes.

To insert Line Numbers:

  1. Open the project you want to insert the line numbers in and (if applicable, depending on the operation's scope) select a component or a single procedure.
  2. Select the Insert Line Numbers entry in the Error and Exception Handling popup of the CodeSMART main menu to display the Insert Line Numbers dialog box (quick toolbar and menu references are available).
    Insert Line Numbers
  3. Select the operation scope. Depending on the current position in code and the active code or designer window, only valid options are listed.
  4. Specify the line numbering starting base. This will be the first line number that will be inserted. This value must be in the range 1 - 999,999,999. The default value is 100.
  5. Enter the line numbering step. This specifies the increment amount for every new code line. This value must be in the range 1 - 99,999. The default value is 2.
  6. You can specify if code lines that could not generate errors (inoffensive statements) should be skipped by checking the Skip line numbering for inoffensive statements box.
  7. You can also specify if you want to insert line numbers in the existing CodeSMART error handling code header and footer with the Insert line numbers in the error handler's header and footer box.
  8. Press Begin to perform the insertion. Depending on the situation, a progress bar may appear to reflect the operation progress.
 Notes
  • The above line numbering options do not apply to members with a valid error handling scheme specified or inherited. In such cases, the explicit error handling scheme settings will be used instead.
  • To quickly insert line numbers into the current procedure or component you can use the Insert Line Numbers entry that CodeSMART adds to the code window shortcut menu. This command uses the last valid settings for the base and step numbers and the other two insertion options.
  • You can set the all the line numbering settings by using the Line Number entry in the Error Handling section of the CodeSMART Control Panel.
  • It is a good habit to consider using the same base number and step for the line number inserting operation and in the CodeSMART error handling schemes that you are currently using.

To remove Line Numbers:

  1. Open the project you want to remove the line numbers from and (if applicable, depending on the operation's scope) select a component or a single procedure.
  2. Select the Remove Line Numbers entry in the CodeSMART main menu in order to display the corresponding dialog box (quick toolbar and menu references are available).
    Remove Line Numbers
  3. Specify the operation scope. Depending on the current position in code and the active code or designer window, only valid options are listed.
  4. Press Begin in order to start the operation.
 Notes
  • The line number remover does not take into consideration the existing CodeSMART error handling scheme modifiers so line numbers will be removed from all the members within the selected scope including the ones that have error handling code with line numbers.
  • To quickly remove the existing line numbers from the current procedure or component you can use the Remove Line Numbers entry that CodeSMART adds to the code window shortcut menu.
  • Always remember to insert the line numbers back into the procedures that really needs them.
See also
Error Handling Overview
Error Handling Schemes And Assignments
Error Handling Scheme Modifiers
Inserting and Removing Error Handlers
Inserting and Removing Line Numbers from Command Line
Exception Handling Basics
Adding and Removing the Exception Handling Module

Back To Top

Copyright © 2008 AxTools - CodeSMART 2007 for VB6 - Error Handling