NX二次开发 UFUN设置视图ZClip uc6437
//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>
//设置视图ZClip,防止视图丢失内容
bool SetViewAutoZClip(const tag_t view_tag)
{
int status[2] = { 3, 3 };
char str[133] = "";
double dist[2] = { 0.0 };
string sViewName;
if (NULL_TAG == view_tag)
return false;
if (!AskObjectName(view_tag, sViewName))
return false;
sprintf_s(str, "%s", sViewName.c_str());
if (uc6437(str, status, dist))
return false;
return true;
}