Thanks Johan for your reply. I took a look at the guide. It seems to me that there is a default option that is not working for me !
Let me explain a little bit what I'm trying to do. I am trying to create a Hydraulics Package similar to the one found in Modelica 3.1.
I copied the types from the standard library.
I started with creating a Fluid Port :
connector FluidPort "Interface for quasi one-dimensional fluid flow in a piping network (incompressible or compressible, one or more phases, one or more substances)"
flow Hydraulics.Media.Interfaces.Types.MassFlowRate m_flow "Mass flow rate from the connection point into the component";
Hydraulics.Media.Interfaces.Types.AbsolutePressure p "Thermodynamic pressure in the connection point";
annotation(Icon(coordinateSystem(extent={{-100.0,-100.0},{100.0,100.0}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Ellipse(visible=true, fillColor={255,255,255}, lineThickness=2, extent={{-100.0,-100.0},{100.0,100.0}})}));
end FluidPort;
Then I created a FluidPorta and FluidPortb
connector FluidPort_a "Generic fluid connector at design inlet"
extends Hydraulics.Interfaces.FluidPort;
annotation(Diagram(coordinateSystem(extent={{-100.0,-100.0},{100.0,100.0}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Ellipse(visible=true, fillColor={0,0,255}, fillPattern=FillPattern.Solid, extent={{-40.0,-40.0},{40.0,40.0}}),Text(visible=true, lineColor={0,127,0}, extent={{-160.0,50.0},{40.0,110.0}}, textString="%name", fontName="Arial")}), Icon(coordinateSystem(extent={{-100.0,-100.0},{100.0,100.0}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Ellipse(visible=true, fillColor={0,0,255}, fillPattern=FillPattern.Solid, extent={{-100.0,-100.0},{100.0,100.0}})}));
end FluidPort_a;
Then an Interface:
partial model PartialTwoPort
FluidPort_a port_a;
FluidPort_b port_b;
annotation(Icon(coordinateSystem(extent={{-100.0,-100.0},{100.0,100.0}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Ellipse(visible=true, origin={-100.0,0.0}, fillColor={0,0,255}, fillPattern=FillPattern.Solid, extent={{-10.0,-10.0},{10.0,10.0}}),Ellipse(visible=true, origin={100.0,0.0}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, extent={{-10.0,-10.0},{10.0,10.0}})}), Diagram(coordinateSystem(extent={{-100.0,-100.0},{100.0,100.0}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Ellipse(visible=true, origin={-100.0,0.0}, fillColor={0,0,255}, fillPattern=FillPattern.Solid, extent={{-10.0,-10.0},{10.0,10.0}}),Ellipse(visible=true, origin={100.0,0.0}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, extent={{-10.0,-10.0},{10.0,10.0}}),Polygon(visible=true, lineColor={128,128,128}, fillColor={128,128,128}, fillPattern=FillPattern.Solid, points={{50.0,-90.0},{20.0,-80.0},{20.0,-100.0},{50.0,-90.0}}),Line(visible=true, points={{-60.0,-90.0},{20.0,-90.0}})}));
end PartialTwoPort;
At this stage, the "Connection Line Tool" should detect the ports, in other words, the cursor should change to thick plus sign when I click on the port. But this doesn't happen ! The guide didn't mention anything about it, so I assume it should automatically detect the port.
I am still trying to create a component. I am not trying to create a custom component from other components so I can use "Create Connection".
Correct me please if I'm missing something ?