catia二次开发源码分享:隐藏对象元素
void HideElements(CATLISTV(CATISpecObject_var) ipListElemObj){
for(int i=1;i<=ipListElemObj.Size();i++){
CATIVisProperties* pPropOnElem = NULL;
HRESULT rc = ipListElemObj->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;
}
}
}
页:
[1]