【NX二次开发】获取、设置控件值时,注意释放内存

 

int iEnumType = this->enumType->SetShow(true);
int iEnumType = this->enumType->GetProperties()->SetLogical("Show",true);

一种是8.5以上才能用的,一种是通用

第二种写法,有问题,可以用,但是没有释放内存,下面是正确用法

PropertyList *propList = this->enumType->GetProperties();
int iEnumType = propList->GetEnum("Value");
delete propList;
propList = NULL;

 

posted @ 2022-07-15 14:49  王牌飞行员_里海  阅读(233)  评论(0)    收藏  举报