function disconnectBlock(sliceXfrmr, bh)
% Disconnect a block from its context

%   Copyright 2013 The MathWorks, Inc.

    portHandles = get(bh, 'PortHandles');
    for i=1:length(portHandles.Inport)
        sliceXfrmr.deletePortLine( portHandles.Inport(i));
    end
    for i=1:length(portHandles.Outport)
        sliceXfrmr.deletePortLine( portHandles.Outport(i));
    end
    for i=1:length(portHandles.LConn)
        sliceXfrmr.deletePortLine( portHandles.LConn(i));
    end
    for i=1:length(portHandles.RConn)
        sliceXfrmr.deletePortLine( portHandles.RConn(i));
    end
    
end
