Opened 11 years ago
Closed 11 years ago
#2465 closed defect (fixed)
Allow graphical connection to array of connectors in omedit
Reported by: | Owned by: | Adeel Asghar | |
---|---|---|---|
Priority: | high | Milestone: | 1.9.1 |
Component: | OMEdit | Version: | trunk |
Keywords: | translation | Cc: |
Description
I want to connect a realoutput to the first element in an array of realoutputs. This does not work because the connection triggers a translation, but off course, the translation fails cause I could not yet specify to which element in the array I wish to connect. I can make the connection textually, and the model checks fine. But then I have no graphical line between both connectors.
This issue is very similar to another bug I reported: it is extremely annoying that OMEdit checks/translates the model for every graphical connection I try to make. During WIP, the model is often not translatable.
Change History (6)
follow-up: 3 comment:1 by , 11 years ago
comment:2 by , 11 years ago
There are two conflicting issues here:
- OMEdit needs to find out information about the model to be able to do connections, etc.
- Model is a draft state (it might not even parse)
Truth is that in some cases we do instantiation (flattening) when we should not do that.
We should investigate the entire graphical API and see where we do instantiation and if it could be avoided.
follow-up: 4 comment:3 by , 11 years ago
I did not get that dialog window. Maybe it is indeed because the flattening happens before the dialog window has the chance to pop up?
comment:4 by , 11 years ago
Replying to roeldeconinck@…:
I did not get that dialog window. Maybe it is indeed because the flattening happens before the dialog window has the chance to pop up?
I need a sample model to test.
comment:5 by , 11 years ago
With this minimalistic model, I can't graphically connect u to y[1]:
model testarray
Modelica.Blocks.Interfaces.RealOutput[2] y annotation(Placement(visible = true, transformation(origin = {103.59,7.17949}, extent = {{-10,-10},{10,10}}, rotation = 0), iconTransformation(origin = {103.59,7.17949}, extent = {{-10,-10},{10,10}}, rotation = 0)));
Modelica.Blocks.Interfaces.RealInput u annotation(Placement(visible = true, transformation(origin = {-96.7521,4.10256}, extent = {{-10,-10},{10,10}}, rotation = 0), iconTransformation(origin = {-96.7521,4.10256}, extent = {{-10,-10},{10,10}}, rotation = 0)));
annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})));
end testarray;
comment:6 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks for the test model. It is now fixed in r18047.
Before the translation is triggered you should get a dialog window which asks you about the array index you want to connect to. If this is not happening then I need a sample model to test.
The translation is used to check the invalid connections but perhaps we can remove this then user is responsible to delete the invalid connections later on.