def getScalarVariablesIntersectionForType(self, key): myObject = globalKeyHandler().getObject(key) while (myObject.typeNr == TYPE_2D_CUTGEOMETRY_PART): myObject = globalKeyHandler().getObject(myObject.parentKey) intersection = [] if myObject and hasattr(myObject, 'importModule') and hasattr(myObject.importModule, 'getParts'): for curImportModule in myObject.importModule.getParts(): if hasattr(curImportModule, 'getPartCase'): partWithVars = curImportModule.getPartCase() if intersection == []: intersection = set( coviseCase.getScalarVariableNames(partWithVars) ) else: intersection = intersection & set( coviseCase.getScalarVariableNames(partWithVars) ) return list(intersection)
def getScalarVariablesIntersectionForType(self, key): myObject = globalKeyHandler().getObject(key) while (myObject.typeNr == TYPE_2D_CUTGEOMETRY_PART): myObject = globalKeyHandler().getObject(myObject.parentKey) intersection = [] if myObject and hasattr(myObject, 'importModule') and hasattr( myObject.importModule, 'getParts'): for curImportModule in myObject.importModule.getParts(): if hasattr(curImportModule, 'getPartCase'): partWithVars = curImportModule.getPartCase() if intersection == []: intersection = set( coviseCase.getScalarVariableNames(partWithVars)) else: intersection = intersection & set( coviseCase.getScalarVariableNames(partWithVars)) return list(intersection)
def getPossibleScalarVariablesForType(self, key): params = self.getRealParamsOfObject(key) if hasattr(params, 'partcase') and (params.partcase != None): partWithVars = params.partcase else: return self.getScalarVariablesIntersectionForType(key) #return [] if type(partWithVars) == type(None): return [] return coviseCase.getScalarVariableNames(partWithVars)
def getPossibleScalarVariablesForType( self, key ): params = self.getRealParamsOfObject(key) if hasattr(params, 'partcase') and (params.partcase != None): partWithVars = params.partcase else : return self.getScalarVariablesIntersectionForType(key) #return [] if type(partWithVars) == type(None): return [] return coviseCase.getScalarVariableNames(partWithVars)