Johann Christian Goetze, librarian to the Elector of Saxony, bought the codex in Vienna in 1739 from an owner the record does not name, and it entered the royal library at Dresden that year. How it reached Vienna is not documented. The usual supposition is a route through the early shipments sent from Mexico to the Habsburg court, but that is an inference and not a paper trail, and the atlas does not upgrade it into one.
Two later moments matter more than the purchase. In the 1880s Ernst Foerstemann, then the librarian, worked out the Maya bar and dot numerals, the Long Count and the Venus table from the pages in front of him. That is the foundation the whole decipherment of Maya writing was built on, and it was done by a librarian on his own institution's holding rather than in the field.
In February 1945 the library was hit during the Allied bombing of Dresden and the codex was water damaged. The pigments suffered and some pages are harder to read now than they were in the nineteenth century. The consequence is unusual and worth stating plainly: the facsimiles made before the damage are evidence in their own right, not merely convenient reproductions, because for some passages they preserve a reading the original no longer offers. A custodian is normally the last word on what a manuscript says. Here the custodian's own earlier copies have to be read alongside it, and a scholar who consults only the object is working from the poorer witness.