I'm in the beginning stages of developing a tool to automate large portions of the report creation process. I've installed PyMechanical and am trying to figure out the best path forward. Since it doesn't require the duplication of the model file (if I'm understanding correctly), I'd like to use the embedded method (described here: link). The difficulty I'm having is figuring out the best means for the user to specify the mechanical model to use. I think the most straightforward for them would be to specify the WBPJ file and select the system from a list of options.
The example here (link) explains how to integrate PyMechanical into PyWorkbench, but it requires the use of the remote method, which doesn't seem like it would work very well with large models that the user hasn't archived, etc. It seems like if I knew the correct place(s) to look in the XML of the WBPJ file, I should be able to get a list of the systems in the file to offer to the user as a list to select from, but I'm struggling to decipher the XML file.
To be clear, I know the user can find the location of the MECHDB file from the Workbench UI, but I was hoping to make it simpler for them by allowing them to specify the WBPJ file and select from a list of options (making use of the system name and letter) for available MECHDB files.
My question therefore is, can you provide any guidance on how to navigate the XML of the WBPJ file to get a list of the systems in the file and the location of their corresponding MECHDB files?