The user-input methods provide a certain amount of inherent error trapping in that they require the user to enter a certain type of data. If the user tries to enter some other data, AutoCAD rejects the input and re-prompts the user. Using the PromptXXXOption objects with the appropriate GetXXX or SelectXXX methods provide additional control of the user input but can also introduce additional conditions that must be verified before execution continues. For examples of checking the status of input provided by a user, see Prompt for User Input.
用户输入方法提供了相当数量的固有错误捕获,要求用户输入特定类型的数据。如果用户尝试输入某些其他数据,AutoCAD 会拒绝输入并再次提示用户。对合适的GetXXX 或 SelectXXX 方法用户使用PromptXXXOption 对象可以提供额外的用户输入控制,但是也会引入更多需要通过错误捕获来验证的情况。关于需要某种用户输入的错误捕获的样例,请参见提示用户输入。