Spline bSplineHasBeenEdited

I have found in other [post ][1] that:

To allow editing of Splines created in c++ you need to do 2 things.

In SplineComponent.h change the line

UPROPERTY(VisibleAnywhere, Category = Spline)
bool bSplineHasBeenEdited;

to…

UPROPERTY(EditAnywhere, Category = Spline, meta = (DisplayName = "Override Construction Script"))
bool bSplineHasBeenEdited;

Once you have added the spline points in c++ you manually set the variable like
MySplineComp->bSplineHasBeenEdited = true;


I got this [link text][2] and after reading it I have write simple function which set bSplineHasBeenEdited

UFUNCTION(BlueprintCallable, Category = "SplineEdit")
		static void setSplineHasBeenEdited(USplineComponent *spline,bool val)
	{
		spline->bSplineHasBeenEdited = val;
	}
		UFUNCTION(BlueprintCallable, Category = "SplineEdit")
			static bool getSplineHasBeenEdited(USplineComponent *spline)
		{
			return spline->bSplineHasBeenEdited;
		}

But It doesn’t work.
All I want to achieve that i can programmatically add points to Spline and move them within editor, and add points in Editor normal as Spline works.