TheSwamp
Code Red => .NET => Topic started by: jtoverka on May 16, 2020, 11:17:16 AM
-
So I have been working on creating dxf files using a C# dxf reader writer library found on github: https://github.com/haplokuon/netDxf (https://github.com/haplokuon/netDxf).
I compiled it into a dll file, and I am using that dll file as a reference in my program. I have created a dxf file with a line in it. AutoCAD throws an error message. I have attached a photo of the error message as well as the drawing. I want understand what this error message means. It asks me if I would like to continue and I select yes. It then shows the drawing with the line as intended.
-
(on iPad) Wild assed guess - is the dll emitting Unicode?
-
(on iPad) Wild assed guess - is the dll emitting Unicode?
I am not sure, you might be right, however, it seems fixed when I put the version I want as AutoCAD 2018. The default is AutoCAD 2000. Is there something in AutoCAD 2000 formats that cause this in AutoCAD 2018? Below is a little snippet.
public void New(Documents dxfDocuments, netDxf.DxfDocument dxfActiveDocument)
{
string buffer;
string input; // hello mp
buffer = ">>> Enter template file name or [. (for none)] <>:";
Console.Write("\n" + buffer);
input = GetInput(0, buffer);
try
{
if (input == ".")
{
netDxf.DxfDocument dxfDocument = new netDxf.DxfDocument(netDxf.Header.DxfVersion.AutoCad2018); // Create Document
dxfDocuments.Add(dxfDocument); // Add document to collection
dxfActiveDocument = dxfDocument; // Make the document the active document
Console.Write("\nSuccessfully loaded new dxf document"); // Print to console
}
}
catch
{
Console.Write("\nLoad failed");
}
}