Opened 5 years ago
Closed 2 years ago
#6111 closed defect (fixed)
Support for "visible" attribute missing in graphical annotation rendering of OMEdit
| Reported by: | Dietmar Winkler | Owned by: | Adrian Pop |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.21.0 |
| Component: | OMEdit | Version: | v1.16.0-dev |
| Keywords: | Cc: |
Description
Currently the presents of visible attributes in an a graphical annotation causes OMEdit to not render that part of the graphical annotation. This kind of limits the possibility to generate semi/dynamic icons.
Change History (12)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Here a minimal example. If OMEdit would treat visbile as default as true that both rectangles should be visible Bu they are not:
model IconVisible
parameter Boolean show=true;
equation
annotation(
Icon(graphics = {
Rectangle(origin = {-40, 0}, extent = {{-20, 20}, {20, -20}}),
Rectangle(visible=show,origin = {40, 0}, fillPattern = FillPattern.Solid, extent = {{-20, 20}, {20, -20}})}));
end IconVisible;
comment:3 by , 5 years ago
| Component: | OMEdit → NF API |
|---|---|
| Owner: | changed from to |
| Status: | new → accepted |
This helps, thanks!
comment:4 by , 5 years ago
| Component: | NF API → OMEdit |
|---|
A bit more elaborate test where the tool should actually display always one of the two but the described behaviour of OMEdit would always display both.
model IconVisible
parameter Boolean show=true;
annotation(
Icon(graphics = {
Rectangle(visble=not show, origin = {-40, 0}, extent = {{-20, 20}, {20, -20}}),
Rectangle(visible=show,origin = {40, 0}, fillPattern = FillPattern.Solid, extent = {{-20, 20}, {20, -20}})}));
end IconVisible;
comment:5 by , 5 years ago
| Milestone: | Future → 1.17.0 |
|---|---|
| Priority: | high → blocker |
comment:8 by , 5 years ago
This feature is very necessary for us at Bosch Rexroth.
We are developeing our libraries of our real products as templates and combine them with parameter files to generate digital twins of our real product portfilio. Therefor one one templates covers alot of variants, which might have different icons. Currently (1.17.0-dev.beta3) all parts with visible attributes are not displayed at all.
So our use case is to change the icon depended of the chosen parameter set (parameter as condition for icon).
comment:9 by , 5 years ago
comment:12 by , 2 years ago
| Milestone: | 1.19.0 → 1.21.0 |
|---|---|
| Resolution: | → fixed |
| Status: | accepted → closed |
Fixed with instance api.

We really need an example as we do handle
visibleif present.Then we basically ignore it and have consider it as
true.