马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我用UG API画了一个长方体,然后想把它的参数提取出来,写入信息窗口,怎么不行呀,请高手指点!下边是我的代码:
int CHANGE_cjtq_act_cb ( int dialog_id,
void * client_data,
UF_STYLER_item_value_type_p_t callback_data)
{
/* Make sure User Function is available. */
if ( UF_initialize() != 0)
return ( UF_UI_CB_CONTINUE_DIALOG );
//int error=UF_initialize();
/* ---- Enter your callback code here ----- */
{
char *blocklen[3]={"1","2","3"};
double blockorig[3]={0,0,0};
char * size[3];
tag_t blkobj;
tag_t blkobj1;
int i;
UF_MODL_create_block1( UF_NULLSIGN,blockorig,blocklen,[$blkobj)]
UF_MODL_ask_block_parms(blkobj,1,size);
UF_UI_open_listing_window();
for(i=0;i<3;i++)
{
UF_UI_write_listing_window(size);
UF_UI_write_listing_window("\n");
}
}
UF_terminate ();
/* Callback acknowledged, do not terminate dialog */
return (UF_UI_CB_CONTINUE_DIALOG);
/* or Callback acknowledged, terminate dialog. */
/* return ( UF_UI_CB_EXIT_DIALOG ); */
} |