It was a difficult task for me, but it seems that I took it apart. Matlab R2007a is here. I will give an example with a subsystem already completed with its inputs, outputs, ...
1- In the properties of the block, add the tag to the block. This will be done to identify the block and its “siblings” among the system. MY_SUBSYSTEM for this example.
2- Block properties again. Add the following snippet to the CopyFcn callback:
%Find total amount of copies of the block in system len = length(find_system(gcs,'Tag','MY_SUBSYSTEM')); %Get handle of the block copied/added and name the desired signal accordingly v = get_param(gcb,'PortHandles'); set(v.Outport(_INDEX_OF_PORT_TO_BE_RENAMED_),'SignalNameFromLabel',['BASENAME_HERE' num2str(len)]);
3- In _INDEX_OF_PORT_TO_BE_RENAMED_ you should put the index of the port signal (starting from 1) that you want to rename for each copy of the block. For one output block, this should be 1. BASENAME_HERE should be the base name of the port, in this case "Current" for you.
4- Add the block to the desired library and delete the instance that you used to create this example. From there, when you add from a library or copy an existing block, Outport should indicate Current1, Current2, Current3, etc. Please note that you can apply any convention or formatting.
Hope this helps. This worked for me, feel free to ask / criticize!
Note Obviously, as the model grows, this method may be demanding on the computer, since find_system will have to scroll through the entire model, but it seems to be a good way to get around me in small-sized systems.