|
请教高手:
如何实现UG本身 部件视图的功能,用这个函数
导入多个部件时,在同一个视图上都会显示,但
UG本身导入部件视图时不会
static tag_t AddBaseView(CString partname,tag_t drawing_tag,tag_t view_tag,double reference_point[2])
{
int ifail = 0;
tag_t draw_view_tag = NULL_TAG;
if( !ifail && view_tag != NULL_TAG )
{
UF_DRAW_view_info_t view_info;
UF_DRAW_initialize_view_info (&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.clean_model_view = TRUE;
view_info.inherit_boundary = FALSE;
view_info.transfer_annotation = FALSE;
strcpy(view_info.model_name,(LPSTR)(LPCTSTR)partname);
// strcpy(view_info.arrangement_name,arrangement_name);
ifail = UF_DRAW_import_view(drawing_tag, view_tag,
reference_point, &view_info,&draw_view_tag);
}
return draw_view_tag;
}
|
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|