The method of detecting and referencing two-dimensional position of a cassette in a drawer of compartments distributed according to columns and rows includes positioning at least one inserted cassette with the upper face turned towards the top within a compartment. Systematic detection of all compartments is performed automatically by verifying the presence of a cassette and by verifying the presence of a cassette within each compartment. The detection can be optical and include displacing an optical sight relatively with respect to the top of the drawer according to at least one trajectory passing through all compartments. When detecting a cassette within a compartment, the two-dimensional position is identified by coordinates, according to column and row. If an error occurs during a first pass, the detection and reading are displaced directly to the position where the error occurrence was noted and previously recorded, without undertaking a new detection of all compartments.