Poster#

class ansys.mechanical.core.embedding.poster.Poster#

Class which can post a python callable function to Mechanical’s main thread.

Overview#

post

Post the callable to Mechanical’s main thread.

Import detail#

from ansys.mechanical.core.embedding.poster import Poster

Method detail#

Poster.post(callable: Callable)#

Post the callable to Mechanical’s main thread.

The main thread needs to be receiving posted messages in order for this to work from a background thread. Use the sleep routine from the utils module to make Mechanical available to receive messages.

Returns the result of callable if any.