Message 1 of 11
Fusion crush when faces add to activeselections

Not applicable
06-01-2016
12:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello. Some faces in model have attributes. When I run my command "Create Pieces", method "collectPieces" collect all faces with attributes. Next, in method "setActiveSelections" some faces add to activeSelections (code below). If i run my command normally - all is ok. If my command "Create Pieces" is already running, and i run "Create Pieces" again, Fusion crush when faces add to activeselections. if I check activeselections and faces - they are valid. How to solve this problem? My commandInput have SelectionInput object. If i remove SelectionInput from commandInput, Fusion will not crush, when command restarted. It may be a problem with SelectionInput?
def setActiveSelections(piece): global currentPiece currentPiece=piece app = adsk.core.Application.get() ui = app.userInterface activeselections_ = ui.activeSelections activeselections_.clear() for face in piece.faces: if face.isValid: activeselections_.add(face) #Here Fusion crush
Regards.