下面是一段代码
同样的代码编译的DLL在2.0可以添加视图
但在5.0就不能实现
请高手帮忙啊
double reference_point[2] = {10.0, 12.0};
tag_t drawing_tag = NULL_TAG;
tag_t view_tag = NULL_TAG;
tag_t draw_view_tag_top = NULL_TAG;
tag_t draw_view_tag_front = NULL_TAG;
tag_t draw_view_tag_tfr = NULL_TAG;
char *view_name_top = "TOP";
char *view_name_front = "FRONT";
char *view_name_tfr = "TFR-ISO";
UF_DRAW_view_info_t view_info;
view_info.view_status = UF_DRAW_ACTIVE_VIEW;
view_info.anchor_point = NULL_TAG;
view_info.view_scale = 1.0;
view_info.use_ref_pt = FALSE;
view_info.inherit_boundary = TRUE;
UF_DRAW_ask_current_drawing( &drawing_tag );
if(drawing_tag == NULL_TAG )
{
uc1601("得不到当前图纸的TAG",1);
return (UF_UI_CB_EXIT_DIALOG);
}
UF_OBJ_cycle_by_name( view_name_top, &view_tag );
if(view_tag == NULL_TAG )
{
uc1601("得不到视图的TAG",1);
return (UF_UI_CB_EXIT_DIALOG);
}
UF_DRAW_import_view( drawing_tag, view_tag,reference_point, &view_info,&draw_view_tag_top ); |