Hello,
I am working on a hydrogen diffusion project, wherein I have a microstructure with multiple grains and inflated grain boundaries that are the diffusion pathways within my structure.
Diffusion within these inflated grain boundaries are anisotropic. As such, I need to assign element orientations for each grain boundary. I do not want to assign these orientations to the other bodies in my structure. I have been doing this manually within Mechanical using the surface and edge guide:

My question is that if I can automate/script this element orientation process. I know the names of the bodies/geometries that need orientations. Is this possible to do? Enclosed is the CDB of the microstructure from the photo above. Please let me know if any extra information is needed 
Thank you for your time,
Bhanuj