Pymechanical update1#69
Conversation
|
Hi @klmcadams , please review . |
|
I think we should include the version of PyMechanical somewhere... and if it is already there, we should update it to the latest released version |
klmcadams
left a comment
There was a problem hiding this comment.
This looks good! I added comments with the version of ansys-mechanical-core required to use the code that was added to the cheatsheet. @RobPasMue is this what you were thinking, or were you talking about adding the latest version in the title instead?
| # Merge them into your Python global variables | ||
| globals().update(global_variables(app)) | ||
| # Optional argument for Enums without namespaces | ||
| globals().update(global_variables(app),True) |
There was a problem hiding this comment.
| globals().update(global_variables(app),True) | |
| # Available in ansys-mechanical-core >= v0.10.3 | |
| globals().update(global_variables(app),True) |
There was a problem hiding this comment.
This has been modified with latest way of updating globals
| globals().update(global_variables(app)) | ||
| # Optional argument for Enums without namespaces | ||
| globals().update(global_variables(app),True) | ||
| # Import Python modules shipped with Mechanical |
There was a problem hiding this comment.
| # Import Python modules shipped with Mechanical | |
| # Import Python modules shipped with Mechanical | |
| # Available in ansys-mechanical-core >= v0.10.3 |
| globals().update(global_variables(app),True) | ||
| # Import Python modules shipped with Mechanical | ||
| from ansys.mechanical.core.embedding import add_mechanical_python_libraries | ||
| add_mechanical_python_libraries(241) |
There was a problem hiding this comment.
Two comments -
-
I don't see where these libraries are used.
-
better to make the version number a variable so that the same number is guaranteed to be used by
add_mechanical_python_libraries()andapp = App()
Hi @RobPasMue @koubaa , Do you think we can minor version too on the header (like pyAEDT cheatsheet does. snapshot below)? |

fixed a typo.
added add_mechanical_python_libraries
added Enum argument on globals() and modified the example code accordingly