UG 编辑文本文字


 1 //textTag 文本tag
 2 NXOpen::Features::Text *text1(dynamic_cast<NXOpen::Features::Text *>(NXOpen::NXObjectManager::Get(textTag)));
 3 theSession->Parts()->Work()->Features()->SetEditWithRollbackFeature(text1);
 4 theSession->UpdateManager()->SetInterpartDelay(true);
 5 text1->MakeCurrentFeature();
 6 NXOpen::Features::TextBuilder *textBuilder1;
 7 textBuilder1 = theSession->Parts()->Work()->Features()->CreateTextBuilder(text1);
 8 string newTextValue = "123";//新文本值
 9 textBuilder1->SetTextString(newTextValue.c_str());
10 NXOpen::NXObject *nXObject1;
11 nXObject1 = textBuilder1->Commit();
12 textBuilder1->Destroy();

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM