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();