I don't "write" my rulesets using code, I use the ruleset editor. Unfortunately there's no way to select grace notes as either a note type, a technique or an articulation that I can see in the editor.
However, I think there may be a workaround. I typically increase the duration of slurred notes using a rule that recognizes notes under a slur. This makes it work with legato patches in my VI's. Since grace notes in my experience are always under slurs, this could work to do what you want.
Here's a rule in the editor for doing this:
Hope this helps!