Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mprinkezs committed Oct 10, 2023
1 parent dc9afea commit e9d52b3
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 39 deletions.
52 changes: 24 additions & 28 deletions doc/howtos/python_api_introduction/script_dialogs_introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
-->

```{code-block} python
:caption: Example: Script with separate dialog file
:caption: Example: Script with separate dialog file
RESULT=gom.script.sys.execute_user_defined_dialog (file=':dialog.gdlg')
```
```{code-block} python
:caption: Example: Script with embedded dialog
:caption: Example: Script with embedded dialog
RESULT=gom.script.sys.execute_user_defined_dialog (dialog={
"content": [
Expand Down Expand Up @@ -292,21 +292,20 @@ Continuous text widget
| ![](assets/edit_text.png) | ![](assets/widget_text.png) |


[//]: # (* The keywords displayed in text field widgets can originate from different source:)

[//]: # ( * Global application keywords)

[//]: # ( * project related keywords)

[//]: # ( * local script variables.)

[//]: # (⚠️ Local script variables can be displayed in text fields by inserting them via the 'insert expression' dialog.)

[//]: # ( * Local script variables are invalid until the variable assignment is reached. They cannot be displayed statically in the text)

[//]: # (field editor prior to script execution, so an invalid value will most certainly be displayed instead.)

[//]: # (To Do: Check how to insert local variables)
%* The keywords displayed in text field widgets can originate from different source:
%
% * Global application keywords
%
% * project related keywords
%
% * local script variables.
%
%⚠️ Local script variables can be displayed in text fields by inserting them via the 'insert expression' dialog.
%
% * Local script variables are invalid until the variable assignment is reached. They cannot be displayed statically in the text
% field editor prior to script execution, so an invalid value will most certainly be displayed instead.
%
% To Do: Check how to insert local variables

| Property | Type | Example |
| ------------------- | ---- | ---------------------------------------------------------- |
Expand Down Expand Up @@ -667,9 +666,8 @@ userInput = RESULT.decimalWidget
| precision | double | <pre># Set precision to 2 decimals<br>DIALOG.input.precision = 2</pre> |
| unit | str | <pre># Set unit ID<br>DIALOG.input.unit = 'LENGTH'</pre> |

[//]: # ( No visible effect )

[//]: # ( background_style - str - Set style sheet based background color - red, green, blue )
% No visible effect:
% background_style - str - Set style sheet based background color - red, green, blue

#### Text entry field
![](assets/widget_text_entry.png)
Expand Down Expand Up @@ -721,9 +719,8 @@ print( RESULT.sliderWidget ) # some text
| step | double | <pre># Set step size to 15<br>DIALOG.input.step = 15</pre> |
| orientation | str | <pre>print(DIALOG.input.orientation)</pre>⚠️ read-only |

[//]: # ( ticks are not drawn )

[//]: # ( tick_interval - double - Interval of ticks drawn )
% ticks are not drawn:
% tick_interval - double - Interval of ticks drawn


#### Checkbox widget
Expand Down Expand Up @@ -770,9 +767,8 @@ File widget
| file_types | list | <pre># Show only specified file types; each list item must consist of \[\<filename_extension\>, \<description\>\]<br>DIALOG.inputFile.file_types = \[\['*.g3d', 'Mesh data'\], \['*.stp', 'CAD data'\]\]</pre> ⚠️ ``limited`` must be set to ``True`` in order to apply the filter! |
| limited | bool | <pre># Limit file selection to 'file_types'<br>DIALOG.inputFile.limited = True</pre> |

[//]: # (Clarify this)

[//]: # (selection_type - str - File selector type; any, directory, executable, file, multi_file )
% Clarify this:
% selection_type - str - File selector type; any, directory, executable, file, multi_file

#### Date widget

Expand Down Expand Up @@ -926,7 +922,7 @@ print("Chosen system plane:", RESULT.input_new.name)

The complete code of the example is attached to this document.

[//]: # (To Do: attach example)
% To Do: attach example

#### Selection list widget

Expand Down Expand Up @@ -1014,7 +1010,7 @@ Abort button widget

![](assets/built-in_progressbar.png)

[//]: # (To Do: Add enabled abort button. Check if the button still exists in ZEISS Inspect.)
% To Do: Add enabled abort button. Check if the button still exists in ZEISS Inspect.

#### Tolerances widget

Expand Down
4 changes: 2 additions & 2 deletions doc/python_api/scripted_elements_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ result = [ { 'points': [gom.Vec3D, gom.Vec3D, ...] } ]
```{code-block} python
result = {
'default': [
{'points': [gom.Vec3d, gom.Vec3d, …], 'normals': [gom.Vec3d, gom.Vec3d, ]},
{},
{'points': [gom.Vec3d, gom.Vec3d, …], 'normals': [gom.Vec3d, gom.Vec3d, ...]},
{...},
...
]
}
Expand Down
18 changes: 9 additions & 9 deletions doc/python_examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ The following project files are included:

## Examples by topic

| Folder | Description |
| ---------------------------------------- | ------------------------------------------------------------ |
| [data_interfaces](data_interfaces.rst) | Access to data of GOM "elements" |
| [dialog_widgets](dialog_widgets.rst) | Examples how use custom dialogs and handle user input events |
| [misc](misc.rst) | Miscellaneous examples |
| [script_icons](script_icons.rst) | Set icons for scripts or buttons |
| [script_resources](script_resources.rst) | How to access binary data of your add-on (resources) |
| [scripted_actuals](scripted_actuals.rst) | Building actual elements with custom python code |
| [scripted_checks](scripted_checks.rst) | Building custom checks with python code |
| Folder | Description |
| --------------------------------------- | ------------------------------------------------------------ |
| [data_interfaces](data_interfaces.md) | Access to data of GOM "elements" |
| [dialog_widgets](dialog_widgets.md) | Examples how use custom dialogs and handle user input events |
| [misc](misc.md) | Miscellaneous examples |
| [script_icons](script_icons.md) | Set icons for scripts or buttons |
| [script_resources](script_resources.md) | How to access binary data of your add-on (resources) |
| [scripted_actuals](scripted_actuals.md) | Building actual elements with custom python code |
| [scripted_checks](scripted_checks.md) | Building custom checks with python code |


0 comments on commit e9d52b3

Please sign in to comment.