如题。在工程图里用鼠标在任意位置单击后即可生成一个点,这该如何实现,小弟试过用函数UF_UI_ask_sel_cursor_pos(),编译没问题,但调试后没反应,哪位用过此函数的高手指点下,小弟万分感谢。
这是部分代码:
extern "C" DllExport void ufusr( char *parm, int *returnCode, int rlen )
{
/* Initialize the API environment */
int errorCode = UF_initialize();
if ( 0 == errorCode )
{
/* TODO: Add your application code here */
int status=0;
double cur[3];
UF_UI_selection_p_t select;
tag_t view;
tag_t cur_tag, text_aid_tag;
UF_DRF_object_t object;
status = UF_initialize();
if (!status)
{
status=UF_UI_ask_sel_cursor_pos(select, &view, cur);
}
if (!status)
{
/* initialize the object structures */
UF_DRF_init_object_structure(&object);
/* create a base point */
status = UF_CURVE_create_point(cur, &cur_tag);
}