Skip to content

Commit

Permalink
Update compatibility information and connection FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
crnh committed Jan 19, 2024
1 parent dc8d409 commit b2e2b88
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions docs/compatibility_table.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
| OpticStudio | Python 3.9 | Python 3.10 | Python 3.11 |
|-------------|:-----------:|:-----------:|:-----------:|
| 24.1.0 | [][24.1.0] | [][24.1.0] | [][24.1.0] |
| 23.2.1 | [][23.2.1] | [][23.2.1] | [][23.2.1] |
| 23.1.0 | [][23.1.0] | [][23.1.0] | [][23.1.0] |
| 20.3.2 | [][20.3.2] | [][20.3.2] | [][20.3.2] |
| OpticStudio | Python 3.9 | Python 3.10 | Python 3.11 | Python 3.12 |
|-------------|:-----------:|:-----------:|:-----------:|:-----------:|
| 24.1.0 | [][24.1.0] | [][24.1.0] | [][24.1.0] | [][24.1.0] |
| 23.2.1 | [][23.2.1] | [][23.2.1] | [][23.2.1] | |
| 23.1.0 | [][23.1.0] | [][23.1.0] | [][23.1.0] | |
| 20.3.2 | [][20.3.2] | [][20.3.2] | [][20.3.2] | [][20.3.2] |

:::{dropdown} Table legend
✔: This version works without problems.
Expand Down
18 changes: 9 additions & 9 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
(faq/disconnect)=
## How do I disconnect from OpticStudio?

You can disconnect from OpticStudio using `zos.Application.CloseApplication`:
You can disconnect from OpticStudio using `zos.disconnect`:

{emphasize-lines="8,9"}
```python
import zospy as zp

zos = zp.ZOS()
oss = zos.connect_as_extension()
oss = zos.connect("extension")

# Do work ...

# Disconnect
zos.Application.CloseApplication()
zos.disconnect()
```

If you connect in extension mode, this will close the connection, but keep OpticStudio open.
Expand All @@ -36,17 +36,17 @@ For example, this will not work:
import zospy as zp

zos = zp.ZOS()
oss = zos.connect_as_extension()
oss = zos.connect("extension")

# Do work ...

# Disconnect
zos.Application.CloseApplication()
zos.disconnect()

# Try to create a second connection to the ZOS-API
zos = zp.ZOS() # ValueError: Cannot have more than one active ZOS instance

oss = zos.connect_as_extension()
oss = zos.connect("extension")
```

But this does work:
Expand All @@ -56,15 +56,15 @@ But this does work:
import zospy as zp

zos = zp.ZOS()
oss = zos.connect_as_extension()
oss = zos.connect("extension")

# Do work ...

# Disconnect
zos.Application.CloseApplication()
zos.disconnect()

# Create a new connection
oss = zos.connect_as_extension()
oss = zos.connect("extension")
```

(faq/single-zos-instance)=
Expand Down

0 comments on commit b2e2b88

Please sign in to comment.