got it working by converting the attribute to a vector but I'm guessing this is more of a lucky hack than anything else?
Code:
vector $xRayVar3 = `displaySurface -q -xRay`;
if ($xRayVar3) {
displaySurface -xRay false;
} else {
displaySurface -xRay true;
};
Si