Native languages were widely used in New Spain in the 1600's, and many books were printed in native languages, however by the 1700's native languages were almost out of official use and print, was this the result of a government policy or did people choose to abandon their native languages?

by Frigorifico
drylaw

You may be interested in this earlier thread:
it has a link to an answer by /u/dhmontgomery, and some additional context by myself. The very short takeaway is that at least for the Nahua/Aztecs, the major decline in use of indigenous languages started only in independent Mexico and accelerated in the 20th century. Earlier colonial protections of native people were by then being taken away - it's certainly not a case of people giving up their languages voluntarily, but rather of their continuing marginalisation.

I'd add to your question's premise: that a) no indigenous authors from Mexico were published before the 19th century- their work circulated as manuscripts and so in smaller numbers.

And for the Nahua b) that it's true that the tradition of native language history writing ended around Mexico city by ca the mid 17th c. with Domingo de Chimalpahin. But it did continue in other regions throughout colonial times. Especially in Tlaxcala; but also in many smaller communities through the so called Títulos primordiales. These traditions have only been looked at more recently in English language research compared to eg the Mexica. I'm traveling at the moment but can hopefully add a bit more to those last points in a few days.