Create a family parallel to a line

Im trying to create a fance using dynamo on my project, on the topography’s perimeter. Im using dynamo to select my topography, then i place my familys in those lines. Placing the posts is easy, but when I try to place my concrete blocks, I cant make then be parallel to the perimeter. The family does not rotate. I already try to make my family work-plane based, but that didnt work, cause i cant create my reference planes, the always creat in a wrong direction, gona post some pictures about that. I just dont know another way to solve this, anyone have any ideia?