cart: empty [ Login ]

File preview after DwgWriter

1 
JGL
8/8/2019 6:59 AM
Hi. I'm developping an application that opens a .dwg file, changes some text on a table and saves de file. All is working properly but the saved file doesn't show anything on them preview panel in Windows. I attach an example (before and after saving with DwgWriter) I use it to take a fast preview of a dwg file on my application. When I open the file with Autocad and save it, the preview comes back again. Maybe I'm doing something wrong but I can't find the mistake. I attach the code. Thanks a lot.
After.jpg
Before.jpg
Wout
8/8/2019 10:35 AM
Hi, There's an optional preview bitmap inside the DWG format, and currently CadLib doesn't create this preview bitmap. - Wout
JGL
8/9/2019 3:02 PM
Hi, Is it planned to include it? It would be great. Thanks again
Wout
8/22/2019 2:17 PM
Hi, I've added a method DxfModel.UpdatePreview(GraphicsConfig graphicsConfig) in the latest CadLib version, it will create a preview of model space for DWG version 14 and later. Currently it's not supported for version 13. You can download the latest CadLib version from Your resources in your user profile. - Wout
JGL
8/22/2019 3:49 PM
Thanks a lot. I'll try it.
JGL
8/29/2019 4:30 PM
Hi. I've tried it but it doesn't work for me. I don't know how to use the GraphicsConfig object. What I've done is something like: Dim model As DxfModel Dim GraphicsConfig As GraphicsConfig model = DwgReader.Read("[dwg file]") model.Header.AcadVersion = DxfVersion.Dxf24 GraphicsConfig = New GraphicsConfig(True) model.UpdatePreview(GraphicsConfig) DwgWriter.Write("[dwg file]", model) Can you tell me a little example? What I need to do is overwrite the same file after change it and the preview must show the changes. Thanks again.
JGL
12/4/2019 10:24 AM
Hi Wout. I've tried it but it doesn't work.
1