-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a method to get the list of available template #137
Comments
it would be good to have as output the details shown in the template's window (type, application, drive etc.) |
The way Motor-CAD finds the template info is by searching the .mtt files in the templates folder. The files are plain text so just need to loop through and pull out: I think it would make sense to return this as a list of dictionaries e.g. Try to get all the same info as templates form if possible. |
@jgsdavies I may need a suggestion. I have now the templates in dictionary format. i added under geometry .py file. Check branch add_template_list. |
Hi @ravi-ansys, not sure this is the best way to do this since it won't update if the Motor-CAD templates change. My suggestion is: |
@jgsdavies thanks for the tip. I wasn't aware about the command to get the installation director. |
@ravi-ansys Try writing this as a script first and then we can think about where it can live. The issue with rpc_methods_geometry.py (or any of the methods files) is that we don't have access to the other functions, e.g. get_variable |
If it's possible it would be nice to have a method to get the list of all available templates and all their details.
Thanks!
The text was updated successfully, but these errors were encountered: