hexagon logo

How to search for file with predefined characters in file name with macro?

Hello,
 
I want to do find a file in CDB with predefined characters in file name with macro.
 
There is no problem to search for files when their name is known and use them as an input for macro.
 
But is it possible to search in CDB table for a file were just part of the file name will be defined in macro?
 
Is it possible with ADAMS functions or do I have to use the python?
 
Thanks and best regards,
Ondrej
 
Best regards,
Ondrej
 
Parents
  • 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.
Reply
  • 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.
Children
No Data