Opened 5 years ago

Closed 4 years ago

#5913 closed defect (duplicate)

Problems with conditional drawing of connecting lines between connectors

Reported by: Anton.Soppelsa@eurac.edu Owned by: Adrian Pop
Priority: normal Milestone: 1.18.0
Component: Interactive Environment Version: v1.14.1
Keywords: Cc:

Description

Dear all,

I spotted a potential problem/something I don't understand with the graphical display of lines connecting connectors in the block diagram view.

The following code is expected to connect an input connector to an output connector only when the parameter draw is true. Also, in the same conditions, it should draw the input connector and the connecting line.

The connector is drawn correctly, but the line is never drawn, even if draw = true. The strange thing is that if I replace visible = draw with visible = true the line becomes visible.

Sincerely,

Anton

within Didactic.Basics;
model TestConditionalConnectionDrawing

  Modelica.Blocks.Interfaces.RealInput u if draw
   annotation(
    Placement(visible = draw, transformation(origin = {-100, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {-100, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  
  Modelica.Blocks.Interfaces.RealOutput y
   annotation(
    Placement(visible = true, transformation(origin = {100, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {100, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  
  parameter Boolean draw = true;
  
equation
  connect(u, y)
   annotation(
    Line(visible = draw, points = {{-100, 0}, {94, 0}, {94, 0}, {100, 0}}, color = {0, 0, 127}));

annotation(
    uses(Modelica(version = "3.2.3")));
end TestConditionalConnectionDrawing;

Change History (4)

comment:1 by Adeel Asghar, 5 years ago

Component: OMEditInteractive Environment
Milestone: Future1.16.0
Owner: changed from Adeel Asghar to Adrian Pop
Status: newassigned

Conditional connector issue is duplicate of #2081.

The connection issue is also related. Because of a parameter in the annotation getNthConnectionAnnotation() returns error.

comment:2 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:3 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:4 by Adeel Asghar, 4 years ago

Resolution: duplicate
Status: assignedclosed

Is now referenced in the github issue #2081.

Note: See TracTickets for help on using tickets.