Skip to content

Commit

Permalink
Deploy documentation of 'main' to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mprinkezs committed Dec 19, 2024
1 parent 179e460 commit 0678713
Show file tree
Hide file tree
Showing 66 changed files with 140 additions and 68 deletions.
Binary file modified main/.doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file modified main/.doctrees/python_api/resource_api.doctree
Binary file not shown.
Binary file added main/_images/scripted_diagrams_relations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ You can use multiple scripted diagrams at the same time, which will be stacked v

The concept of scripted diagrams builds upon [scripted elements](../scripted_elements/scripted_elements_introduction.md) and [services](../using_services/using_services.md). [Tokens on scripted elements](../scripted_elements/tokens_on_scripted_elements.md) are used to convey data to the diagram service.

![Scripted diagrams relations](assets/scripted_diagrams_relations.png)

Each diagram service combines data from one or more scripted elements to create a single scripted diagram.

## Usage

### 1. Create or modify scripted elements to contribute data to a scripted diagram
Expand Down Expand Up @@ -52,6 +56,28 @@ See <a href="../using_services/using_services.html#service-definition">Using ser
* The service function name must be the same as set in the scripted elements' `"ude_diagram_service"` parameter.
```

#### Diagram service function description

The scripted diagram's service function implementation must adhere to the following interface description:

```{py:function} <function name>(view, element_data): str

Create an SVG diagram based on scripted elements' context data
:param dict view: ZEISS INSPECT 'Inspection Details' canvas properties
- 'width': (int) Canvas width in pixels
- 'height': (int) Canvas height in pixels
- 'dpi': (float) Canvas resolution in dpi
- 'font': (int) Default font size in pt
:param list[dict1, dict2, ..., dictN] element_data: List of dictionaries containing scripted element references and context data
- 'element': (object) Element reference
- 'data': (dict) Context data of the scripted element
- 'type': (str) Element type (always 'SVGDiagram')
:return: SVG diagram
:rtype: str
```

#### Template

The following script serves as a minimum template for a scripted diagram service:
```{code-block} python
:caption: Scripted diagram service template
Expand All @@ -69,15 +95,15 @@ def diagram_service_template(view, element_data)->str:
mpltools.setup_plot(plt, view)

for e in element_data:
# Read the the current element
# Read element reference
element = e['element']

# Read all parameters received from mapped scripted element
# Read scripted element's context data
data = e['data']

# Create your diagram
# Example:
# plt.plot ([element.name], [data['ude_diagram_radius']], 'bx')
plt.plot ([element.name], [data['ude_diagram_radius']], 'bx')

return mpltools.create_svg(plt, view)

Expand Down
2 changes: 1 addition & 1 deletion main/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ <h2 id="S">S</h2>
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f763c10>
<jinja2.runtime.BlockReference object at 0x7f9b926c3370>


</footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ <h3>How can I group scripts in the workspace toolbar?<a class="headerlink" href=
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7e33cd30>
<jinja2.runtime.BlockReference object at 0x7f9b9172cdc0>


</footer>
Expand Down
2 changes: 1 addition & 1 deletion main/howtos/app_documentation/app_documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ <h2>Converting Markdown files to PDF<a class="headerlink" href="#converting-mark
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7e33dde0>
<jinja2.runtime.BlockReference object at 0x7f9b9172e080>


</footer>
Expand Down
2 changes: 1 addition & 1 deletion main/howtos/app_documentation/assets/Releasenotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ <h2>Released at &lt;yyyy-mm-dd&gt; (v1.0.0)<a class="headerlink" href="#released
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7e30afb0>
<jinja2.runtime.BlockReference object at 0x7f9b9172d660>


</footer>
Expand Down
2 changes: 1 addition & 1 deletion main/howtos/app_file_format/app_file_format.html
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ <h4>Why is there a folder for every single element?<a class="headerlink" href="#
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7e33ff40>
<jinja2.runtime.BlockReference object at 0x7f9b91704ee0>


</footer>
Expand Down
2 changes: 1 addition & 1 deletion main/howtos/faq/faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ <h2>How do I use a C# / .NET library in an App?<a class="headerlink" href="#how-
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7e33d570>
<jinja2.runtime.BlockReference object at 0x7f9b91705a20>


</footer>
Expand Down
2 changes: 1 addition & 1 deletion main/howtos/localization/localization.html
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ <h3>Why is the App not displaying the translations after changing the applicatio
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7e53fc10>
<jinja2.runtime.BlockReference object at 0x7f9b9192c4c0>


</footer>
Expand Down
2 changes: 1 addition & 1 deletion main/howtos/project_keywords/project_keywords.html
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ <h2>Stage specific keywords<a class="headerlink" href="#stage-specific-keywords"
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7e53e9e0>
<jinja2.runtime.BlockReference object at 0x7f9b9192efe0>


</footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ <h3>Multi Layout Wizard<a class="headerlink" href="#multi-layout-wizard" title="
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f4745e0>
<jinja2.runtime.BlockReference object at 0x7f9b919e0d60>


</footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ <h2>See also<a class="headerlink" href="#see-also" title="Link to this heading">
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f474c10>
<jinja2.runtime.BlockReference object at 0x7f9b91e7ec80>


</footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ <h2>Exception handling<a class="headerlink" href="#exception-handling" title="Li
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7e8544c0>
<jinja2.runtime.BlockReference object at 0x7f9b9184a920>


</footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ <h2>Syntax<a class="headerlink" href="#syntax" title="Link to this heading"><
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7e53edd0>
<jinja2.runtime.BlockReference object at 0x7f9b920a78e0>


</footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2654,7 +2654,7 @@ <h3>Control widgets<a class="headerlink" href="#control-widgets" title="Link to
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f4ac370>
<jinja2.runtime.BlockReference object at 0x7f9b91b040a0>


</footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ <h2>See also<a class="headerlink" href="#see-also" title="Link to this heading">
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f061fc0>
<jinja2.runtime.BlockReference object at 0x7f9b92ad6560>


</footer>
Expand Down
2 changes: 1 addition & 1 deletion main/howtos/scripted_elements/scripted_actuals.html
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ <h2>Further reading<a class="headerlink" href="#further-reading" title="Link to
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f7625f0>
<jinja2.runtime.BlockReference object at 0x7f9b922a6710>


</footer>
Expand Down
2 changes: 1 addition & 1 deletion main/howtos/scripted_elements/scripted_checks.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ <h2>Types of scripted checks<a class="headerlink" href="#types-of-scripted-check
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f0b7520>
<jinja2.runtime.BlockReference object at 0x7f9b922a4a60>


</footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ <h2>Next steps<a class="headerlink" href="#next-steps" title="Link to this headi
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f08f970>
<jinja2.runtime.BlockReference object at 0x7f9b92db2a10>


</footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ <h2>Non-interactive modification<a class="headerlink" href="#non-interactive-mod
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f76f880>
<jinja2.runtime.BlockReference object at 0x7f9b929afb50>


</footer>
Expand Down
2 changes: 1 addition & 1 deletion main/howtos/scripted_elements/scripted_elements_toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ <h1>Scripted elements<a class="headerlink" href="#scripted-elements" title="Link
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f063130>
<jinja2.runtime.BlockReference object at 0x7f9b929af5b0>


</footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ <h3>Usage in user-defined checks<a class="headerlink" href="#usage-in-user-defin
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f0b4d90>
<jinja2.runtime.BlockReference object at 0x7f9b92148a30>


</footer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ <h3>Tesselate Geometrical Element<a class="headerlink" href="#tesselate-geometri
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f5b3580>
<jinja2.runtime.BlockReference object at 0x7f9b92173bb0>


</footer>
Expand Down
2 changes: 1 addition & 1 deletion main/howtos/scripting_solutions/scripting_solutions.html
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ <h2>Element filter<a class="headerlink" href="#element-filter" title="Link to th
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f08d480>
<jinja2.runtime.BlockReference object at 0x7f9b922a68f0>


</footer>
Expand Down
2 changes: 1 addition & 1 deletion main/howtos/stages/stages.html
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ <h2>Related<a class="headerlink" href="#related" title="Link to this heading">
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f81add0>
<jinja2.runtime.BlockReference object at 0x7f9b92087d00>


</footer>
Expand Down
2 changes: 1 addition & 1 deletion main/howtos/starting_options/starting_options.html
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ <h2>Executing a Python script from an App<a class="headerlink" href="#executing-
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f061e40>
<jinja2.runtime.BlockReference object at 0x7f9b92286800>


</footer>
Expand Down
2 changes: 1 addition & 1 deletion main/howtos/testing_apps/testing_apps.html
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ <h2>Running App tests with code coverage<a class="headerlink" href="#running-app
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f0b67d0>
<jinja2.runtime.BlockReference object at 0x7f9b91b83670>


</footer>
Expand Down
2 changes: 1 addition & 1 deletion main/howtos/using_app_editor/using_app_editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ <h3>Creating Apps in External Folders<a class="headerlink" href="#creating-apps-
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7efd8940>
<jinja2.runtime.BlockReference object at 0x7f9b91b81ff0>


</footer>
Expand Down
2 changes: 1 addition & 1 deletion main/howtos/using_gui_libraries/using_gui_libraries.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ <h3>Tkinter<a class="headerlink" href="#tkinter" title="Link to this heading">
<div class="footer">
<a href="https://www.gom.com/en/imprint" target="_blank" rel="noopener noreferrer">Imprint</a>
</div>
<jinja2.runtime.BlockReference object at 0x7fdd7f08cfd0>
<jinja2.runtime.BlockReference object at 0x7f9b92b143a0>


</footer>
Expand Down
Loading

0 comments on commit 0678713

Please sign in to comment.