Metaprogram defs for dimension setters and getters