It isn’t enough to set a boundary; we also need to respect our boundaries. It is not the hurt relative’s job to respect our boundaries. It is not even necessary for the family member to know our boundaries. We respect our boundaries by making good on the ones we set.
If you have a family member that you are so close to that you get hurt, you may want to consider setting and keeping a boundary with him or her. It may take some practice to find the balance between love and protection.