Right-click the port Range of instance
Counter_1, and select Map To New Port. A
new structured port is created.

Select Expand Port
in the contextual menu of Range.
Note: This command expands the type of the port.
The elements of the structure appear in the Block Editor
enabling you to map each component.

The ports Range and Counter_1_Range
are expanded. Note that the mapping
is not done at root level but at element
level.
Click
(or select Expand Port
in the contextual menu). The port Counter_1_Range
is expanded.

Click
(or select Collapse Port
in the contextual menu) for each port. The components
of the structure are hidden.
Select Shrink Port
in
the contextual menu of Range. The ports are now mapped
at the root of the structure.

Note: If a port is mapped to the same structured
port, you are recommended to connect the ports at the
root level. If an element of the structure is added
or removed, the change will be automatically managed
by the typing mechanism. If the elements of the structure
are mapped one by one, you must manually manage modifications
to the structure.
Repeat step 2 to expand the ports
again.
Delete the mapping between the elements
of the structure.

Select one of the ports and select
Add Mapping
.
The elements of the structure are mapped.

Note: The inference mechanism re-computes
the type and direction of the port Counter_1_Range.
The direction of the element Max is undefined and its
type is 'any.
Right-click one of the ports and select
Shrink.
A warning
message appears.

Note:
As the mapping between the ports
Range and Counter_1_Range is partial, the mapping cannot
be done at root level (as seen in step 5). So in this
case, the mapping is disconnected. This deletion breaks
the inference mechanism (type and direction) between
the two ports. The type of Counter_1_Range is set to
'any (that is, the elements of the structure are deleted)
and the direction is undefined.
Click Yes to continue.

Delete the remaining connections.
Note: If the option Remove links
when an object is removed (see
Block Editor in the Customizing section) is checked,
the remaining connection is automatically deleted.