- Index
- » Users
- » mblouin2
- » Profile
Posts
Posts
Thank you adeas! Your implication will be of great help.
I would like to clarify my intentions for bug #2. First of all, I am using Dymola. At least in Dymola, the Dialog() annotation is accepted to generate drop-downs, checkboxes and others to choose values for parameters, within a class.
Moreover, I would like to add personalized annotations, to store additional data. For example, I would like to be able to write the following annotation:
parameter Real testReal annotation(Placement(transformation(.....)), my_custom_annotation(data(x=1, y=2)))
I would expect something like the following to work:
updateComponent(testReal, Real, test, annotate=(Placement(transformation=transformation(extent = {{1,2},{3,4}}))), my_custom_annotation(data=data(x=1, y=2)))
But updateComponent doesn't seem to accept multiple annotations, even if it returns true...
Again, thanks a lot for your help and time!
Hi developers!
I am currently using OMC, controlled with OMShell, to manage modelica files. I have encountered an issue regarding annotations updating. I have a few questions/issues, and I am very open to suggestions and help!
Here is some sample code that I am trying to modify:
package test
parameter Real testReal "This is a real parameter";
end test;
Bug 1- First of all, to change/add annotations, I am using the function "updateComponent()", in OMShell.
>>> updateComponent(testReal, Real, test, annotate=Placement(transformation(extent = {{1,2},{3,4}})))
true
Now that works. However, the annotation takes a very weird format:
Expected: parameter Real testReal "This is a real parameter" annotation(Placement(transformation(extent = {{1,2},{3,4}})));
Actual: parameter Real testReal "This is a real parameter" annotation(Placement = transformation(extent = {{1,2},{3,4}}));
Which is wrong!
Bug 2- When trying to add multiple annotations, the function returns true, but does nothing...
>>> updateComponent(testReal, Real, test, annotate=(Placement(transformation(extent = {{1,2},{3,4}}))),Dialog())
true
That works too (returns true). However, the function does nothing.
Expected: parameter Real testReal "This is a real parameter" annotation(Placement(transformation(extent = {{1,2},{3,4}})), Dialog());
Actual: parameter Real testReal "This is a real parameter";
My question(s):
-Can anybody think of any better way to change annotations for parameters?
-Am I using the "annotate=" argument in a wrong fashion?
- Index
- » Users
- » mblouin2
- » Profile