UG NX二次开发源码分享:获取所有注释的内容
UG NX二次开发源码分享:获取所有注释的内容
extern DllExport void ufusr( char *parm, int *returnCode, int rlen )
{
if( UF_CALL(UF_initialize()) ) return;
Session *theSession = Session::GetSession();
Part *workPart(theSession->Parts()->Work());
Annotations::AssociativeText *theAT =
workPart->Annotations()->CreateAssociativeText();
Annotations::AnnotationManager *annMgr = workPart->Annotations();
LabelCollection *myLabels = workPart->Labels();
for (LabelCollection::iterator it = myLabels->begin();
it != myLabels->end(); it++)
{
vector<NXOpen::NXString> theTexts = (*it)->GetText();
for(int inx = 0; inx < theTexts.size(); inx++)
{
ECHO("Evaluated Text: %s\n", theAT->GetEvaluatedText((*it),
theTexts).GetLocaleText());
}
}
delete theAT;// See PRs 7678442 and 7799527
UF_CALL(UF_terminate());
}
谢谢。。。。。。。。。。。。 谢谢分享!!!!!!! 谢谢分享
页:
[1]