If you have some sample code that can help me with this process, can you please post it. I try to create a shape with multiple ports to the left and multiple ports to the right. I don't have any problem doing that as you can see. The problem I have if if the number of ports to the left and right are not equal. Users will need to specify the number of port to the right or left.
for instance if right = 4 and left = 4, no problem, but if right is 4 and left is 2, the 2 ports to the left are not spacing center (or even space) to the shape
see the picture for instance one of them is good, but in the next 2, the ports are not centered or align properly.
You may have already done something like that, so provide a sample code will be nice