1 NX9+VS2012 2 3 #include <uf.h> 4 #include <uf_drf.h> 5 #include <NXOpen/Annotations_Note.hxx> 6 #include <NXOpen/NXObjectManager.hxx> 7 8 9 UF_initialize(); 10 11 //创建注释 12 char* TextString[] = {"Caesar卢尚宇"}; 13 double Origin3d[3] = {100,100,100}; 14 tag_t NoteTag = NULL_TAG; 15 UF_DRF_create_note(1, TextString, Origin3d, 0, &NoteTag); 16 17 //读取注释 18 Annotations::Note *note1(dynamic_cast<Annotations::Note *>(NXObjectManager::Get(NoteTag))); 19 std::vector<NXString> Notes = note1->GetText(); 20 21 //打印 22 lw->Open(); 23 lw->WriteLine(Notes[0].GetLocaleText()); 24 25 UF_terminate();
原文地址:https://www.cnblogs.com/nxopen2018/p/10957473.html
时间: 2024-10-07 14:05:53