Determine if Any Check Has A Result State of False
A Designed Part or Template may have any checks within it, and if any one of those checks fails then the design maybe invalid. To quickly determine if any one check has failed without showing annoying message boxes is to create two lists one list of all checks within a given Relation Set and a second list of all checks within the same Relation Set that have a passing Result. As long as the size of both lists match then all checks are passing, otherwise one or more checks are failing.
// Get All Checks From a Relation Set and See if Any of the Results Are a Failure Let iRelationSet ( AdvisorRelationSet ) iRelationSet = Relations\Checks Let ioAllList, ioFailList ( List ) ioAllList= iRelationSet->Query( "AdvisorCheck" ,"" ) ioFailList = iRelationSet->Query( "AdvisorCheck" ,"x.Result==True" ) Valid_Result = False If( ioAllList->Size() == ioFailList->Size() ) { Valid_Result = True }