Lines to Area BoundaryLines

Hi,

Found a similar forum to what i want to do but i cant get it right. Where am i going wrong to turn detail lines or model lines into area boundary lines that i can add a calculated area to in an area plan. At the moment it just turns the lines into the line style of an area boundary. Not revits proper area boundarys. Think i have the parameter name of an area boundary wrong. Below is the script along with the properties to my area boundary lines