def METHOD_NAME(self, obj):
    """Run when the object is created or recomputed."""
    if hasattr(obj, "Length"):
        obj.Length = obj.Shape.Length
    if hasattr(obj, "Start"):
        obj.Start = obj.Shape.Vertexes[0].Point
    if hasattr(obj, "End"):
        obj.End = obj.Shape.Vertexes[-1].Point