@Sergio,
So it works when I have this code (I type manually "inner" in the text of the schematic.
model _002596_ed01
inner Vacmod.GlobalInfo globalInfo1 annotation(Placement(visible = true, transformation(origin = {-40, 27.009}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Vacmod.Components.Volume_ volume_1(V = 0.01) annotation(Placement(visible = true, transformation(origin = {0, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
Vacmod.Components.qvcst_ qvcst_1(qvstd = 0.05) annotation(Placement(visible = true, transformation(origin = {0, -25}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
connect(volume_1.a, qvcst_1.a) annotation(Line(visible = true, origin = {0, -2.5}, points = {{0, 12.5}, {0, -12.5}}, color = {0, 0, 255}));
annotation(Diagram(coordinateSystem(extent = {{-500, -90}, {500, 90}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5})), Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {10, 10}), graphics = {Rectangle(visible = true, lineColor = {0, 114, 195}, fillColor = {255, 255, 255}, extent = {{-100, -100}, {100, 100}}, radius = 25), Text(visible = true, textColor = {64, 64, 64}, extent = {{-150, 110}, {150, 150}}, textString = "%name")}));
end _002596_ed01;
But I must add it manually in the text of the schematic. I tried to add it in my component GlobalInfo, but it failed.
model GlobalInfo
Real T = 293.15 "Température (K)";
Real Air = 100 "en %";
Real H2 = 0 "en %";
Real He = 0 "en %";
Real Xe = 0 "en %";
Real M = 0.01 * (Air * 0.029 + H2 * 0.002 + He * 0.004 + Xe * 0.1313) "Masse en kg";
Real Visc = 0.01 * (1.71e-5 * Air + 8.4e-6 * H2 + 1.95e-5 * He + 2.12e-5 * Xe) "Viscosité (Pa.s)";
Real G = 0.01 * (1.4 * (Air + H2) + 1.66 * (He + Xe)) "Coefficient adiabatique";
Real R = 8.314;
annotation(Documentation(info = "<html>
<p> MUST BE placed on each schematic. Contains gas data and temperature </em> </p>
</html>", revisions = "<html>
<ul>
<li><em> 2020 </em>
by Yvan Abbe<br> initially implemented<br>
</li>
</ul>
</html>"), Icon(graphics = {Ellipse(fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}}, endAngle = 360), Text(origin = {18, -12}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-80, 60}, {42, -28}}, textString = "Gas")}, coordinateSystem(initialScale = 0.1)));
end GlobalInfo;
Thanks if you still have time to answer. I think after, I can manage by myslef.
Yvan