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
Copy file name to clipboardExpand all lines: doc/source/contribute_examples.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,34 +3,35 @@ Contribute
3
3
4
4
## Contribute to PyWorkbench example repo
5
5
6
-
You can share your PyWorkbench project on [PyWorkbench Example repo](https://github.com/ansys-internal/pyworkbench-examples) with PyWorkbench community.
6
+
You can share your PyWorkbench projects on [PyWorkbench Example repo](https://github.com/ansys-internal/pyworkbench-examples) with the PyWorkbench community.
7
7
8
8
9
-
## Check out a clone of PyWorkbench Example repo:
9
+
## How to contribute to PyWorkbench example repo:
10
+
### Check out a clone of PyWorkbench Example repo:
Copy file name to clipboardExpand all lines: doc/source/user_guide.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,22 +22,22 @@ wb.connect()
22
22
### Launch Workbench server and start a client
23
23
During development phase or for debugging purpose, it is useful to start Workbench server on the developer's desktop or some computer within the company network.
24
24
25
-
One can certainly start a Workbench server by executing command `StartServer()` in any Workbench session and use the returned server port to start a client, like in the example above.
25
+
One can always start a Workbench server by executing command `StartServer()` in any running Workbench session and use the returned server port to start a client, like in the example above.
26
26
27
-
Alternatively, one can launch a Workbench server and start a client programmatically in Python script. To launch it on the local computer:
27
+
Alternatively, one can launch a Workbench server and start a client programmatically in client-side Python script. To launch a server on the local computer:
28
28
```
29
29
from ansys.workbench.core import launch_workbench
30
30
wb = launch_workbench()
31
31
```
32
-
or to launcher server on a remote Windows machine with valid credentials:
32
+
or to launcher a server on a remote Windows machine with valid user credentials:
There are other options to this API, such as specifying a certain Workbench release to launch, or to use specified working directories on server or at client side instead of the default directories.
40
+
There are other options to this `launch_workbench`API, such as specifying a certain Workbench release to launch, or to use particular working directories on the server and/or at the client instead of the default directories.
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. There is also a working directory on the server for the same purpose. The server's working directory can be obtained via Workbench query `GetServerWorkingDirectory()` that runs on server.
63
+
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 directory is specified. There is also a working directory on the server for the same purpose. The server's working directory can be obtained via Workbench query `GetServerWorkingDirectory()` that runs on the server.
64
64
65
65
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:
### Start other PyANSYS services based on PyWorkbench
106
+
### Start other PyANSYS services from systems in a PyWorkbench project
107
107
#### PyMechanical
108
108
For any mechanical system in the Workbench project, PyMechanical service can be started and connected to from the same client machine.
109
109
The following runs a server side script to create a mechanical system, then starts PyMechanical service for the system and establish a PyMechanical client.
@@ -112,11 +112,11 @@ from ansys.mechanical.core import launch_mechanical
0 commit comments