InitialStepWithSignal

block InitialStepWithSignal "Initial step (= step that is active when simulation starts). Connector 'active' is true when the step is active"
    extends Interfaces.PartialStep;

    Modelica.Blocks.Interfaces.BooleanOutput active annotation (Placement(transformation(
        origin = {0, -110},
        extent = {
            {-10, -10}, 
            {10, 10}},
        rotation = 270)));
initial equation
    active = true;
equation
    active = localActive;

    annotation (
        Diagram(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Rectangle(extent = {
                    {-100, 100}, 
                    {100, -100}}), 
                Rectangle(extent = {
                    {-80, 80}, 
                    {80, -80}})}),
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Text(
                    extent = {
                        {-200, 110}, 
                        {200, 150}},
                    textString = "%name",
                    lineColor = {0, 0, 255}), 
                Rectangle(
                    extent = {
                        {-100, 100}, 
                        {100, -100}},
                    fillColor = DynamicSelect({255, 255, 255}, if active then {0, 255, 0} else {255, 255, 255}),
                    fillPattern = FillPattern.Solid), 
                Text(
                    extent = {
                        {-92, -50}, 
                        {94, -68}},
                    textString = "active"), 
                Rectangle(extent = {
                    {-80, 80}, 
                    {80, -80}})}));
end InitialStepWithSignal;