|
楼主 |
发表于 2017-5-27 21:32:54
|
显示全部楼层
唐工:麻烦帮我看我的程序哪里出问题了,谢谢!
/* TODO: Add your application code here */
NXOpen::Session *theSession = NXOpen::Session::GetSession();
NXOpen::Part *workPart(theSession->Parts()->Work());
NXOpen::Part *displayPart(theSession->Parts()->Display());
char *message="选择面。";
char *title="调整倒圆大小";
int scope=UF_UI_SEL_SCOPE_WORK_PART;
int response;
tag_t object_tag;
double cursor[3]={0.0};
tag_t view=NULL_TAG;
UF_UI_lock_ug_access (UF_UI_FROM_CUSTOM);
UF_UI_select_with_single_dialog(message,title,scope,init_proc,NULL,&response,&object_tag,cursor,&view);
UF_DISP_set_highlight(object_tag,0);
UF_UI_unlock_ug_access (UF_UI_FROM_CUSTOM);
if (response==UF_UI_OBJECT_SELECTED)
{
Face *body1(dynamic_cast<Face *>(NXObjectManager::Get(object_tag)));
NXOpen::Features::Feature *nullNXOpen_Features_Feature(NULL);
NXOpen::Features::ResizeBlendBuilder *resizeBlendBuilder1;
resizeBlendBuilder1 = workPart->Features()->CreateResizeBlendBuilder(nullNXOpen_Features_Feature);
double radius1;
radius1 = resizeBlendBuilder1->GetBlendFaceRadius(body1);
resizeBlendBuilder1->Radius()->SetRightHandSide("15");
NXOpen::Features::Feature *feature1;
feature1 = resizeBlendBuilder1->CommitFeature();
NXOpen::Expression *expression1(resizeBlendBuilder1->Radius());
resizeBlendBuilder1->Destroy();
}
/* Terminate the API environment */ |
|