Slide2Interpreter#

class Slide2Interpreter(port=60075)#

Bases: object

logger = <Logger Rocscience.Slide2.Slide2Interpret (WARNING)>#
openFile(fileName: str) → InterpretModel#

Examples: Code Snippet: Interpret Scripting Functionality

classmethod startApplication(port: int, overridePathToExecutable: str = None, timeout: float = 30) → None#

Starts Slide2, with the option to override the default executable path.

Parameters:
  • port – int The port number to bind the server to. Must be a port number between 49152 and 65535.

  • overridePathToExecutable – str, optional An optional path to override the default Slide2 executable. If not provided, the latest installation of Slide2 will be used.

  • timeout – float, optional The maximum time to wait for the server to start and bind to the specified port, by default 30 seconds.

Returns:

None

Note

The logger is configured under the Rocscience.Slide2 namespace.

Examples: Code Snippet: Interpret Scripting Functionality

closeApplication(timeout=30) → None#

Closes the application.

Parameters:

timeout – float, optional The maximum time to wait for the application to close and release the port, by default 30 seconds.

Returns:

None

Raises:

TimeoutError – The application did not close within the given timeout time.

Examples: Code Snippet: Interpret Scripting Functionality