Timeout Error while trying to fetch the Active Discovery Session using Modeler(). How to find the right port for the active session of Discovery. #2093
-
Hi Team, modeler = Modeler(host = host_id, port = host_port ) But it seems to throw timeout error after 120seconds. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @Abhijith022! If you want to connect to an active Discovery session, it is necessary that Discovery is launched together with the "API Server" plugin. Once that's properly launched, you will see a new tab at the top of your Discovery GUI which says "API SERVER" and inside you will find information on the port. @b-matteo - is there any documentation on how to launch Discovery in standalone mode together with the API Server (without using PyAnsys Geometry)? |
Beta Was this translation helpful? Give feedback.
Hi @Abhijith022, @RobPasMue
so let's assume you want to start ApiServer in Discovery on localhost and port 50051.
To do so you have to use specific arguments to start Discovery.
If you installed the 2025.2 (earlier versions work as well back to 2023.2 version) Ansys products in the default folder:
*C:\Program Files\ANSYS Inc\v252*
in that case, the ApiServer binaries should be in
C:\Program Files\ANSYS Inc\v252\Addins\ApiServer
and Ansys Discovery installation folder in
C:\Program Files\ANSYS Inc\v252\Discovery
then to start Ansys Discovery with ApiServer you need this command:
"C:\Program Files\ANSYS Inc\v252\Discovery\Discovery.exe" /API_ADDRESS=127.0.0.1 /API_PORT=50051 --spaceclaim-op…