I prefer python for this kind of search algorithm.
For example I have a check that nags the user to use one of the templates from our company shared database if he opened a model that is using a template with an existing name from a different database (most likely a redundand plublished clone)
If the name has a "hardcoded" dependency on the macro name, then it's easy to build the string with command language.
I'm using this in my plugin selftest. A macro loops over all macros in the plugin-library and checks for test-scipts named <plugin base-path>/selftest/<macro_name>.cmd - if the file exists it's being read and performing the test for that macro.
I prefer python for this kind of search algorithm.
For example I have a check that nags the user to use one of the templates from our company shared database if he opened a model that is using a template with an existing name from a different database (most likely a redundand plublished clone)
If the name has a "hardcoded" dependency on the macro name, then it's easy to build the string with command language.
I'm using this in my plugin selftest. A macro loops over all macros in the plugin-library and checks for test-scipts named <plugin base-path>/selftest/<macro_name>.cmd - if the file exists it's being read and performing the test for that macro.