How to manipulate the X1,Y1,X2,Y2 of the Segment using C#?

Hi,

Does anyone knows how to manipulate the X1,Y1,X2,Y2 of the segment as shown below using C# because I want to extend the line, Given that it has a constraint of "sgSKETCHOFFSET", is it possible in API? because in manual it is possible to adjust eventhough it has a offset constraint. Any suggestion or ideas will be appreciate, Thanks in Advance

SolidworksApi macros