Can I change material without taking the appearance?

Hey all,

     I would like to have macro that sets a specific material but I do not want the appearance of the model to change.  Can I do this?  I thought I could get the original appearance, change the material, then change the appearance back like this but its not working...?  I am pretty new to the whole api thing so go easy on me if I have made a rookie mistake...   Thanks.

SolidworksApi macros