A method of generating a part program for use in an image-measuring system and
in an image-measuring instrument is provided. The method can be employed easily
by an operator without complicated operations to efficiently generate a part program
for a CNC image-measuring instrument. This method facilitates the operator to visually
identify a work to be measured, through reading CAD data of the work; setting measurement
conditions and a positioning coordinate system; calculating a size of the work
when it is practically imaged; and displaying an image of the CAD data with the
same size. Then, through setting tolerance information; and selecting an objective
graphic to be measured, an edge detection tool is placed for a graphic element
of the objective graphic selected. Further, through performing a process to accommodate
as many edge detection tools in a determination circle as possible; generating
a part program only requiring the least stage movements; performing a practical
measurement; checking an image obtained from the measured data with an image obtained
from the CAD data, information such as an error from a design value can be displayed
on a screen.