def SetSlotModel(self, slot, model):
        '''
        Adds a model to a slot in the characterization map
        @param slot: full name of character slot
        @param model: model to add to the slot (can be name or model object)
        '''
        from pyfbsdk import FBFindModelByName #@UnresolvedImport
        if isinstance(model, basestring):
            obj = FBFindModelByName(model)
            if not obj:
                raise Exception("Object '%s' does not exist. Unable to add it to character map '%s' under slot '%s'" % (model, self, slot))
        else:
            obj = getattr(model, 'component', model)
                 
        # get the character slot
        charSlot = self.ListProperties(pattern=slot)
        if not charSlot:
            raise Exception("Invalid character slot '%s'" % slot)
        # remove all current models from the slot
        charSlot[0].removeAll()
        
        if obj:
            charSlot[0].append(obj)
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/moBu/site-packages/PyMoBu-0.2/pymobu/components/constraints.py/PMBCharacter.SetSlotModel/original