Opened 4 years ago

Closed 15 months 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 Adrian Pop, 4 years ago

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

comment:2 by Dietmar Winkler, 4 years ago

Here a minimal example. If OMEdit would treat visbile as default as true then 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;
Version 1, edited 4 years ago by Dietmar Winkler (previous) (next) (diff)

comment:3 by Adrian Pop, 4 years ago

Component: OMEditNF API
Owner: changed from Adeel Asghar to Adrian Pop
Status: newaccepted

This helps, thanks!

comment:4 by Dietmar Winkler, 4 years ago

Component: NF APIOMEdit

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;
Last edited 4 years ago by Dietmar Winkler (previous) (diff)

comment:5 by Francesco Casella, 4 years ago

Milestone: Future1.17.0
Priority: highblocker

comment:6 by Francesco Casella, 4 years ago

See also #6250

comment:7 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Rescheduled to 1.18.0

comment:8 by sven.baetzing@…, 4 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 Francesco Casella, 4 years ago

@adrpo, it's now time to tackle this issue together with #2081 and #2661. What do you think?

comment:10 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

comment:11 by Francesco Casella, 3 years ago

Milestone: 1.19.0

1.18.0 blocker tickets moved to 1.19.0

comment:12 by Adeel Asghar, 15 months ago

Milestone: 1.19.01.21.0
Resolution: fixed
Status: acceptedclosed

Fixed with instance api.

Note: See TracTickets for help on using tickets.