NX二次开发 UFUN设置并保存工作视图显示 uc6434
//NX8.0+VS2010
#include <uf_assem.h>
#include <uf_part.h>
#include <uf_obj.h>
#include <uf_modl.h>
#include <uf_view.h>
#include <uf_draw.h>
//设置并保存工作视图显示
bool SetSaveWorkViewDisp(const double x_vec[3], const double y_vec[3], const string view_name)
{
double mtx_3d[9] = { 0.0 }, mtx[6] = { 0.0 };
if (UF_MTX3_initialize(x_vec, y_vec, mtx_3d))
return false;
tag_t tModelingView = NULL_TAG;
char str[133] = "";
sprintf_s(str, "%s", view_name.c_str());
for (int i = 0; i < 6; i++)
{
mtx[i] = mtx_3d[i];
}
uc6434("", 4, NULL_TAG, mtx);
uc6454(str);
uc6450("", str, 0, 0);
return true;
}