The following issues should be considered when implementing a user input operation from the API add-on:
- For getting a point, a line, an arc or a polygon use the ACAPI_Interface function with the adequate function code APIIo_GetPointID, APIIo_GetLineID, APIIo_GetArcID and APIIo_GetPolyID. These input methods give back the appropriate coordinates of the user’s choice.
- For a more complex input action these methods can be combined (for example when getting a line the starting coordinate of the line can be defined from the result of a prior point input operation). It is strongly recommended to give a prompt string which appears in the control box and informs the user on what action should be taken.
- There is a possibility to let the cursor gravity reduce to a certain set of element neigs. For using neig filters during input see the APIIo_InitNeigFilterID interface function.
- You can override the cursor set appearing during the input. For different neig types (point, edge, cross-point, perpendicular point, osculation point) you can assign cursor shapes from the API_CursorFormID set by filling the API_CursorSet field in the appropriate input structure.
- For some reasons you may need to specify an input plane other than the base plane. In this case the cursor position will follow this plane and the returned coordinates will be set on the plane.
- You can draw rubber lines for enhancing the visual feedback during the user input. As the cursor is moving your RubberLineInfoProc is being called back, enabling you to draw custom lines (for example a preview can be shown of the result that the input would produce at the actual state).
For more information please study the ACAPI_Interface function group and the InterfaceFunctions example project.