5
5
IDAES UI allows you to preview your flowsheet diagram at any time while working on it by calling ` export_flowsheet_diagram ` .
6
6
7
7
### Usage:
8
- The export_flowsheet_diagram function is used to return the current stage of the flowsheet diagram at any time after you have initialized your model.
8
+ The export_flowsheet_diagram function is used to return the current view of the flowsheet diagram at any time after you have initialized your model.
9
9
* It can save the diagram to your preferred path or the default path.
10
- * It can display the current stage of the flowsheet diagram in a Jupyter Notebook.
10
+ * It can display the current view of the flowsheet diagram in a Jupyter Notebook.
11
11
12
12
### Parameters:
13
13
` export_flowsheet_diagram ` takes three parameters:
@@ -16,18 +16,20 @@ The export_flowsheet_diagram function is used to return the current stage of the
16
16
* ` display ` : Boolean, to determent if you want to review current flowsheet in jupyter notebook
17
17
18
18
#### Let's go over it step by step.
19
- 1 . Import ` export_flowsheet_diagram ` function from ` idaes_ui package `
19
+ 1 . Import ` export_flowsheet_diagram ` function from ` idaes_ui ` package
20
20
``` python
21
21
from idaes_ui.fv.fsvis import export_flowsheet_diagram
22
22
```
23
+ 2 . Create your model. Here we assume the model is called `m` and
24
+ the top- level flowsheet that you want to view is `m.fs` .
23
25
24
- 2 . After initializing your model, you should have `m.fs` .
26
+ 3 . After initializing your model, you should have `m.fs` .
25
27
Then, you can call `export_flowsheet_diagram` .
26
28
```python
27
29
export_flowsheet_diagram(m.fs, ' ~/Download/my_flowsheet_diagram.svg' , display = True )
28
30
```
29
31
30
- 3 . Then, you can see the flowsheet diagram' s saved path in the log.
32
+ 4 . Then, you can see the flowsheet diagram' s saved path in the log.
31
33
32
34
# ## View flowsheet diagram
33
35
1 . To view the image, after calling `export_flowsheet_diagram` , you can visit the path shown in the log.
0 commit comments