iCAx开思工具箱

标题: UF_DRAW_import_view [打印本页]

作者: sayit    时间: 2010-3-26 12:41
标题: UF_DRAW_import_view


请教高手:

如何实现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;
}

作者: qindongjun88    时间: 2010-3-26 23:03
好象是要更改一下视图的可见性也能达到你想要的效果吧!!!!




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3