Message 1 of 5

Not applicable
05-20-2016
12:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello. I have a problem with deleting attributes. I create custom class. It contain a list of BrepFaces Objetcs inside. I add to face an attribute, then i add this face to the list of faces. If i delete attribute from face from list later, brepFace in model still contains this attribut, but face in list - not. Why it occurs?
Python code:
add attribute function:
def setAttributeToFaceInModelByName ( pFace, pName): retCode=checkEFAttributes(pFace) if retCode != EFErrorNotFindAttributes: return retCode pFace.attributes.add(EFAttributeGroupName,pName,'1') return EFIsOK
Remove attributes function:
def removeEFAttributes(pFace): retCode=checkBrepface(pFace) if retCode != EFIsOK: return retCode if pFace.attributes.itemsByGroup(EFAttributeGroupName): attributes = pFace.attributes.itemsByGroup(EFAttributeGroupName) for pAttib in attributes: pAttib.deleteMe() return EFIsOK
Solved! Go to Solution.