-
-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autocad cant read library dwg/dxf writing output #315
Comments
Hi @mamaorha, I've test your file, here are the results, DXF: DWG: With the DWG I needed to recover the file but it seems that it could be opened by Autocad. I've noticed that your file has a dynamic block, this are not fully supported by |
Thank you for addressing it so quickly, i truely appreciate the work you have done here. |
Same issue here. Wondering has this bug been fixed? |
Hi @Nico3201975 This particular issue was resolved, the file could be opened in Autocad with no major issue, if you are referring to the size, this is a work in progress to be solved. In any other case, if you have a particular issue with a file, it would be good if you could provide an example of what are you trying to achieve or the file that is not working. |
Hi @DomCR Thanks for the quick reply. I just updated to the newest release version. |
That notification usually appears for a badly written entity or object, after pressing recover Autocad usually prompts a log with what has been fixed and which entities or objects have been affected, if you can provide the logs I can take a look of what is the cause of it. Also if you could provide an example of the output file it will really help with the problem because I could take a more detailed look at the issue. |
Hi DomCR, So basically, I followed the example to call DwgReader to retrieve a dwg file attr, then set comment section(from CadSummaryInfo), then output to a new dwg file by calling DwgWriter. Here is added comment dwg file: |
I've tested your file, this is the code that I'm using: CadDocument doc = DwgReader.Read(test, this._dwgConfiguration, this.onNotification);
doc.SummaryInfo.Comments = "HELLO THIS IS MY COMMENT";
DwgWriter.Write(path, doc, this.onNotification); I'm guessing that this is what you want to achieve, if your case is more complex or you are changing some other structure, please let me know to make sure that I can properly create a test case. The resulting file seems healthy, this is the only popup that I get form Autocad: Which is completely normal and it doesn't recover any errors. Checking the changes: Are you using the Nuget package or the repository? |
Hi DomCR, Appreciate for the testing. what I wrote is pretty much same as what you provided above. DwgReaderConfiguration _dwgConfiguration = new DwgReaderConfiguration DwgReader.Read() actually reads a file originally created by Autocad2022, then adds a comment, then after that creating as a new dwg file. Somehow, my autocad2022 shows the prompt below: And here is the prompt file: I am using the source code from repository. |
Autocad cant read library dwg/dxf writing output.
To reproduce:
`using ACadSharp;
using ACadSharp.Entities;
using ACadSharp.IO;
using CSMath;
CadDocument doc = DwgReader.Read(@"Drawing.dwg");
using (DxfWriter writer = new DxfWriter(@"Drawing.dxf", doc, false))
{
writer.Write();
}
using (DwgWriter writer = new DwgWriter(@"Drawing.dwg", doc, false))
{
writer.Write();
}`
expected a readable file in autocad but the output is much smaller then original dwg and fail in autocad.
The text was updated successfully, but these errors were encountered: