LibreDWG with fpc? lazarus / 21-General ---------------------------------------------------------------------- zamtmn · 2022-06-08 17:29 Hi! Does anyone use LibreDWG to read/write DWG files? Usage examples? ---------------------------------------------------------------------- MarkMLl · 2022-06-08 18:16 Use the forum search facility, it's been discussed a couple of times. MarkMLl ---------------------------------------------------------------------- zamtmn · 2022-06-08 18:29 I have not find meaningful discussions, just the name was mentioned several times ---------------------------------------------------------------------- MarkMLl · 2022-06-08 18:53 ...by yourself in at least one case. Sorry, I should have followed through the context more. MarkMLl ---------------------------------------------------------------------- zamtmn · 2022-06-11 00:14 Ok. I'll try to do something https://github.com/zamtmn/fpdwg ---------------------------------------------------------------------- amir.eng · 2022-06-27 07:41 Hello zamtmn, I need a library to read/write DWG via Lazarus too , and I have been looking for it for years , but I couldn't find anything. Let me know if you find any usful things. Thanks in advance. ---------------------------------------------------------------------- zamtmn · 2022-06-27 22:03 amir.eng LibreDWG, 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 ---------------------------------------------------------------------- amir.eng · 2022-07-18 05:32 Quote from: zamtmn on June 28, 2022, 12:03:11 amamir.eng LibreDWG, 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 dont need all library of LibreDWG, I need it only for points, assume there is a point includes X,Y,Z and I want to create a simple dwg for the coordinate via lazarus. ---------------------------------------------------------------------- zamtmn · 2022-07-18 07:36 Unfortunately, everything has been done in dwg to complicate it third- party use. You can write the reading yourself by spending a lot of effort. I tried, it's hopeless. Only use ready-made tools with their problems and limitations(( ---------------------------------------------------------------------- alaa123456789 · 2022-07-18 18:10 i was looking for Autocad solutions and found something called .scr files which is scripting language in autocad here some sample https://www.researchgate.net/profile/Mahesh-Luintel/publication/332493 976_USE_OF_SCRIPT_FILES_IN_AUTOCAD/links/5cb7e8e7299bf120976cd8e6/USE- OF-SCRIPT-FILES-IN-AUTOCAD.pdf maybe you could do more research and make demo thanks ---------------------------------------------------------------------- zamtmn · 2022-09-01 13:58 Quote from: alaa123456789 on July 18, 2022, 08:10:33 pmi was looking for Autocad solutions and found something called .scr files which is scripting language in autocad here some sample https://www.researchgate.net/profile/Mahesh-Luintel/publication/332493 976_USE_OF_SCRIPT_FILES_IN_AUTOCAD/links/5cb7e8e7299bf120976cd8e6/USE- OF-SCRIPT-FILES-IN-AUTOCAD.pdf maybe you could do more research and make demo thanks these are all half-measures, we need the ability to fully read and write dwg ---------------------------------------------------------------------- loaded · 2022-09-01 15:55 If a solid source with specifications for the dwg format is found, it can be read in binary format. I think it is not very difficult, but it will definitely take a lot of time and effort. Not now, but at a convenient time, I intend to read this format. (bottom of my To Do List) ---------------------------------------------------------------------- krolikbest · 2022-09-01 18:05 You may to convert a dwg to dxf ---------------------------------------------------------------------- zamtmn · 2022-09-01 19:10 ODA DWG specs: https://www.opendesign.com/files/guestdownloads/OpenDes ign_Specification_for_.dwg_files.pdf Specifications are not complete, format is very complex, much has been done to make access difficult. But yes, anything is possible. I once get access to primitives for DWG version 2000. And now I think it's better to use a third-party library and help in its development than to do my own implementation