CATIA caa 隐藏元素
2020-01-19 本文已影响0人
锦囊喵
/**
* 隐藏元素
* @param ipListElemObj
* 元素列表
*/
void HideElements(CATLISTV(CATISpecObject_var) ipListElemObj)
{
for(int i=1;i<=ipListElemObj.Size();i++){
CATIVisProperties* pPropOnElem = NULL;
HRESULT rc = ipListElemObj[i]->QueryInterface(IID_CATIVisProperties,
(void**)&pPropOnElem);
if(NULL != pPropOnElem){
CATVisPropertiesValues PropValue;
CATVisPropertyType PropTypeOnPtObj = CATVPShow;
CATVisGeomType GeomTypeOnPtObj = CATVPGlobalType;
PropValue.SetShowAttr(CATNoShowAttr);
rc = pPropOnElem->SetPropertiesAtt(PropValue,
PropTypeOnPtObj,
GeomTypeOnPtObj);
pPropOnElem->Release();
pPropOnElem = NULL;
}
}
}