You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A typical user of the Workbench gRPC service starts a Workbench client that connects to
11
-
a running Workbench server on the cloud, given the server's name/IP and port.
10
+
To start a Workbench client that connects to a running Workbench server on cloud, provide the following details:
11
+
12
+
- Server name/IP
13
+
- Port number
14
+
- Client-side working directory. This directory is the default location for client-side files
12
15
13
16
.. code-block:: python
14
17
@@ -23,11 +26,12 @@ Other options to the ``connect_workbench`` API include specifying a working dire
23
26
Launch Workbench server and start a client
24
27
==========================================
25
28
26
-
During the development phase or for debugging purposes, it is useful to start the Workbench server on the developer's desktop or some computer within the company network.
29
+
During development phase or for debugging purpose, it is useful to start
30
+
Workbench server on your desktop or some computer within the company network.
27
31
28
-
One can always start a Workbench server by executing the command `StartServer()` in any running Workbench session and use the returned server port to start a client, like in the example above.
32
+
You can always start a Workbench server by executing the command `StartServer()` in any running Workbench session and use the returned server port to start a client, like in the example above.
29
33
30
-
Alternatively, one can launch a Workbench server and start a client programmatically in a client-side Python script. To launch a server on the local computer:
34
+
Alternatively, you can launch a Workbench server and start a client programmatically in a client-side Python script. To launch a server on a remote Windows machine with valid user credentials:
31
35
32
36
.. code-block:: python
33
37
@@ -61,10 +65,10 @@ Other options to the ``launch_workbench`` API include specifying a particular Wo
61
65
Run script/commands/queries on Workbench server
62
66
===============================================
63
67
64
-
IronPython based Workbench scripts containing commands/queries can be executed on the server via:
68
+
IronPython based Workbench scripts containing commands/queries can be executed on the server via
65
69
66
-
* `run_script_file`, which executes a script file in the client working directory; or
67
-
* `run_script_string`, which executes a script contained in the given string.
70
+
- ``run_script_file``, which executes a script file in the client working directory; or
71
+
- ``run_script_string``, which executes a script contained in the given string
68
72
69
73
Any output that needs to be returned from these APIs can be assigned to the global variable `wb_script_result` in the script as a JSON string. For example, the following Workbench script returns all message summaries from the Workbench session:
70
74
@@ -84,9 +88,9 @@ These run_script APIs can also be called with different logging levels. The defa
84
88
File handling
85
89
=============
86
90
87
-
Data files can be uploaded to the server or downloaded from the server, using `upload_file` or `download_file` API. The client-side working directory is used to hold these files unless absolute paths or target directories are specified. There is also a working directory on the server for the same purpose. The server's working directory can be obtained via the Workbench query `GetServerWorkingDirectory()` that runs on the server.
91
+
Data files can be uploaded to the server or downloaded from the server, using `upload_file` or `download_file` API. The client-side working directory is used to hold these files unless absolute paths or target directories are specified. There is also a working directory on the server for the same purpose. The server’s working directory can be obtained via the Workbench query GetServerWorkingDirectory() that runs on the server.
88
92
89
-
For example, this uploads all part files with a given prefix and all agdb files in the working directory, plus another file outside of the working directory, from client to server:
93
+
The following script uploads all part files with a given prefix and all AGDB files in the working directory, plus another file outside of the working directory, from client to server:
90
94
91
95
.. code-block:: python
92
96
@@ -133,7 +137,7 @@ There is a special client API to upload a data file from `the ANSYS example data
All the file handling APIs come with a progress bar that is shown by default. One can turn off the progress bar with an optional argument:
140
+
All the file handling APIs come with progress bar that is shown by default. You can turn off the progress bar with an optional argument:
137
141
138
142
.. code-block:: python
139
143
@@ -145,7 +149,7 @@ Start other PyANSYS services from systems in a PyWorkbench project
145
149
PyMechanical
146
150
------------
147
151
148
-
For any mechanical system in the Workbench project, the PyMechanical service can be started and connected to from the same client machine.
152
+
For any Mechanical system in the Workbench project, the PyMechanical service can be started and connected to from the same client machine.
149
153
The following runs a server-side script to create a mechanical system, then starts the PyMechanical service for the system and establishes a PyMechanical client.
0 commit comments