Description:
Requests the user to select a line on the currently selected page. Returns 1 for success and 0 for canceled. X, Y ,X2 and Y2 are variables that will receive the resulting line. All parameters are optional. Resulting line can also be accessed by using the ResultPointX, ResultPointY, ResultPointX2, ResultPointY2 functions.
Notes:
Example creates a segmented line at the GetLine location. Copy and paste Script into a new PlanSwift script.
Pascal Example:
ATab := CurrentTab;
X1 := 0;
Y1 := 0;
X2 := 0;
Y2 := 0;
GetLine(X1,Y1,X2,Y2,'Draw Line');
NewSegment := NewItem(ATab);
SetDigitizerType(NewSegment,'Segment');
SetItemProperty(NewSegment,'Name','Test Segment');
NewSection := AddSection(NewSegment);
AddPoint(NewSegment,X1,Y1,NewSection);
AddPoint(NewSegment,X2,Y2,NewSection);
Visual Basic Example:
ATab = CurrentTab;
X1 = 0
Y1 = 0
X2 = 0
Y2 = 0
GetLine(X1,Y1,X2,Y2,"Draw Line")
NewSegment = NewItem(ATab)
SetDigitizerType(NewSegment,"Segment")
SetItemProperty(NewSegment,"Name","Test Segment")
NewSection = AddSection(NewSegment)
AddPoint(NewSegment,X1,Y1,NewSection)
AddPoint(NewSegment,X2,Y2,NewSection)
Enterprise and Developer editions