You have to take a bus ride to get from St. Andre's Square to The Scottish National Portrait.
From St. Andre's Square, it is only a short walk north to Queen Street, where you will find the Scottish National Portrait Gallery on the corner.