man2007
Aerospace
- Nov 6, 2007
- 283
I had posted this question in another thread,
but thought of posting it separately.
I have created a dialog (using UI Styler), called Dialog1.dlg and in the Dialog1_Apply_cb function I am adding a point contructor function (to get the point location from the user). For that I am using any one of the following commands
1)UF_UI_point_construct ("Enter point",&base_method,&point_tag,base_pt,&response);
or
2)uc1615 ("Enter location", base_pt );
or
3)uc1616 ("Enter location",&ia2,ip3,base_pt);
and the variables are declared as follows :
UF_STYLER_item_value_type_t data;
UF_UI_POINT_base_method_t base_method;
tag_t point_tag;
int orient1=0,response,ia2,ip3=0;
static double base_pt[3];
When I call .dll file, the above mentioned functions are not popping up the dialog boxes.
I checked the returned vales from uc1615 and uc1616, both returned 8. The value 8 means "Disallowed state, unable to bring up dialog"
The function UF_UI_point_construct returned the value 119001
What might be wrong?
Note that the above 3 functions worked fine in other files but not in the callback function that I have created.
For example, the following code works fine :
extern void ufusr (char *param, int *retcode, int rlen){
UF_UI_POINT_base_method_t base_method=UF_UI_POINT_CURSOR_POS;
tag_t point_tag;
int orient1=0,response;
static double origin1[3];
UF_initialize();
UF_UI_point_construct ("Enter point",&base_method,&point_tag,origin1,&response);
UF_terminate();
}
but thought of posting it separately.
I have created a dialog (using UI Styler), called Dialog1.dlg and in the Dialog1_Apply_cb function I am adding a point contructor function (to get the point location from the user). For that I am using any one of the following commands
1)UF_UI_point_construct ("Enter point",&base_method,&point_tag,base_pt,&response);
or
2)uc1615 ("Enter location", base_pt );
or
3)uc1616 ("Enter location",&ia2,ip3,base_pt);
and the variables are declared as follows :
UF_STYLER_item_value_type_t data;
UF_UI_POINT_base_method_t base_method;
tag_t point_tag;
int orient1=0,response,ia2,ip3=0;
static double base_pt[3];
When I call .dll file, the above mentioned functions are not popping up the dialog boxes.
I checked the returned vales from uc1615 and uc1616, both returned 8. The value 8 means "Disallowed state, unable to bring up dialog"
The function UF_UI_point_construct returned the value 119001
What might be wrong?
Note that the above 3 functions worked fine in other files but not in the callback function that I have created.
For example, the following code works fine :
extern void ufusr (char *param, int *retcode, int rlen){
UF_UI_POINT_base_method_t base_method=UF_UI_POINT_CURSOR_POS;
tag_t point_tag;
int orient1=0,response;
static double origin1[3];
UF_initialize();
UF_UI_point_construct ("Enter point",&base_method,&point_tag,origin1,&response);
UF_terminate();
}