Can't check with maya right now but I can spot two things off top of my head... The ls command returns always a string array. So you should do something like this: string $currentObj[] = `ls -sl`; Now let's say you're interested on the first object in the selection (index 0). print($currentObj[0]); The other thing is that in a script, you need to use the getAttr command to retrieve a value of an attribute. Like this: string $currentAttrMin = getAttr($currentObj + ".up_Filter_Size"); You might want to also check the data type of the up_Filter_Size. Something tells me that it's not a string (although the above will propably work due to the automatic type conversion).