A new approach in performing microdiffraction analysis