OpenMain()//主入口

void DZWEIZHI::OpenMain()//主入口

{
try
{
//---- Enter your callback code here -----

NXOpen::Session *theSession = NXOpen::Session::GetSession();
NXOpen::Part *workPart(theSession->Parts()->Work());
NXOpen::Part *displayPart(theSession->Parts()->Display());

//获取切换开关的值
PropertyList *blocktoggle01Pros = toggle01->GetProperties();
int theblocktoggle01 = blocktoggle01Pros->GetLogical("Value");
delete blocktoggle01Pros;
blocktoggle01Pros = NULL;

workPart->WCS()->SetVisibility(false);

DingzhenWeizhi();//顶针位置

 

//if (theblocktoggle01 == 1)
//{
workPart->WCS()->Rotate(NXOpen::WCS::AxisYAxis, 180.0);

for (size_t i = 0; i < vecPersonT.size(); i++)
{
double note_origin[3];

note_origin[0] = vecPersonT[i].M_DX;

note_origin[1] = vecPersonT[i].M_DY;

note_origin[2] = vecPersonT[i].M_DZ;

CreaTxt(vecPersonT[i].strNUMBER, note_origin);//创建TXT文字

CreaExtrude(vecPersonT[i].strNUMBER, note_origin, vecPersonT[i].M_DTAG);//创建拉伸

}

workPart->WCS()->Rotate(NXOpen::WCS::AxisYAxis, 180.0);

//}

 


workPart->WCS()->SetVisibility(true);


RemoveParam();//去参

Dele();//删除对象




}
catch (exception& ex)
{
//---- Enter your exception handling code here -----
DZWEIZHI::theUI->NXMessageBox()->Show("主入口", NXOpen::NXMessageBox::DialogTypeError, ex.what());
}
}

posted @   firetuo  阅读(28)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
点击右上角即可分享
微信分享提示