|
马上注册,结交更多同行朋友,交流,分享,学习。
您需要 登录 才可以下载或查看,没有帐号?注册
x
杯具啊!NX OPEN居然只支持VS2005 不支持VS2008.我倒!!! 下面的代码,我另一台电脑2005的居然运行不会有问题.2008的不行!!!
TX们可以试一下 :
Session *theSession = Session::GetSession();
Part *workPart1(theSession-> Parts()->Work());
Annotations:: LetteringPreferences *theLetteringPreferences = workPart1->Annotations()-> Preferences()->GetLetteringPreferences();
Annotations::UserSymbolPreferences *theUserSymbolPreferences = workPart1->Annotations()->NewUserSymbolPreferences(Annotations::UserSymbolPreferences::SizeTypeScaleAspectRatio, 1.0, 1.0);
std::vector<NXString> thePointInfoText(1);
NXString str="My Note";
thePointInfoText[0] = str;
Point3d thePointInfoTextOrigin(100,100, 0.0);
Annotations::Note *thePointInfoNote = workPart1->Annotations()->CreateNote(thePointInfoText, thePointInfoTextOrigin, AxisOrientationHorizontal, theLetteringPreferences, theUserSymbolPreferences);
端点调试会有下面的溢出,Unhandled exception at 0x219b059f in ugraf.exe: 0xC0000005: Access violation reading location 0xfffffffc
本帖最后由 tangxu12 于 2010-3-29 22:56 编辑 |
|