APIIo_​GetLineID

Performs a line input.

    GSErrCode ACAPI_Interface (
        APIIo_GetLineID,
        API_GetLineType*        lineInfo,
        RubberLineInfoProc*     rubberLineInfoProc
    );

 

Parameters

lineInfo
[in/out] Parameters of the line input operation.
rubberLineInfoProc
[in] Callback function for custom feedback drawing.

 

Return Values

NoError
The function has completed with success.
APIERR_BADPARS
lineInfo is nullptr
APIERR_BADPLANE
invalid plane definition in lineInfo
APIERR_BADWINDOW
the operation cannot be performed in the current front window of the application
APIERR_CANCEL
the input was canceled by the user

For other common API errors see the API Errors document.

 

Remarks

This function is used to let the user input a line graphically.

If the input process has failed, the function returns APIERR_CANCEL. Otherwise the result is returned in the pos and neig fields of lineInfo.

The start point of the line can be defined directly, or entered graphically with the APIIo_GetPointID interface function.

The prompt string displayed in the control box which can contain instructions about the action. You can control the cursor gravity above neigs and the cursor shapes, and set the input plane. There is a possibility of drawing own graphical feedback during the input with passing a pointer to your rubber line callback function. For more details on the utilization refer to the documentation of the API_GetLineType structure.

Do not invoke any input operation while there are modal dialogs open.

 

Example

See the examples of the APIIo_GetArcID and APIIo_DrawRubberLineID functions.

 

Requirements

Version: API 2.1 or later
Header: APIdefs_Interface.h

 

See Also

API_GetLineType,
RubberLineInfoProc, APIIo_DrawRubberLineID, APIIo_GetPointID, APIIo_GetArcID, APIIo_GetPolyID,
ACAPI_Interface, API Functions