A method for determining a coordinate system for a device under measurement being substantially a quadrangular prism, or the device under measurement includes a substantially quadrangular-prism-shaped portion, in which the direction and position of the coordinate system are determined for the device under measurement according to the position of a feature point obtained by measuring a feature portion of the device under measurement, the relationships of axes in the coordinate system selected in advance being known, the method comprising: a preliminary measurement step in which a detector of a coordinate measuring apparatus is used to scan two or more feature portions (56, 60, 66) of the device under measurement as first measurement areas to traverse one side of the device under measurement at a certain spatial interval to obtain position coordinate information and the detector of the coordinate measuring apparatus is used to scan one or more feature portions (56, 60, 66) that are not on a straight line connecting the first measurement areas as a second measurement area to traverse another side adjacent to said one side to obtain position coordinate information; a feature-point detection step of obtaining the position of an edge point (54, 58, 64) at each of the measurement areas according to a result of measurement obtained in the preliminary measurement step; a reference-line determination step of obtaining a first reference line according to the position of each edge point (54, 58, 64) in the first measurement areas obtained in the feature-point detection step, and of obtaining a second reference line perpendicular to the first reference line and passing through an edge point (54, 58, 64) located in the second measurement area, obtained in the feature-point detection step; an origin-setting step of positioning the origin of the coordinate system for the device under measurement according to the position of the intersection of the first reference line and the second reference line obtained in the reference-line determination step; and an axis setting step of determining the directions of axes (WX, WY, WZ) of the coordinate system for the device under measurement according to the directions of the reference lines (68, 70) obtained in the reference-line determination step. a preliminary measurement step in which a detector of a coordinate measuring apparatus is used to scan two or more feature portions (56, 60, 66) of the device under measurement as first measurement areas to traverse one side of the device under measurement at a certain spatial interval to obtain position coordinate information and the detector of the coordinate measuring apparatus is used to scan one or more feature portions (56, 60, 66) that are not on a straight line connecting the first measurement areas as a second measurement area to traverse another side adjacent to said one side to obtain position coordinate information; a feature-point detection step of obtaining the position of an edge point (54, 58, 64) at each of the measurement areas according to a result of measurement obtained in the preliminary measurement step; a reference-line determination step of obtaining a first reference line according to the position of each edge point (54, 58, 64) in the first measurement areas obtained in the feature-point detection step, and of obtaining a second reference line perpendicular to the first reference line and passing through an edge point (54, 58, 64) located in the second measurement area, obtained in the feature-point detection step; an origin-setting step of positioning the origin of the coordinate system for the device under measurement according to the position of the intersection of the first reference line and the second reference line obtained in the reference-line determination step; and an axis setting step of determining the directions of axes (WX, WY, WZ) of the coordinate system for the device under measurement according to the directions of the reference lines (68, 70) obtained in the reference-line determination step.