A new approach for measurement of local thickness and characterization of grain boundaries is presented. The method is embodied in a software tool that helps to find and set sample orientations useful for high-resolution transmission electron microscopic (HRTEM) examination of grain boundaries in polycrystalline thin films. The novelty is the simultaneous treatment of the two neighboring grains and orienting both grains and the boundary plane simultaneously. The same metric matrix-based formalism is used for all crystal systems. Input into the software tool includes orientation data for the grains in question, which is determined automatically for a large number of grains by the commercial ASTAR program. Grain boundaries suitable for HRTEM examination are automatically identified by our software tool. Individual boundaries are selected manually for detailed HRTEM examination from the automatically identified set. Goniometer settings needed to observe the selected boundary in HRTEM are advised by the software. Operation is demonstrated on examples from cubic and hexagonal crystal systems.