pythonscriptingabaqus

How can I find out if a instance of an assembly is suppressed?


I have an assembly with multiple instances. I want to find out if a specific instance is suppressed. I assume the property is stored somehwere in the instance opbject:

instance = mdb.models['MODELNAME'].rootAssembly.instance['INSTANCE NAME']

But I can't find the variable that tells me if the instance is suppressed. Anybody here knows?

I know how to suppress and resume an instance but i don't know what variable is changed when I do that. I think i need to find this variable...


Solution

  • Oke I figured it out. You need to do the following.

    #create a list containing the keys of the instances in the assembly
    instance_keys = mdb.models['MODEL NAME'].rootAssembly.instances.keys()
     
    #check if the instance is supressed
    for key in instance_keys:
        if mdb.models['MODEL NAME'].rootAssembly.features[key].isSuppressed():
            print('Instance: ' + key + ' is supressed')