MergeFiles Problem
Moderators: SDS, support, admin
MergeFiles Problem
Dear Sir,
I use the “MergeFilesDemoSite” program to merge 3 dxf files and save as a new .dxf file, but when I open the new .dxf file with “ViewerControlDemo “ program, I got nothing (cann’t see anything), could you tell me the cause?
Anderson
I use the “MergeFilesDemoSite” program to merge 3 dxf files and save as a new .dxf file, but when I open the new .dxf file with “ViewerControlDemo “ program, I got nothing (cann’t see anything), could you tell me the cause?
Anderson
Re: MergeFiles Problem
Dear Anderson,
We have found this problem. We will inform you when it is solved.
Sergey.
We have found this problem. We will inform you when it is solved.
Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: MergeFiles Problem
Hello!
The problem has been solved.
Please contact us via e-mail to support@cadsofttools.com accordingly the question of getting updated beta version of the library.
Sergey.
The problem has been solved.
Please contact us via e-mail to support@cadsofttools.com accordingly the question of getting updated beta version of the library.
Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: MergeFiles Problem
Dear Sergey,
Now I can see the merged dxf file. Thank You!
But the "Hatch" entity in each dxf file disappeared. How can I to obtain the original Hatch entity in my merged file?
Merry X'mas,
Anderson
Now I can see the merged dxf file. Thank You!
But the "Hatch" entity in each dxf file disappeared. How can I to obtain the original Hatch entity in my merged file?
Merry X'mas,
Anderson
Re: MergeFiles Problem
Dear Anderson,
Can you please send us to support@cadsofttools.com your file with hatch? We need to test it.
Sergey.
Can you please send us to support@cadsofttools.com your file with hatch? We need to test it.
Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: MergeFiles Problem
Hi sergey,
Have you found any solution for my problem? I am urge to finish my project and looking forward to your reply soon.
Anderson
Have you found any solution for my problem? I am urge to finish my project and looking forward to your reply soon.
Anderson
Re: MergeFiles Problem
Hello Mr. Anderson,
Unfortunately the problem is still under construction. We will inform you when it is solved.
Sergey.
Unfortunately the problem is still under construction. We will inform you when it is solved.
Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: MergeFiles Problem
Dear Sergey:
My problem with program were sent to you last Dec. 25. It has been 2 months. Do you still work on my problem? Due to this problem, my project was forced to delay. Can this problem be solved? Would you please let me know the status of solving this problem? Thanks.
Best regards,
Anderson
My problem with program were sent to you last Dec. 25. It has been 2 months. Do you still work on my problem? Due to this problem, my project was forced to delay. Can this problem be solved? Would you please let me know the status of solving this problem? Thanks.
Best regards,
Anderson
Re: MergeFiles Problem
Hello Mr. Anderson,
The code you sent us with a demo application would not work. Why? It is used AddScaledDXF method which adds XRef to a file. "XRef" means extended reference to a file, i.e. file container contains just a reference to a file. It does not take the whole data of the extended files for further storing inside. That is why it is necessary to resave a file added by AddScaledDXF method if he makes some changes to it. We made a simple example describing these state. Please try it:
Important: this code works with CAD Import .NET v.7 beta. He have sent you a download link via e-mail.
Sergey.
The code you sent us with a demo application would not work. Why? It is used AddScaledDXF method which adds XRef to a file. "XRef" means extended reference to a file, i.e. file container contains just a reference to a file. It does not take the whole data of the extended files for further storing inside. That is why it is necessary to resave a file added by AddScaledDXF method if he makes some changes to it. We made a simple example describing these state. Please try it:
Code: Select all
private void button1_Click(object sender, EventArgs e)
{
CADImage cadImg = new CADImage();
cadImg.InitialNewImage();
cadImg.UseDoubleBuffering = false;
CADImage cadImg_XREF = new CADImage();
cadImg_XREF.LoadFromFile(@"c:\body.dxf");
for (int i = 0; i < cadImg_XREF.Converter.GetCounts(CADImport.FaceModule.ConvSection.Entities); i++)
{
if (cadImg_XREF.Converter.GetSection(CADImport.FaceModule.ConvSection.Entities).Entities[i] is CADPolyLine)
{
CADPolyLine entPolyline = (CADPolyLine)cadImg_XREF.Converter.GetSection(CADImport.FaceModule.ConvSection.Entities).Entities[i];
CADHatch Hatch = new CADHatch();
Hatch.HatchName = "ANSI31";
CAD2DBoundaryList v2DBList = new CAD2DBoundaryList();
v2DBList.BoundaryType = 2;// Polyline type
Hatch.BoundaryData.Add(v2DBList);
CAD2DPolyline v2DPolyline = new CAD2DPolyline();
v2DBList.Add(v2DPolyline);
CAD2DPoint entPoint;
CADVertex entVertex;
for (int j = 0; j < entPolyline.Entities.Count; j++)
{
entVertex = (CADVertex)entPolyline.Entities[j];
entPoint = new CAD2DPoint(entVertex.Point.X, entVertex.Point.Y);
v2DPolyline.Vertexes.Add(entPoint);
}
v2DPolyline.Closed = true;
Hatch.Color = Color.Red;
HatchPatternData vHPData = new HatchPatternData();
vHPData.baseP = new DPoint(0, 0, 0);
vHPData.offset = new DPoint(20, 20, 0);
vHPData.lineAngle = 40.0f;
vHPData.isDash = false;
vHPData.lines = null;
vHPData.dashNum = 0;
Hatch.HatchPatternData.Add(vHPData);
Hatch.Loaded(cadImg_XREF.Converter);
cadImg_XREF.CurrentLayout.Entities.Add(Hatch);
cadImg_XREF.Converter.OnCreate(Hatch);
}
}
cadImg_XREF.GetExtents();
CADtoDXF vExp = new CADtoDXF(cadImg_XREF);
vExp.SaveToFile(@"c:\body.dxf");
DPoint APos = new DPoint(0, 0, 0);
DPoint AScale = new DPoint(1, 1, 1);
float Rotation = 0;
cadImg.AddScaledDXF(cadImg_XREF, @"c:\body.dxf", APos, AScale, Rotation);
vExp = new CADtoDXF(cadImg);
vExp.SaveToFile(@"c:\test.dxf");
}
Sergey.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: MergeFiles Problem
Dear Sir,
I copyed the sample code to my program and got two files (body.dxf, test.dxf)
They can be seen in "CADImport.Net - Editor", but when I opened them using AutoCAD 2009 I got the error message
ERROR:
something wrong in reading HATCH (from 840 line)
expected group code 98
DXF invalid input or incomplete - file has been discarded
The two DXF files had been sent to support@cadsofttools.com
Please help me to check this error ?
Best Regards,
Anderson
I copyed the sample code to my program and got two files (body.dxf, test.dxf)
They can be seen in "CADImport.Net - Editor", but when I opened them using AutoCAD 2009 I got the error message
ERROR:
something wrong in reading HATCH (from 840 line)
expected group code 98
DXF invalid input or incomplete - file has been discarded
The two DXF files had been sent to support@cadsofttools.com
Please help me to check this error ?
Best Regards,
Anderson
Re: MergeFiles Problem
Hello Mr. Anderson,
It is necessary to replace the following lines:
by
Sergey.
It is necessary to replace the following lines:
Code: Select all
v2DBList.BoundaryType = 2;
Code: Select all
v2DBList.BoundaryType = 7;
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support