amir.engLibreDWG, according to my observations, is managed with non-complex files. I managed to read the file and iterate through all the objects in it. I haven't tried write dwg yet. There is a difficulty in translating headers - macros are actively used
i was looking for Autocad solutions and found something called .scr files which is scripting language in autocad here some samplehttps://www.researchgate.net/profile/Mahesh-Luintel/publication/332493976_USE_OF_SCRIPT_FILES_IN_AUTOCAD/links/5cb7e8e7299bf120976cd8e6/USE-OF-SCRIPT-FILES-IN-AUTOCAD.pdfmaybe you could do more research and make demo thanks