There are a couple of issues with the code, the first is that variable 'm2' will be nil, but perhaps more importantly, geGetSelSet() returns a list, and so the result might be 'nil' or '("M2") or '("M2" "M2")' and so on. Perhaps something like 'forall' would be useful here? procedure(MetalToFillBlock() let((m2) m2 = "M2" if(forall(object geGetSelSet() object~>layerName == m2) then printf("Layer name is %L for all selected objects\n" m2) else printf("Layer name is NOT %L for all selected objects\n" m2) ); if );let );procedure Hopefully this will help a little? Regards, Lawrence.
↧