why are locationCurve.Curve different from geometryElement line?it makes me so confused.
Dim pt = locationCruve. Curve.Evaluate(0, False)
It is wrong for me to regard this pt as the world coordinate of the starting point of the line,It shouldn't be like this.
Origin and direction relate to the equation of the unbound line.
Therefore I believe that when you drag the ends of an existing bound line without changing it's direction then the end parameters change not the origin. It is still on the same alignment you just change how the bound extents were defined from the origin.
If you want to get the end points of the line then use GetEndPoint
Could also use Evaluate(0, True) & Evaluate(1, True) i.e. the normalised parameter for bound curve. If the curve is unbound then evaluating the normalised parameter (or using GetEndPoint) will throw an exception.
There is no advantage of using say:
Evaluate(0, True) instead of GetEndPoint(0)
Likewise you can get the raw parameters of the bound curve via Curve.GetEndParameter, again if the curve is unbound then evaluating this will throw an exception.
Also location line may not match a geometry line from the family because they were generated with different origin and parameters meaning they are two alternate representations of the same line. Best to check the end points as noted above. You can also compare via Curve.Intersect(Curve) review SetComparisonResult.