[CE VBA] Configuration variable query?

I am working on our company configuration and looking at -debug files is making my eyes cross.

I would like to write a VBA project to help me analyze variables, but I'm not sure if I can do what I want. I'd like some suggestions for a direction.

For instance, I might like to redefine _USTN_HOMEPREFS but I have no easy way of finding all the places _USTN_HOMEPREFS is used. I don't want the expansion, I want to know the names of other variables that are defined using _USTN_HOMEPREFS.

Or I'd like to look at MS_DEF and see a listing of the files and variables that process through to the current configuration. Some kind of single variable debug; the final expansion value is great, but I'd rather know how we got there.

Or even a VBA that could sort through the -debug text file so I could isolate all mentions of a single variable. This may be the easiest...Go through the debug, line by line. If the variable is mentioned in that line, copy the whole line to a text file and move to the next line.

I currently have OpenRoads Designer 2020 R3 (V. 10.9.0.91) I am limited to VBA by my distinct lack of programming ability.

Thank you.
MaryB

Parents
  • Hi MaryB,

    Yes its possible to create a project where you could select either a debug file or multiple CFG files and basic perform string operations on their contents however, from what you have mentioned by looking to track down instances of the variables, I would suggest to you a far simpler and more powerful solution:

    1. Download Notepad++
    2. Drag all your CFG files into the window (and debug text file too if you so wish)
    3. Open the search function on whatever variable(s) you wish to review (you have the option to search all open files as the search utility is quite comprehensive). The search results list every instance and, what file they occur and on what line. Double clicking each search result opens that file and highlights the instance.
    4. You can also highlight a string of text e.g variable name, and press the Binoculars (search button) and it will paste the string into the Find What box. Additionally, you can double click a variable name and all instances in a file will highlight. You can also create your own visual formatting style for CFG files too.

    I personally don't have any issues with tracking down variables usage as I leave the Standards.cfg in its delivered state and have 7 different CFG files of my own (also seen in the above image) where I have variables organised and processed in a specific order which makes for an easy to manage system, however Notepad++  being such a good text editor, makes the job so much easier than trying to do the same task in Notepad.

Reply
  • Hi MaryB,

    Yes its possible to create a project where you could select either a debug file or multiple CFG files and basic perform string operations on their contents however, from what you have mentioned by looking to track down instances of the variables, I would suggest to you a far simpler and more powerful solution:

    1. Download Notepad++
    2. Drag all your CFG files into the window (and debug text file too if you so wish)
    3. Open the search function on whatever variable(s) you wish to review (you have the option to search all open files as the search utility is quite comprehensive). The search results list every instance and, what file they occur and on what line. Double clicking each search result opens that file and highlights the instance.
    4. You can also highlight a string of text e.g variable name, and press the Binoculars (search button) and it will paste the string into the Find What box. Additionally, you can double click a variable name and all instances in a file will highlight. You can also create your own visual formatting style for CFG files too.

    I personally don't have any issues with tracking down variables usage as I leave the Standards.cfg in its delivered state and have 7 different CFG files of my own (also seen in the above image) where I have variables organised and processed in a specific order which makes for an easy to manage system, however Notepad++  being such a good text editor, makes the job so much easier than trying to do the same task in Notepad.

Children
No Data