What would the best approach be for grabbing images from Mechanical? #820
-
I'm trying to grab images from Mechanical for use in reports. Since I'm just getting started, I'm trying to figure out how to approach this. Namely, would I be better off starting Mechanical in Remote or Embedded mode? Also, is it possible to permit the user to interact with the instance of Mechanical that is currently being used by Python? I mean, ideally, I would like to be able to have Python access an instance of Mechanical that the user currently has open, but if that isn't possible, I would like to allow the user to interact with the model they are accessing with the tool I'm developing. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Hi @tlewis3348 , Both Remote and Embedded mode has export image options. It depends on various factors. Are you working with Mechanical locally? do you want to work with Mechanical GUI? I would suggest going over the examples section of pymechanical docs to see examples both types. With any mode, you can interact with mechanical instance from python. With Embedding you can directly export the image locally, but with Remote it has to be exported to Remote location and then download locally. |
Beta Was this translation helpful? Give feedback.
-
To add to the inputs already provided, this example might help: https://developer.ansys.com/blog/create-report-saved-mechanical-session-mechdb-or-mechdat |
Beta Was this translation helpful? Give feedback.
Hi @tlewis3348 , Both Remote and Embedded mode has export image options. It depends on various factors. Are you working with Mechanical locally? do you want to work with Mechanical GUI? I would suggest going over the examples section of pymechanical docs to see examples both types. With any mode, you can interact with mechanical instance from python. With Embedding you can directly export the image locally, but with Remote it has to be exported to Remote location and then download locally.
Remote method example
Embedding method example