[qet] [3586] Merge dxftoelmt in newdxf branch

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 3586
Author:   scorpio810
Date:     2015-01-03 12:26:40 +0100 (Sat, 03 Jan 2015)
Log Message:
-----------
Merge dxftoelmt in newdxf branch

Added Paths:
-----------
    branches/newdxf/sources/editor/dxftoelmt/
    branches/newdxf/sources/editor/dxftoelmt/dxf_arc.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_arc.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_attdef.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_attdef.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_attrib.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_attrib.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_block.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_block.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_check_ltype.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_check_ltype.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_check_string_chars.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_check_string_chars.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_circle.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_circle.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_classes.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_classes.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_data.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_data.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_ellipse.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_ellipse.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_elmt_output.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_elmt_output.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_header.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_header.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_insert.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_insert.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_layer.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_layer.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_line.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_line.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_ltype.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_ltype.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_lwpolyline.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_lwpolyline.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_mline.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_mline.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_mtext.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_mtext.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_point.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_point.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_polyline.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_polyline.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_solid.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_solid.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_spline.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_spline.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_text.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_text.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_vertex.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_vertex.h
    branches/newdxf/sources/editor/dxftoelmt/dxf_xline.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxf_xline.h
    branches/newdxf/sources/editor/dxftoelmt/dxftoelmt.cpp
    branches/newdxf/sources/editor/dxftoelmt/dxftoelmt.h
    branches/newdxf/sources/editor/dxftoelmt/mainwindow.cpp
    branches/newdxf/sources/editor/dxftoelmt/mainwindow.h
    branches/newdxf/sources/editor/dxftoelmt/old_data.cpp
    branches/newdxf/sources/editor/dxftoelmt/tables.cpp
    branches/newdxf/sources/editor/ui/mainwindow.ui

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_arc.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_arc.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_arc.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,310 @@
+#include "dxf_arc.h"
+
+DXF_Arc::DXF_Arc()
+{
+}
+
+void DXF_Arc::ConvertArc(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+	int x;
+	int y;
+
+	double center_x;
+	double center_y;
+	double radius;
+	double start_angle;
+	double end_angle;
+	double hoek2;
+	double begin;
+	double einde;
+	double begin1;
+	double einde1;
+	double hoek_einde;
+	double N;
+	double O;
+	double J;
+	double K;
+	double L;
+	double M;
+	double R;
+	double S;
+	double T;
+	double U;
+	double V;
+	double W;
+
+
+	QString Lineout;
+	QString x_center;
+	QString y_center;
+	QString breedte;
+	QString hoogte;
+	QString hoek;
+	QString start_hoek;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString LineTypeOFLine;
+	QString LayerNameOFLine;
+	QString LineStyle;
+
+
+
+	for (x=0;x<Counter;x++)
+	{
+		if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive) )
+	   {
+			center_x=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			center_y=-(LineTable4[x].Line2.toDouble());
+		}
+
+		if (LineTable4[x].Line1.contains(" 40", Qt::CaseSensitive))
+		{
+			radius=LineTable4[x].Line2.toDouble();
+		}
+
+
+		if (LineTable4[x].Line1.contains(" 50", Qt::CaseSensitive))
+		{
+			start_angle=LineTable4[x].Line2.toDouble();
+		}
+
+
+		if (LineTable4[x].Line1.contains(" 51", Qt::CaseSensitive))
+		{
+			end_angle=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains("  6", Qt::CaseSensitive))
+		{
+			LineTypeOFLine=LineTable4[x].Line2;
+		}
+
+		if (LineTable4[x].Line1.contains("  8", Qt::CaseSensitive))
+		{
+			LayerNameOFLine=LineTable4[x].Line2;
+		}
+
+
+	}
+
+	dxf_check_ltype Check_LineType;
+
+	Check_LineType.LayerCount=LayerCount1;
+	Check_LineType.LTypeCount=LTypeCount1;
+	Check_LineType.LType_to_check=LineTypeOFLine;
+	Check_LineType.Layer_name_to_check=LayerNameOFLine;
+
+	LineStyle1= Check_LineType.Check_LType(LTypeDXF, LayerDXF);
+
+
+
+
+
+	Lineout="   ";
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<arc x=");
+
+	x_center=QString::number ((center_x - radius),'f',2);
+	y_center=QString::number ((center_y - radius),'f',2);
+
+	Lineout.append(QChar(34));
+	Lineout.append(x_center);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y=");
+	Lineout.append(QChar(34));
+	Lineout.append(y_center);
+	Lineout.append(QChar(34));
+
+
+	Lineout.append(" antialias=");
+	Lineout.append(QChar(34));
+	Lineout.append("false");
+	Lineout.append(QChar(34));
+
+	breedte=QString::number (( radius * 2),'f',2);
+	hoogte=QString::number (( radius * 2),'f',2);
+
+	Lineout.append(" width=");
+	Lineout.append(QChar(34));
+	Lineout.append(breedte);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" height=");
+	Lineout.append(QChar(34));
+	Lineout.append(hoogte);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" style=");
+	Lineout.append(QChar(34));
+	Lineout.append("line-style:");
+	Lineout.append(LineStyle1);
+	Lineout.append(";");
+	Lineout.append("line-weight:thin;");
+	Lineout.append("filling:none;");
+	Lineout.append("color:black");
+	Lineout.append(QChar(34));
+
+
+
+	/*
+		h = (450° - acad°)/30
+		qet° = 30* (450° - acad°)/30 = 450° - acad°
+		dus als acad_start° = 60° Þ qet_start° = 450° - 60° = 390° en opnieuw qet_start° > 360° dus qet_start° = 390° - 360° = 30°
+		acad­­_end° = 110° Þ qet_end° = 450° - 110° = 340° < 360° dus die hoek blijft 340°
+		qet_hoek° = qet_end° - qet_start° = 340° - 30° = 310°
+
+	*/
+
+	/* hoek ACAD omrekenen naar QET */
+
+
+	begin1=450-start_angle;
+	einde1=450-end_angle;
+
+
+	if (begin1>360)
+	{
+		begin=begin1-360;
+	}
+	else
+	{
+		if(begin1<0)
+		{
+			begin=360-begin1;
+		}
+		else
+		{
+			begin=begin1;
+		}
+	}
+
+	if (einde1>360)
+	{
+		einde=einde1-360;
+	}
+	else
+	{
+		if (einde1<0)
+		{
+			einde=einde1-360;
+		}
+		else
+		{
+			einde=einde1;
+		}
+	}
+
+
+
+	/* calculate hoek */
+
+	if (begin>einde)
+	{
+		N=einde-begin;
+	}
+	else
+	{
+		N=einde-begin-360;
+	}
+
+	if (N<0)
+	{
+		O=-N;
+	}
+	else
+	{
+		O=N;
+	}
+
+	J=end_angle-start_angle+N;
+	K=360-end_angle;
+	L=360-start_angle;
+	M=K-L;
+	R=-O;
+	S=J-O;
+
+	if (S < -360)
+	{
+		T=S+360;
+	}
+	else
+	{
+		T=S;
+	}
+
+	if (begin<einde)
+	{
+		U=M;
+	}
+	else
+	{
+		U=T;
+	}
+
+	if (U<0)
+	{
+		V=-U;
+	}
+	else
+	{
+		V=U;
+	}
+
+	W=U+V;
+
+	if (W==0)
+	{
+		hoek2=-V;
+	}
+	else
+	{
+		hoek2=T;
+	}
+
+
+
+
+
+
+
+	/* einde omrekening */
+
+	hoek=QString::number (-hoek2,'f',0);
+	start_hoek=QString::number ((-(begin-90)),'f',0);
+
+
+	Lineout.append(" start=");
+	Lineout.append(QChar(34));
+	Lineout.append(start_hoek);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" angle=");
+	Lineout.append(QChar(34));
+	Lineout.append(hoek);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+	if (Entitieswitch==1)
+	{
+		BlockList[0].BlockDef.append(Lineout);
+
+	}
+	if (Entitieswitch==0)
+	{
+
+		BlockList[BlockCount].BlockDef.append(Lineout);
+	}
+
+	return ;
+
+
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_arc.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_arc.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_arc.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,23 @@
+#ifndef DXF_ARC_H
+#define DXF_ARC_H
+
+#include <QtCore>
+#include <dxf_data.h>
+#include "dxf_check_ltype.h"
+#include "dxf_ltype.h"
+
+class DXF_Arc: public DXF_Data
+{
+	public:
+
+	int LineCount;
+	int LTypeCount1;
+	int LayerCount1;
+	int Entities1;
+
+	DXF_Arc();
+
+	void ConvertArc (int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+};
+
+#endif // DXF_ARC_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_attdef.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_attdef.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_attdef.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,129 @@
+#include "dxf_attdef.h"
+
+DXF_Attdef::DXF_Attdef()
+{
+
+
+
+
+}
+
+void DXF_Attdef::ConvertAttdef(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+	attrotation=0;
+	attx=0;
+	atty=0;
+	attheight=1;
+	atttext="";
+	atttag="";
+
+	for (x=0;x<Counter;x++)
+	{
+		if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive) )
+	   {
+			attx=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			atty=-(LineTable4[x].Line2.toDouble());
+		}
+
+		if (LineTable4[x].Line1.contains(" 40", Qt::CaseSensitive))
+		{
+			attheight=LineTable4[x].Line2.toDouble();
+		}
+
+
+		if (LineTable4[x].Line1.contains(" 50", Qt::CaseSensitive))
+		{
+			attrotation=LineTable4[x].Line2.toDouble();
+		}
+
+
+		if (LineTable4[x].Line1.contains("  1", Qt::CaseSensitive))
+		{
+			atttext=LineTable4[x].Line2;
+		}
+
+		if (LineTable4[x].Line1.contains("  2", Qt::CaseSensitive))
+		{
+			atttag=LineTable4[x].Line2;
+		}
+
+
+
+
+	}
+
+
+	dxf_check_string_chars CheckText1;
+
+	CheckText1.TextToCheck=atttext;
+
+	atttext=CheckText1.CheckText();
+
+	/* <input x="-23" y="15.5" size="9" rotation="90" rotate="true" text="_" tagg="label"/> */
+
+	xattext=QString::number(attx+0.5,'f',0);
+	yattext=QString::number(atty+0.5,'f',0);
+	hattext=QString::number(attheight,'f',0);
+	rattext=QString::number(attrotation,'f',0);
+
+
+	Lineout="   ";
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<input x=");
+	Lineout.append(QChar(34));
+	Lineout.append(xattext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y=");
+	Lineout.append(QChar(34));
+	Lineout.append(yattext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" size=");
+	Lineout.append(QChar(34));
+	Lineout.append(hattext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" rotation=");
+	Lineout.append(QChar(34));
+	Lineout.append(rattext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" rotate=");
+	Lineout.append(QChar(34));
+	Lineout.append("true");
+	Lineout.append(QChar(34));
+
+
+	Lineout.append(" text=");
+	Lineout.append(QChar(34));
+	Lineout.append(atttext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" tagg=");
+	Lineout.append(QChar(34));
+	Lineout.append(atttag);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+	if (Entitieswitch==1)
+	{
+		BlockList[0].BlockDef.append(Lineout);
+
+	}
+	if (Entitieswitch==0)
+	{
+
+		BlockList[BlockCount].BlockDef.append(Lineout);
+	}
+
+	return ;
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_attdef.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_attdef.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_attdef.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,32 @@
+#ifndef DXF_ATTDEF_H
+#define DXF_ATTDEF_H
+
+#include <QtCore>
+#include <dxf_data.h>
+#include "dxf_check_string_chars.h"
+
+class DXF_Attdef: public DXF_Data
+{
+	public:
+
+	int x;
+
+	double attx;
+	double atty;
+	double attheight;
+	double attrotation;
+
+	QString Lineout;
+	QString xattext;
+	QString yattext;
+	QString hattext;
+	QString rattext;
+	QString atttext;
+	QString atttag;
+
+	DXF_Attdef();
+
+	void ConvertAttdef(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+};
+
+#endif // DXF_ATTDEF_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_attrib.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_attrib.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_attrib.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,127 @@
+#include "dxf_attrib.h"
+
+DXF_Attrib::DXF_Attrib()
+{
+}
+
+
+void DXF_Attrib::ConvertAttrib(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+	attx=0;
+	atty=0;
+	attheight=1;
+	attrotation=0;
+	atttext="";
+	atttag="";
+
+
+
+	for (x=0;x<Counter;x++)
+	{
+		if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive) )
+	   {
+			attx=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			atty=-(LineTable4[x].Line2.toDouble());
+		}
+
+		if (LineTable4[x].Line1.contains(" 40", Qt::CaseSensitive))
+		{
+			attheight=LineTable4[x].Line2.toDouble();
+		}
+
+
+		if (LineTable4[x].Line1.contains(" 50", Qt::CaseSensitive))
+		{
+			attrotation=LineTable4[x].Line2.toDouble();
+		}
+
+
+		if (LineTable4[x].Line1.contains("  1", Qt::CaseSensitive))
+		{
+			atttext=LineTable4[x].Line2;
+		}
+
+		if (LineTable4[x].Line1.contains("  2", Qt::CaseSensitive))
+		{
+			atttag=LineTable4[x].Line2;
+		}
+
+
+
+
+	}
+
+
+	dxf_check_string_chars CheckText1;
+
+	CheckText1.TextToCheck=atttext;
+
+	atttext=CheckText1.CheckText();
+
+    /* <input x="-23" y="15.5" size="9" rotation="90" rotate="true" text="_" tagg="label"/> */
+
+    xattext=QString::number(attx+0.5,'f',0);
+    yattext=QString::number(atty+0.5,'f',0);
+	hattext=QString::number(attheight,'f',0);
+	rattext=QString::number(attrotation,'f',0);
+
+
+    Lineout="   ";
+    Lineout.append("   ");
+    Lineout.append("   ");
+    Lineout.append("<input x=");
+    Lineout.append(QChar(34));
+    Lineout.append(xattext);
+    Lineout.append(QChar(34));
+
+    Lineout.append(" y=");
+    Lineout.append(QChar(34));
+    Lineout.append(yattext);
+    Lineout.append(QChar(34));
+
+    Lineout.append(" size=");
+    Lineout.append(QChar(34));
+    Lineout.append(hattext);
+    Lineout.append(QChar(34));
+
+    Lineout.append(" rotation=");
+    Lineout.append(QChar(34));
+    Lineout.append(rattext);
+    Lineout.append(QChar(34));
+
+    Lineout.append(" rotate=");
+    Lineout.append(QChar(34));
+    Lineout.append("true");
+    Lineout.append(QChar(34));
+
+
+    Lineout.append(" text=");
+    Lineout.append(QChar(34));
+    Lineout.append(atttext);
+    Lineout.append(QChar(34));
+
+    Lineout.append(" tagg=");
+    Lineout.append(QChar(34));
+    Lineout.append(atttag);
+    Lineout.append(QChar(34));
+
+    Lineout.append(" />");
+    Lineout.append('\n');
+
+    if (Entitieswitch==1)
+    {
+        BlockList[0].BlockDef.append(Lineout);
+
+    }
+	if (Entitieswitch==0)
+	{
+
+		BlockList[BlockCount].BlockDef.append(Lineout);
+	}
+
+    return ;
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_attrib.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_attrib.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_attrib.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,37 @@
+#ifndef DXF_ATTRIB_H
+#define DXF_ATTRIB_H
+
+#include <QtCore>
+#include <dxf_data.h>
+#include "dxf_check_string_chars.h"
+
+class DXF_Attrib: public DXF_Data
+{
+	public:
+
+	int x;
+
+	double attx;
+	double atty;
+	double attheight;
+	double attrotation;
+
+	QString Lineout;
+	QString xattext;
+	QString yattext;
+	QString hattext;
+	QString rattext;
+	QString atttext;
+	QString atttag;
+
+
+
+
+
+	DXF_Attrib();
+
+	void ConvertAttrib(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+
+};
+
+#endif // DXF_ATTRIB_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_block.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_block.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_block.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,146 @@
+#include "dxf_block.h"
+
+DXF_block::DXF_block()
+{
+}
+
+void DXF_block::ConvertBlock(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+	int x;
+
+	for (x=0;x<Counter-1;x++)
+	{
+
+		ControlLine1=LineTable4[x].Line1;
+		ControlLine2=LineTable4[x].Line2;
+
+		if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive) )
+	   {
+			center_x=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			center_y=-(LineTable4[x].Line2.toDouble());
+		}
+
+
+		if (LineTable4[x].Line1.contains("  6", Qt::CaseSensitive))
+		{
+			LineTypeOFLine=LineTable4[x].Line2;
+		}
+
+		if (LineTable4[x].Line1.contains("  8", Qt::CaseSensitive))
+		{
+			LayerNameOFLine=LineTable4[x].Line2;
+		}
+		if (LineTable4[x].Line1.contains("  2", Qt::CaseSensitive))
+		{
+			BlockName=LineTable4[x].Line2;
+		}
+
+
+
+	}
+
+	dxf_check_string_chars BlockNameToCheck;
+
+	BlockNameToCheck.TextToCheck=BlockName;
+
+	BlockName=BlockNameToCheck.CheckText();
+
+
+	BlockList[BlockCount].BlockName=BlockName;
+
+	dxf_elmt_output Load_dxf_output;
+
+	Load_dxf_output.Filename=BlockName;
+
+	BlockNames=Load_dxf_output.elmt_Taal();
+
+
+	Lineout="   ";
+	Lineout.append("<part hotspot_x=");
+	Lineout.append(QChar(34));
+	Lineout.append(QString::number(center_x,'f',2));
+	Lineout.append(QChar(34));
+
+	Lineout.append(" hotspot_y=");
+	Lineout.append(QChar(34));
+	Lineout.append(QString::number(center_y,'f',2));
+	Lineout.append(QChar(34));
+
+
+	Lineout.append(" name=");
+	Lineout.append(QChar(34));
+	Lineout.append(BlockName);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" >");
+	Lineout.append('\n');
+
+	Lineout.append(BlockNames);
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<partdescript>");
+	Lineout.append('\n');
+
+
+
+
+
+
+	if (Entitieswitch==1)
+	{
+		BlockList[0].BlockDef.append(Lineout);
+
+	}
+	if (Entitieswitch==0)
+	{
+
+		BlockList[BlockCount].BlockDef.append(Lineout);
+	}
+
+	return ;
+
+}
+
+
+void DXF_block::ConvertEndBlock(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+
+	Lineout=("   ");
+	Lineout.append("   ");
+	Lineout.append("</partdescript>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("</part>");
+	Lineout.append('\n');
+
+
+
+
+	if (Entitieswitch==1)
+	{
+		BlockList[0].BlockDef.append(Lineout);
+
+	}
+	if (Entitieswitch==0)
+	{
+
+		BlockList[BlockCount].BlockDef.append(Lineout);
+	}
+
+	return ;
+
+
+}
+
+void DXF_block::ConvertBeginParts(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_block.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_block.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_block.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,35 @@
+#ifndef DXF_BLOCK_H
+#define DXF_BLOCK_H
+
+#include <QtCore>
+#include <dxf_data.h>
+#include "dxf_check_ltype.h"
+#include "dxf_ltype.h"
+#include "dxf_elmt_output.h"
+#include "dxf_check_string_chars.h"
+
+class DXF_block: public DXF_Data
+{
+	public:
+
+	double center_x;
+	double center_y;
+
+	QString LineTypeOFLine;
+	QString LayerNameOFLine;
+	QString BlockName;
+	QString BlockHandle;
+
+	QString BlockNames;
+	QString ControlLine1;
+	QString ControlLine2;
+
+
+	DXF_block();
+
+	void ConvertBlock(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+	void ConvertEndBlock(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+	void ConvertBeginParts(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+};
+
+#endif // DXF_BLOCK_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_check_ltype.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_check_ltype.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_check_ltype.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,75 @@
+#include "dxf_check_ltype.h"
+
+dxf_check_ltype::dxf_check_ltype()
+{
+}
+
+QString dxf_check_ltype::Check_LType(_LType_ACAD LTypeDXF[], _Layer_ACAD LayerDXF[])
+{
+
+	if (LType_to_check=="ByLayer")
+	{
+		for(x=0;x<LayerCount+1;x++)
+		{
+			if (LayerDXF[x].LayerName.contains(Layer_name_to_check))
+			{
+				LineStyle1=LayerDXF[x].LayerLineType;
+				x=LayerCount+2;
+
+			}
+			else
+			{
+				LineStyle1="normal";
+			}
+
+		}
+
+
+	}
+	else
+	{
+
+		if (LType_to_check=="")
+		{
+			for(x=0;x<LayerCount+1;x++)
+			{
+				if (LayerDXF[x].LayerName.contains(Layer_name_to_check))
+				{
+					LineStyle1=LayerDXF[x].LayerLineType;
+					x=LayerCount+2;
+
+				}
+				else
+				{
+					LineStyle1="normal";
+				}
+
+			}
+
+		}
+		else
+		{
+			if (LType_to_check=="ByBlock")
+			{
+				LineStyle1="normal";
+
+			}
+			else
+			{
+				LineStyle1=LType_to_check;
+			}
+		}
+	}
+
+
+	DXF_LType LineToCheck;
+
+	CheckLine=LineToCheck.GetLineType(LineStyle1);
+
+
+	return CheckLine;
+
+}
+
+
+

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_check_ltype.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_check_ltype.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_check_ltype.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,26 @@
+#ifndef DXF_CHECK_LTYPE_H
+#define DXF_CHECK_LTYPE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+#include "dxf_ltype.h"
+
+class dxf_check_ltype: public DXF_Data
+{
+	public:
+
+	int x;
+	int LTypeCount;
+	int LayerCount;
+
+	QString LType_to_check;
+	QString Layer_name_to_check;
+	QString CheckLine;
+
+	dxf_check_ltype();
+
+	QString Check_LType(struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200]);
+
+};
+
+#endif // DXF_CHECK_LTYPE_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_check_string_chars.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_check_string_chars.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_check_string_chars.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,58 @@
+#include "dxf_check_string_chars.h"
+
+dxf_check_string_chars::dxf_check_string_chars()
+{
+}
+
+QString dxf_check_string_chars::CheckText()
+{
+
+	if(TextToCheck.contains("<"))
+	{
+		TextToCheck.replace("<","&lt;");
+	}
+	if(TextToCheck.contains(">"))
+	{
+		TextToCheck.replace(">","&gt;");
+	}
+	if(TextToCheck.contains("&"))
+	{
+		TextToCheck.replace("&","&amp;");
+	}
+	if(TextToCheck.contains(QChar(39)))
+	{
+		TextToCheck.replace(QChar(39),"&apos;");
+	}
+	if(TextToCheck.contains(QChar(34)))
+	{
+		TextToCheck.replace(QChar(34),"&quot;");
+	}
+
+	if(TextToCheck.contains("/"))
+	{
+		TextToCheck.replace("/","-");
+	}
+
+	if(TextToCheck.contains(QChar(92)))
+	{
+		TextToCheck.replace(QChar(92),"-");
+	}
+
+	/*if(TextToCheck.contains("*"))
+	{
+		TextToCheck.replace("*","x");
+	}*/
+
+	if(TextToCheck.contains("?"))
+	{
+		TextToCheck.replace("?","...");
+	}
+
+	if(TextToCheck.contains("|"))
+	{
+		TextToCheck.replace("|","-");
+	}
+
+
+	return TextToCheck;
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_check_string_chars.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_check_string_chars.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_check_string_chars.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,19 @@
+#ifndef DXF_CHECK_STRING_CHARS_H
+#define DXF_CHECK_STRING_CHARS_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class dxf_check_string_chars : public DXF_Data
+{
+	public:
+
+	QString TextToCheck;
+
+	dxf_check_string_chars();
+
+	QString CheckText();
+
+};
+
+#endif // DXF_CHECK_STRING_CHARS_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_circle.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_circle.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_circle.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,130 @@
+#include "dxf_circle.h"
+
+DXF_Circle::DXF_Circle()
+{
+
+}
+
+void DXF_Circle::ConvertCircle(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+	int x;
+	int y;
+
+	QString Lineout;
+	QString x_center;
+	QString y_center;
+	QString breedte;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString LineTypeOFLine;
+	QString LayerNameOFLine;
+	QString LineStyle;
+
+
+	double center_x;
+	double center_y;
+	double radius;
+
+
+	for (x=0;x<Counter;x++)
+	{
+		if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive) )
+	   {
+			center_x=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			center_y=-(LineTable4[x].Line2.toDouble());
+		}
+
+		if (LineTable4[x].Line1.contains(" 40", Qt::CaseSensitive))
+		{
+			radius=LineTable4[x].Line2.toDouble();
+		}
+		if (LineTable4[x].Line1.contains("  6", Qt::CaseSensitive))
+		{
+			LineTypeOFLine=LineTable4[x].Line2;
+		}
+
+		if (LineTable4[x].Line1.contains("  8", Qt::CaseSensitive))
+		{
+			LayerNameOFLine=LineTable4[x].Line2;
+		}
+
+
+	}
+
+	dxf_check_ltype Check_LineType;
+
+	Check_LineType.LayerCount=LayerCount1;
+	Check_LineType.LTypeCount=LTypeCount1;
+	Check_LineType.LType_to_check=LineTypeOFLine;
+	Check_LineType.Layer_name_to_check=LayerNameOFLine;
+
+	LineStyle1= Check_LineType.Check_LType(LTypeDXF, LayerDXF);
+
+
+	Lineout="   ";
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<ellipse x=");
+
+	x_center=QString::number ((center_x - radius),'f',2);
+	y_center=QString::number ((center_y - radius),'f',2);
+
+	Lineout.append(QChar(34));
+	Lineout.append(x_center);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y=");
+	Lineout.append(QChar(34));
+	Lineout.append(y_center);
+	Lineout.append(QChar(34));
+
+
+	Lineout.append(" antialias=");
+	Lineout.append(QChar(34));
+	Lineout.append("true");
+	Lineout.append(QChar(34));
+
+	breedte=QString::number (( radius * 2),'f',2);
+
+	Lineout.append(" height=");
+	Lineout.append(QChar(34));
+	Lineout.append(breedte);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" width=");
+	Lineout.append(QChar(34));
+	Lineout.append(breedte);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" style=");
+	Lineout.append(QChar(34));
+	Lineout.append("line-style:");
+	Lineout.append(LineStyle1);
+	Lineout.append(";");
+	Lineout.append("line-weight:thin;");
+	Lineout.append("filling:none;");
+	Lineout.append("color:black");
+	Lineout.append(QChar(34));
+
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+	if (Entitieswitch==1)
+	{
+		BlockList[0].BlockDef.append(Lineout);
+
+	}
+	if (Entitieswitch==0)
+	{
+
+		BlockList[BlockCount].BlockDef.append(Lineout);
+	}
+
+	return ;
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_circle.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_circle.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_circle.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,21 @@
+#ifndef DXF_CIRCLE_H
+#define DXF_CIRCLE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+#include "dxf_check_ltype.h"
+#include "dxf_ltype.h"
+
+class DXF_Circle: public DXF_Data
+{
+	public:
+
+	int LTypeCount1;
+	int LayerCount1;
+
+	DXF_Circle();
+
+	void ConvertCircle(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+};
+
+#endif // DXF_CIRCLE_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_classes.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_classes.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_classes.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,5 @@
+#include "dxf_classes.h"
+
+DXF_Classes::DXF_Classes()
+{
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_classes.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_classes.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_classes.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,10 @@
+#ifndef DXF_CLASSES_H
+#define DXF_CLASSES_H
+
+class DXF_Classes
+{
+	public:
+	DXF_Classes();
+};
+
+#endif // DXF_CLASSES_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_data.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_data.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_data.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,5 @@
+#include "dxf_data.h"
+
+DXF_Data::DXF_Data()
+{
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_data.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_data.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_data.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,118 @@
+#ifndef DXF_DATA_H
+#define DXF_DATA_H
+
+#include <QtCore>
+
+
+class DXF_Data
+{
+	public:
+
+
+	struct _ReadLineDXF
+	{
+		QString Line1;
+		QString Line2;
+	};
+
+	struct _LType_ACAD
+	{
+		QString LTypeHandle;
+		QString LTypeNaam;
+	};
+
+	struct _Layer_ACAD
+	{
+		QString LayerName;
+		QString LayerHandle;
+		QString LayerLineType;
+	};
+
+	struct _PolyTable
+	{
+		QString Line1;
+		QString Line2;
+	};
+
+	struct _SizeSymbol
+	{
+		double DXF_Width;
+		double DXF_Height;
+	};
+
+
+	struct _Block_ACAD
+	{
+		QString BlockName;
+		QString BlockDef;
+		QString BlockHandle;
+
+
+	};
+
+	struct _LType_ACAD LTypeDXF[200];
+	struct _Layer_ACAD LayerDXF[200];
+
+	struct _ReadLineDXF LineTable1[2000];
+	struct _ReadLineDXF LineTable2[2000];
+	struct _ReadLineDXF LineTable3[2000];
+	struct _ReadLineDXF LineTable4[2000];
+	struct _ReadLineDXF LineTable5[2000];
+	struct _ReadLineDXF LineTable6[2000];
+
+	struct _PolyTable PTable[2000];
+
+	struct _Block_ACAD BlockList[2000];
+
+	struct _SizeSymbol SizeSymbol1;
+
+	int LineCount1;
+	int LineCount2;
+	int LineCount3;
+	int LineCount4;
+	int LineCount5;
+	int LineCount6;
+
+	int switch1;
+	int switch2;
+	int switch3;
+	int switch4;
+	int switch5;
+	int switch6;
+	int switch7;
+	int switch8;
+	int switch9;
+	int switch10;
+	int switch11;
+	int switch12;
+	int switch13;
+
+
+
+
+	int BlockCount;
+	int LtypeCount;
+	int LayerCount;
+	int VectorCount;
+
+	double Control2;
+	double Control9;
+	double Control10;
+	double Control11;
+	double Control12;
+	double Control13;
+
+
+	QString LineStyle1;
+
+	QString FileOutputElmt;
+
+	QString Lineout;
+
+
+
+
+	DXF_Data();
+};
+
+#endif // DXF_DATA_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_ellipse.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_ellipse.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_ellipse.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,435 @@
+#include "dxf_ellipse.h"
+
+DXF_Ellipse::DXF_Ellipse()
+{
+}
+
+void DXF_Ellipse::ConvertEllipse(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+	int x;
+	int y;
+
+	QString Lineout;
+	QString x_center;
+	QString y_center;
+	QString breedte;
+	QString hoogte;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString LineTypeOFLine;
+	QString LayerNameOFLine;
+	QString LineStyle;
+	QString BeginHoek;
+	QString Hoek2;
+
+
+	float center_x;
+	float center_y;
+	float major_radius_x;
+	float major_radius_y;
+	float ratio_of_minor;
+	float start;
+	float end;
+	float end2;
+
+	float begin1;
+	float einde1;
+
+	float begin;
+	float einde;
+
+	float hoek;
+
+	float width;
+	float height;
+
+	float N;
+	float O;
+	float J;
+	float K;
+	float L;
+	float M;
+	float R;
+	float S;
+	float T;
+	float U;
+	float V;
+	float W;
+	float hoek2;
+
+
+	float a;
+	float b;
+	float i2;
+	float j2;
+	float Pstart;
+	float Pend2;
+
+	float startcos;
+	float startsin;
+	float endcos;
+	float endsin;
+	float powwidth;
+	float powheight;
+	float sqrtwidth;
+	float sqrtheight;
+
+	float s1;
+	float e1;
+
+
+	a=0;
+	b=0;
+	i2=0;
+	j2=0;
+	Pstart=0;
+	Pend2=0;
+	hoek2=0;
+
+	center_x=0;
+	center_y=0;
+	major_radius_x=0;
+	major_radius_y=0;
+	ratio_of_minor=0;
+	end2=0;
+	start=0;
+
+
+
+	for (x=0;x<Counter;x++)
+	{
+		if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive) )
+	   {
+			center_x=LineTable4[x].Line2.toFloat();
+		}
+
+		if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			center_y=-(LineTable4[x].Line2.toFloat());
+		}
+
+		if (LineTable4[x].Line1.contains(" 11", Qt::CaseSensitive))
+		{
+			major_radius_x=LineTable4[x].Line2.toFloat();
+		}
+		if (LineTable4[x].Line1.contains(" 21", Qt::CaseSensitive))
+		{
+			major_radius_y=-LineTable4[x].Line2.toFloat();
+		}
+
+		if (LineTable4[x].Line1.contains(" 40", Qt::CaseSensitive))
+		{
+			ratio_of_minor=LineTable4[x].Line2.toFloat();
+		}
+		if (LineTable4[x].Line1.contains(" 41", Qt::CaseSensitive))
+		{
+			start=LineTable4[x].Line2.toFloat();
+		}
+		if (LineTable4[x].Line1.contains(" 42", Qt::CaseSensitive))
+		{
+			end2=LineTable4[x].Line2.toFloat();
+			//end=2*end2;
+		}
+
+
+		if (LineTable4[x].Line1.contains("  6", Qt::CaseSensitive))
+		{
+			LineTypeOFLine=LineTable4[x].Line2;
+		}
+
+		if (LineTable4[x].Line1.contains("  8", Qt::CaseSensitive))
+		{
+			LayerNameOFLine=LineTable4[x].Line2;
+		}
+
+
+	}
+
+	dxf_check_ltype Check_LineType;
+
+	Check_LineType.LayerCount=LayerCount1;
+	Check_LineType.LTypeCount=LTypeCount1;
+	Check_LineType.LType_to_check=LineTypeOFLine;
+	Check_LineType.Layer_name_to_check=LayerNameOFLine;
+
+	LineStyle1= Check_LineType.Check_LType(LTypeDXF, LayerDXF);
+
+
+	powwidth=pow((major_radius_x-center_x),2)-pow((major_radius_y-center_y),2);
+	powheight=(pow(((major_radius_x*ratio_of_minor)-center_x),2)-pow(((major_radius_y*ratio_of_minor)-center_y),2)) ;
+
+	if (powwidth<0)
+	{
+		sqrtwidth=sqrt(-powwidth);
+	}
+
+	else
+	{
+		sqrtwidth=sqrt(powwidth);
+	}
+
+	if (powheight<0)
+	{
+		sqrtheight=sqrt(-powheight);
+	}
+
+	else
+	{
+		sqrtheight=sqrt(powheight);
+	}
+
+
+	width=2*sqrtwidth;
+	height=2*sqrtheight;
+
+	a=width/2;
+	b=height/2;
+
+	i2=1;
+	j2=0.1;
+	Pstart=0;
+	Pend2=0;
+
+	startcos=qAcos(start);
+	startsin=qAsin(start);
+	endcos=qCos(end2);
+	endsin=qSin(end2);
+
+	Pstart=((major_radius_x*startcos))+((major_radius_y*startsin));
+
+	Pend2=major_radius_x+a*endcos+b*endsin;
+
+	//begin=Pstart;
+	//hoek=-Pend2;
+
+	/* hoek ACAD omrekenen naar QET */
+
+
+	/*begin1=450-Pstart;
+	einde1=450-Pend2;
+
+
+	if (begin1>360)
+	{
+		begin=begin1-360;
+	}
+	else
+	{
+		if(begin1<0)
+		{
+			begin=360-begin1;
+		}
+		else
+		{
+			begin=begin1;
+		}
+	}
+
+	if (einde1>360)
+	{
+		einde=einde1-360;
+	}
+	else
+	{
+		if (einde1<0)
+		{
+			einde=einde1-360;
+		}
+		else
+		{
+			einde=einde1;
+		}
+	}*/
+
+
+
+	/* calculate hoek */
+
+	/*if (begin>einde)
+	{
+		N=einde-begin;
+	}
+	else
+	{
+		N=einde-begin-360;
+	}
+
+	if (N<0)
+	{
+		O=-N;
+	}
+	else
+	{
+		O=N;
+	}
+
+	//J=end_angle-start_angle+N;
+	//K=360-end_angle;
+	//L=360-start_angle;
+
+	J=Pend2-Pstart+N;
+	K=360-Pend2;
+	L=360-Pstart;
+	M=K-L;
+	R=-O;
+	S=J-O;
+
+	if (S < -360)
+	{
+		T=S+360;
+	}
+	else
+	{
+		T=S;
+	}
+
+	if (begin<einde)
+	{
+		U=M;
+	}
+	else
+	{
+		U=T;
+	}
+
+	if (U<0)
+	{
+		V=-U;
+	}
+	else
+	{
+		V=U;
+	}
+
+	W=U+V;
+
+	if (W==0)
+	{
+		hoek2=-V;
+	}
+	else
+	{
+		hoek2=T;
+	}
+
+	hoek=hoek2;*/
+
+
+	//<arc x="27.00" y="5.40" antialias="false" width="4.20" height="4.20" style="line-style:normal;line-weight:thin;filling:none;color:black" start="30" angle="299" />
+
+	//width=2*(sqrt(pow((major_radius_x-center_x),2)-pow((major_radius_y-center_y),2)));
+	//height=2*(sqrt(pow((major_radius_x-center_x),2)-pow((major_radius_y-center_y),2)) *ratio_of_minor);
+
+
+	x_center=QString::number ((center_x-(width/2) ),'f',2);
+	y_center=QString::number ((center_y-(height/2) ),'f',2);
+
+
+
+	breedte=QString::number (width,'f',2);
+	hoogte=QString::number (height ,'f',2);
+
+	s1=(start/((2*3.15)/360));
+	e1=(end2/((2*3.15)/360));
+
+	//BeginHoek=QString::number ((s1 ),'f',0);
+	BeginHoek=QString::number(Pstart,'f',0);
+	Hoek2=QString::number (-(e1-s1),'f',0);
+
+	if(BeginHoek=="nan")
+	{
+		BeginHoek="0";
+	}
+	if(Hoek2=="nan")
+	{
+		Hoek2="0";
+	}
+	if(x_center=="nan")
+	{
+		x_center="0";
+	}
+	if(y_center=="nan")
+	{
+		y_center="0";
+	}
+	if(hoogte=="nan")
+	{
+		hoogte="0";
+	}
+	if(breedte=="nan")
+	{
+		breedte="0";
+	}
+
+
+	Lineout="   ";
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<arc x=");
+
+	Lineout.append(QChar(34));
+	Lineout.append(x_center);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y=");
+	Lineout.append(QChar(34));
+	Lineout.append(y_center);
+	Lineout.append(QChar(34));
+
+
+	Lineout.append(" antialias=");
+	Lineout.append(QChar(34));
+	Lineout.append("true");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" height=");
+	Lineout.append(QChar(34));
+	Lineout.append(hoogte);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" width=");
+	Lineout.append(QChar(34));
+	Lineout.append(breedte);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" style=");
+	Lineout.append(QChar(34));
+	Lineout.append("line-style:");
+	Lineout.append(LineStyle1);
+	Lineout.append(";");
+	Lineout.append("line-weight:thin;");
+	Lineout.append("filling:none;");
+	Lineout.append("color:black");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" start=");
+	Lineout.append(QChar(34));
+	Lineout.append(BeginHoek);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" angle=");
+	Lineout.append(QChar(34));
+	Lineout.append(Hoek2);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+	if (Entitieswitch==1)
+	{
+		BlockList[0].BlockDef.append(Lineout);
+
+	}
+	if (Entitieswitch==0)
+	{
+
+		BlockList[BlockCount].BlockDef.append(Lineout);
+	}
+
+	return ;
+
+
+
+
+
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_ellipse.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_ellipse.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_ellipse.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,22 @@
+#ifndef DXF_ELLIPSE_H
+#define DXF_ELLIPSE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+#include "dxf_check_ltype.h"
+#include "dxf_ltype.h"
+
+class DXF_Ellipse: public DXF_Data
+{
+	public:
+
+
+	int LTypeCount1;
+	int LayerCount1;
+
+	DXF_Ellipse();
+
+	void ConvertEllipse(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+};
+
+#endif // DXF_ELLIPSE_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_elmt_output.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_elmt_output.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_elmt_output.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,431 @@
+#include "dxf_elmt_output.h"
+
+dxf_elmt_output::dxf_elmt_output()
+{
+}
+
+QString dxf_elmt_output::elmt(int BlockCount, int Flag, struct _Block_ACAD BlockList[], QString Filename1)
+{
+	Filename=Filename1;
+
+	ResultElmt = elmt_Begin();
+
+	ResultElmt.append(elmt_Taal());
+
+	ResultElmt.append(elmt_Info());
+
+	ResultElmt.append(BlockList[0].BlockDef);
+
+	ResultElmt.append(elmt_Einde());
+
+	ResultElmt.append(elmt_BlockCreationBegin(BlockCount,Flag,BlockList,Filename1));
+
+	ResultElmt.append(elmt_BlockCreation(BlockCount,Flag,BlockList,Filename1));
+
+	ResultElmt2=elmt_BlockCreationEinde(BlockCount,Flag,BlockList,Filename1);
+
+	ResultElmt.append(elmt_Eof());
+
+	return ResultElmt;
+}
+
+QString dxf_elmt_output::elmt_Begin()
+{
+
+
+	xwidth1=x2-x1;
+	xheight1=y2-y1;
+	width1=QString::number (xwidth1,'f',2);
+	height1=QString::number (xheight1,'f',2);
+
+	/* definition */
+	Lineout="<definition";
+
+	Lineout.append(" width=");
+	Lineout.append(QChar(34));
+	Lineout.append(width1);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" height=");
+	Lineout.append(QChar(34));
+	Lineout.append(height1);
+	Lineout.append(QChar(34));
+
+
+	Lineout.append(" version=");
+	Lineout.append(QChar(34));
+	Lineout.append("0.4");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" hotspot_x=");
+	Lineout.append(QChar(34));
+	Lineout.append("5");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" hotspot_y=");
+	Lineout.append(QChar(34));
+	Lineout.append("5");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" type=");
+	Lineout.append(QChar(34));
+	Lineout.append("element");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" orientation=");
+	Lineout.append(QChar(34));
+	Lineout.append("dyyy");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" ic=");
+	Lineout.append(QChar(34));
+	Lineout.append("true");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" lin_type=");
+	Lineout.append(QChar(34));
+	Lineout.append("simple");
+	Lineout.append(QChar(34));
+
+	Lineout.append(">");
+	Lineout.append('\n');
+
+
+	return Lineout;
+}
+
+QString dxf_elmt_output::elmt_Einde()
+{
+	Lineout="   ";
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<terminal x=");
+
+	Lineout.append(QChar(34));
+	Lineout.append("0");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y=");
+
+	Lineout.append(QChar(34));
+	Lineout.append("0");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" orientation=");
+
+	Lineout.append(QChar(34));
+	Lineout.append("n");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("</description>");
+	Lineout.append('\n');
+
+
+	return Lineout;
+}
+
+QString dxf_elmt_output::elmt_Eof()
+{
+	Lineout.append("</definition>");
+
+	Lineout.append('\n');
+
+	return Lineout;
+}
+
+QString dxf_elmt_output::elmt_Info()
+{
+
+	Lineout="   ";
+	Lineout.append("<informations>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("Author convertor: Ronny Desmedt");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("ELMT created by dxfTOelmt converter V1.0");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("</informations>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("<description>");
+	Lineout.append('\n');
+
+
+	return Lineout;
+}
+
+
+QString dxf_elmt_output::elmt_Taal()
+{
+
+	Lineout="   ";
+	Lineout.append("   ");
+	Lineout.append("<names>");
+	Lineout.append('\n');
+
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("fr");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("en");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("be");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("nl");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("hr");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("pl");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("it");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("sl");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("ca");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("pt");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("el");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("de");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("es");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("cs");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("ro");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("ru");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<name lang=");
+	Lineout.append(QChar(34));
+	Lineout.append("ar");
+	Lineout.append(QChar(34));
+	Lineout.append(">");
+	Lineout.append(Filename);
+	Lineout.append("</name>");
+	Lineout.append('\n');
+
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("</names>");
+	Lineout.append('\n');
+
+
+	return Lineout;
+}
+
+
+QString dxf_elmt_output::elmt_BlockCreation(int BlockCount, int Flag, struct _Block_ACAD BlockList[], QString Filename1)
+{
+
+	int x;
+	Lineout="";
+
+	for(x=1;x<BlockCount;x++)
+	{
+
+		Lineout.append(BlockList[x].BlockDef);
+
+
+	}
+
+	return Lineout;
+}
+
+QString dxf_elmt_output::elmt_BlockCreationBegin(int BlockCount, int Flag, struct _Block_ACAD BlockList[], QString Filename1)
+{
+
+	Lineout="";
+	Lineout.append("<parts>");
+	Lineout.append('\n');
+
+	return Lineout;
+}
+
+QString dxf_elmt_output::elmt_BlockCreationEinde(int BlockCount, int Flag, struct _Block_ACAD BlockList[], QString Filename1)
+{
+
+
+
+	Lineout="</parts>";
+	Lineout.append('\n');
+
+
+	return Lineout;
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_elmt_output.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_elmt_output.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_elmt_output.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,44 @@
+#ifndef DXF_ELMT_OUTPUT_H
+#define DXF_ELMT_OUTPUT_H
+
+#include <QtCore>
+#include "dxf_data.h"
+#include "ui_mainwindow.h"
+
+class dxf_elmt_output: public DXF_Data
+{
+	public:
+
+	double x1;
+	double x2;
+	double y1;
+	double y2;
+	double xwidth1;
+	double xheight1;
+
+	QString width1;
+	QString height1;
+
+	QString ResultElmt;
+	QString ResultElmt2;
+	QString Filename;
+
+
+
+
+	dxf_elmt_output();
+
+	QString elmt(int BlockCount, int Flag, struct _Block_ACAD BlockList[2000], QString Filename1);
+	QString elmt_Begin();
+	QString elmt_Einde();
+	QString elmt_Eof();
+	QString elmt_Taal();
+	QString elmt_Info();
+	QString elmt_BlockCreation(int BlockCount, int Flag, struct _Block_ACAD BlockList[2000], QString Filename1);
+	QString elmt_BlockCreationBegin(int BlockCount, int Flag, struct _Block_ACAD BlockList[2000], QString Filename1);
+
+	QString elmt_BlockCreationEinde(int BlockCount, int Flag, struct _Block_ACAD BlockList[2000], QString Filename1);
+
+};
+
+#endif // DXF_ELMT_OUTPUT_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_header.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_header.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_header.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,70 @@
+#include "dxf_header.h"
+
+DXF_Header::DXF_Header()
+{
+
+
+}
+
+void DXF_Header::GetDXFvar(int Counter, _ReadLineDXF LineTable1[], _SizeSymbol *SizeSymbol1)
+{
+	int x;
+
+	double x1;
+	double x2;
+	double y1;
+	double y2;
+
+	int switch1;
+
+	for (x=1;x<Counter-1;x++)
+	{
+
+		if ((LineTable1[x].Line1.contains(" 9", Qt::CaseSensitive)) and (LineTable1[x].Line2.contains("$LIMMIN", Qt::CaseSensitive)) )
+		{
+			switch1=false;
+			while (switch1==false)
+			{
+				x=x+1;
+				if ((LineTable1[x].Line1.contains(" 10", Qt::CaseSensitive)) )
+				{
+					x1=	LineTable1[x].Line2.toDouble();
+
+				}
+				if ((LineTable1[x].Line1.contains(" 20", Qt::CaseSensitive)) )
+				{
+					y1=	LineTable1[x].Line2.toDouble();
+					switch1=true;
+				}
+			}
+
+
+
+		}
+		if ((LineTable1[x].Line1.contains(" 9", Qt::CaseSensitive)) and (LineTable1[x].Line2.contains("$LIMMAX", Qt::CaseSensitive)) )
+		{
+			switch1=false;
+			while (switch1==false)
+			{
+				x=x+1;
+				if ((LineTable1[x].Line1.contains(" 10", Qt::CaseSensitive)) )
+				{
+					x2=	LineTable1[x].Line2.toDouble();
+
+				}
+				if ((LineTable1[x].Line1.contains(" 20", Qt::CaseSensitive)) )
+				{
+					y2=	LineTable1[x].Line2.toDouble();
+					switch1=true;
+				}
+			}
+
+		}
+
+	}
+
+	SizeSymbol1->DXF_Height=(y2-y1);
+	SizeSymbol1->DXF_Width=(x2-x1);
+
+	return;
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_header.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_header.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_header.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,18 @@
+#ifndef DXF_HEADER_H
+#define DXF_HEADER_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Header : public DXF_Data
+{
+	public:
+
+
+
+	DXF_Header();
+
+	void GetDXFvar (int Counter, struct _ReadLineDXF LineTable1[2000], struct _SizeSymbol *SizeSymbol1);
+};
+
+#endif // DXF_HEADER_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_insert.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_insert.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_insert.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,96 @@
+#include "dxf_insert.h"
+
+DXF_Insert::DXF_Insert()
+{
+}
+
+void DXF_Insert::ConvertInsert(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+	int x;
+	int y;
+
+	QString Lineout;
+	QString x_center;
+	QString y_center;
+	QString part_name;
+	QString rotation1;
+
+	double center_x;
+	double center_y;
+	double rotation;
+
+
+	for (x=0;x<Counter;x++)
+	{
+		if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive) )
+	   {
+			center_x=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			center_y=-(LineTable4[x].Line2.toDouble());
+		}
+
+		if (LineTable4[x].Line1.contains("  2", Qt::CaseSensitive))
+		{
+			part_name=LineTable4[x].Line2;
+		}
+		if (LineTable4[x].Line1.contains(" 50", Qt::CaseSensitive))
+		{
+			rotation=LineTable4[x].Line2.toDouble();
+		}
+
+
+	}
+
+	x_center=QString::number ((center_x ),'f',2);
+	y_center=QString::number ((center_y ),'f',2);
+	rotation1=QString::number ((rotation),'f',0);
+
+	Lineout="   ";
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<insertpart x=");
+
+	Lineout.append(QChar(34));
+	Lineout.append(x_center);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y=");
+	Lineout.append(QChar(34));
+	Lineout.append(y_center);
+	Lineout.append(QChar(34));
+
+
+	Lineout.append(" name=");
+	Lineout.append(QChar(34));
+	Lineout.append(part_name);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" rotation=");
+	Lineout.append(QChar(34));
+	Lineout.append(rotation1);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+	if (Entitieswitch==1)
+	{
+		BlockList[0].BlockDef.append(Lineout);
+
+	}
+	if (Entitieswitch==0)
+	{
+
+		BlockList[BlockCount].BlockDef.append(Lineout);
+	}
+
+	return ;
+
+
+
+
+
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_insert.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_insert.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_insert.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,19 @@
+#ifndef DXF_INSERT_H
+#define DXF_INSERT_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Insert: public DXF_Data
+{
+	public:
+
+	int LTypeCount1;
+	int LayerCount1;
+
+	DXF_Insert();
+
+	void ConvertInsert(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+};
+
+#endif // DXF_INSERT_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_layer.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_layer.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_layer.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,93 @@
+#include "dxf_layer.h"
+
+DXF_Layer::DXF_Layer()
+{
+}
+
+int DXF_Layer::LoadLayerTable (int Counter, _ReadLineDXF LineTable3[],struct _Layer_ACAD LayerDXF[])
+{
+	int x;
+	int x2;
+
+
+	x2=1;
+	switch5=0;
+
+	for (x=1;x<Counter-1;x++)
+	{
+		if (x==Counter-1)
+		{
+			break;
+		}
+
+		switch5 = ((LineTable3[x].Line1.contains(" 0", Qt::CaseSensitive)) and (LineTable3[x].Line2.contains("LAYER", Qt::CaseSensitive)));
+
+
+		if ((switch5==true) and (x<=Counter-1))
+		{
+			switch5=false;
+			switch6=false;
+			x=x+1;
+
+			while((switch5==false)and (x<=Counter-1))
+			{
+
+
+					if ((LineTable3[x].Line1.contains(" 5", Qt::CaseSensitive)) )
+					{
+						LayerDXF[x2].LayerHandle=LineTable3[x].Line2;
+						switch6=true;
+
+					}
+					if ((LineTable3[x].Line1.contains(" 2", Qt::CaseSensitive)) )
+					{
+						LayerDXF[x2].LayerName =	LineTable3[x].Line2;
+						switch6=true;
+
+					}
+					if ((LineTable3[x].Line1.contains(" 6", Qt::CaseSensitive)) )
+					{
+						LayerDXF[x2].LayerLineType=	LineTable3[x].Line2;
+						switch6=true;
+
+					}
+
+					x=x+1;
+					//switch5 = ((LineTable3[x].Line1.contains(" 0", Qt::CaseSensitive)) and (LineTable3[x].Line2.contains("LAYER", Qt::CaseSensitive)));
+
+					if (x==Counter-1)
+					{
+						switch5=true;
+
+						break;
+					}
+					else
+					{
+						switch5 = ((LineTable3[x].Line1.contains(" 0", Qt::CaseSensitive)) and (LineTable3[x].Line2.contains("LAYER", Qt::CaseSensitive)));
+
+					}
+
+			}
+
+			if (switch6==true)
+			{
+				x2=x2+1;
+				switch6=false;
+				if (x==Counter-1)
+				{
+					switch5=true;
+
+					break;
+				}
+			}
+		}
+		if (x==Counter-1)
+		{
+			switch5=true;
+
+			break;
+		}
+
+	}
+	return x2;
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_layer.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_layer.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_layer.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,15 @@
+#ifndef DXF_LAYER_H
+#define DXF_LAYER_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Layer : public DXF_Data
+{
+	public:
+	DXF_Layer();
+
+	int LoadLayerTable (int Counter, struct _ReadLineDXF LineTable3[2000], struct _Layer_ACAD LayerDXF[200]);
+};
+
+#endif // DXF_LAYER_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_line.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_line.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_line.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,150 @@
+#include "dxf_line.h"
+
+
+
+DXF_Line::DXF_Line ()
+{
+
+}
+
+void DXF_Line::ConvertLine (int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+	//DXF_LType LType1;
+
+	int x;
+	int y;
+
+
+	LineStyle1="normal";
+
+
+
+	for (x=0;x<Counter;x++)
+	{
+
+		if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive))
+	   {
+			lijn_x1=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			lijn_y1=-(LineTable4[x].Line2.toDouble());
+		}
+
+		if (LineTable4[x].Line1.contains(" 11", Qt::CaseSensitive))
+	   {
+			lijn_x2=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 21", Qt::CaseSensitive))
+		{
+			lijn_y2=-LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains("  6", Qt::CaseSensitive))
+		{
+			LineTypeOFLine=LineTable4[x].Line2;
+		}
+
+		if (LineTable4[x].Line1.contains("  8", Qt::CaseSensitive))
+		{
+			LayerNameOFLine=LineTable4[x].Line2;
+		}
+
+	}
+
+	dxf_check_ltype Check_LineType;
+
+	Check_LineType.LayerCount=LayerCount1;
+	Check_LineType.LTypeCount=LTypeCount1;
+	Check_LineType.LType_to_check=LineTypeOFLine;
+	Check_LineType.Layer_name_to_check=LayerNameOFLine;
+
+	LineStyle1= Check_LineType.Check_LType(LTypeDXF, LayerDXF);
+
+
+
+
+
+
+	/* create qet elmt code */
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<line lenght1=");
+	Lineout.append(QChar(34));
+	Lineout.append("1.5");
+	Lineout.append(QChar(34));
+	Lineout.append(" lenght2=");
+	Lineout.append(QChar(34));
+	Lineout.append("1.5");
+	Lineout.append(QChar(34));
+	Lineout.append(" antialias=");
+	Lineout.append(QChar(34));
+	Lineout.append("false");
+	Lineout.append(QChar(34));
+	Lineout.append(" end1=");
+	Lineout.append(QChar(34));
+	Lineout.append("none");
+	Lineout.append(QChar(34));
+	Lineout.append(" end2=");
+	Lineout.append(QChar(34));
+	Lineout.append("none");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" style=");
+	Lineout.append(QChar(34));
+	Lineout.append("line-style:");
+	Lineout.append(LineStyle1);
+	Lineout.append(";");
+	Lineout.append("line-weight:thin;");
+	Lineout.append("filling:none;");
+	Lineout.append("color:black");
+	Lineout.append(QChar(34));
+
+
+	line_x1=QString::number (lijn_x1,'f',2);
+	line_y1=QString::number (lijn_y1,'f',2);
+	line_x2=QString::number (lijn_x2,'f',2);
+	line_y2=QString::number (lijn_y2,'f',2);
+
+	Lineout.append(" x1=");
+	Lineout.append(QChar(34));
+	Lineout.append(line_x1);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y1=");
+	Lineout.append(QChar(34));
+	Lineout.append(line_y1);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" x2=");
+	Lineout.append(QChar(34));
+	Lineout.append(line_x2);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y2=");
+	Lineout.append(QChar(34));
+	Lineout.append(line_y2);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+
+	if (Entitieswitch==1)
+	{
+		BlockList[0].BlockDef.append(Lineout);
+
+	}
+	if (Entitieswitch==0)
+	{
+
+		BlockList[BlockCount].BlockDef.append(Lineout);
+	}
+	return ;
+
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_line.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_line.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_line.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,45 @@
+#ifndef DXF_LINE_H
+#define DXF_LINE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+#include "dxf_check_ltype.h"
+#include "dxf_ltype.h"
+
+
+
+
+class DXF_Line : public DXF_Data
+{
+	public:
+
+	int LineCount;
+	int LTypeCount1;
+	int LayerCount1;
+	int Entities1;
+
+	double lijn_x1;
+	double lijn_x2;
+	double lijn_y1;
+	double lijn_y2;
+
+
+	QString line_x1;
+	QString line_y1;
+	QString line_x2;
+	QString line_y2;
+
+	QString Lineout;
+
+	QString LineTypeOFLine;
+	QString LayerNameOFLine;
+
+
+
+	DXF_Line();
+
+	void ConvertLine (int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+
+};
+
+#endif // DXF_LINE_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_ltype.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_ltype.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_ltype.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,214 @@
+#include "dxf_ltype.h"
+
+DXF_LType::DXF_LType()
+{
+
+
+}
+
+int DXF_LType::LoadLTypeTable(int Counter, struct _ReadLineDXF LineTable2[], _LType_ACAD LTypeDXF[])
+{
+	int x;
+	int x2;
+
+	x=0;
+	x2=1;
+	switch7=0;
+
+
+	for (x=1;x<(Counter-1);x++)
+	{
+		if (x==Counter-1)
+		{
+			break;
+		}
+		switch7 = ((LineTable2[x].Line1.contains(" 0", Qt::CaseSensitive)) and (LineTable2[x].Line2.contains("LTYPE", Qt::CaseSensitive)));
+		//x=x+1;
+
+		if ((switch7==true) and (x<=(Counter-1)))
+		{
+
+			switch7=false;
+			switch8=false;
+			x=x+1;
+
+			while ((switch7==false)and (x<=Counter-1))
+			{
+
+				if (LineTable2[x].Line1.contains(" 5", Qt::CaseSensitive))
+				{
+					LTypeDXF[x2].LTypeHandle=LineTable2[x].Line2;
+					switch8=true;
+
+				}
+				if (LineTable2[x].Line1.contains(" 2", Qt::CaseSensitive))
+				{
+					LTypeDXF[x2].LTypeNaam =	LineTable2[x].Line2;
+					switch8=true;
+
+				}
+
+				x=x+1;
+
+				if (x==Counter-1)
+				{
+					switch7=true;
+
+					break;
+				}
+				else
+				{
+					switch7 = ((LineTable2[x].Line1.contains(" 0", Qt::CaseSensitive)) and (LineTable2[x].Line2.contains("LTYPE", Qt::CaseSensitive)));
+
+				}
+			}
+			if (switch8==true)
+			{
+				x2=x2+1;
+				switch8=false;
+				if (x==Counter-1)
+				{
+					switch7=true;
+
+					break;
+				}
+			}
+
+		}
+
+		if (x==Counter-1)
+		{
+			switch7=true;
+
+			break;
+		}
+	}
+	return x2;
+}
+
+QString DXF_LType::GetLineType (QString FindLT)
+{
+
+	if (FindLT == "ByLayer" )
+	{
+	   LTfound="normal";
+	}
+
+	if (FindLT == "ByBlock" )
+	{
+	   LTfound="normal";
+	}
+
+	if (FindLT == "Continuous" )
+	{
+	   LTfound="normal";
+	}
+
+	if (FindLT == "CONTINUOUS" )
+	{
+	   LTfound="normal";
+	}
+
+	if (FindLT == "Center" )
+	{
+	   LTfound="dashdotted";
+	}
+
+	if (FindLT == "CENTER" )
+	{
+	   LTfound="dashdotted";
+	}
+
+	if (FindLT == "CENTER2" )
+	{
+	   LTfound="dashdotted";
+	}
+
+	if (FindLT == "CENTERX2" )
+	{
+	   LTfound="dashdotted";
+	}
+
+
+	if (FindLT == "Dashed" )
+	{
+	   LTfound="dashed";
+	}
+
+	if (FindLT == "DASHED" )
+	{
+	   LTfound="dashed";
+	}
+
+	if (FindLT == "DASHED2" )
+	{
+	   LTfound="dashed";
+	}
+
+	if (FindLT == "DASHEDX2" )
+	{
+	   LTfound="dashed";
+	}
+
+
+	if (FindLT == "HIDDEN" )
+	{
+	   LTfound="dashed";
+	}
+
+	if (FindLT == "HIDDEN2" )
+	{
+	   LTfound="dashed";
+	}
+
+	if (FindLT == "HIDDENX2" )
+	{
+	   LTfound="dashed";
+	}
+
+	if (FindLT == "EPL_DASH" )
+	{
+	   LTfound="dashed";
+	}
+
+	if (FindLT == "EPL_DASH2" )
+	{
+	   LTfound="dashed";
+	}
+
+	if (FindLT == "EPL_DASHDOT" )
+	{
+	   LTfound="dashdotted";
+	}
+
+	if (FindLT == "EPL_DASHDOTDOT" )
+	{
+	   LTfound="dashdotted";
+	}
+
+	if (FindLT == "DASHDOT" )
+	{
+	   LTfound="dashdotted";
+	}
+
+	if (FindLT == "DASHDOT2" )
+	{
+	   LTfound="dashdotted";
+	}
+
+	if (FindLT == "DASHDOTX2" )
+	{
+	   LTfound="dashdotted";
+	}
+	if (FindLT == "normal" )
+	{
+	   LTfound="normal";
+	}
+	if(FindLT=="")
+	{
+		LTfound="normal";
+	}
+
+
+	return LTfound;
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_ltype.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_ltype.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_ltype.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,24 @@
+#ifndef DXF_LTYPE_H
+#define DXF_LTYPE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_LType : public DXF_Data
+{
+	public:
+
+	//friend class dxf_data;
+
+	QString FindLT;
+	QString LTfound;
+
+	DXF_LType();
+
+	QString GetLineType (QString FindLT);
+
+	int LoadLTypeTable (int Counter, struct _ReadLineDXF LineTable2[2000],struct _LType_ACAD LTypeDXF[200]);
+
+};
+
+#endif // DXF_LTYPE_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_lwpolyline.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_lwpolyline.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_lwpolyline.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,5 @@
+#include "dxf_lwpolyline.h"
+
+DXF_Lwpolyline::DXF_Lwpolyline()
+{
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_lwpolyline.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_lwpolyline.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_lwpolyline.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,13 @@
+#ifndef DXF_LWPOLYLINE_H
+#define DXF_LWPOLYLINE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Lwpolyline: public DXF_Data
+{
+	public:
+	DXF_Lwpolyline();
+};
+
+#endif // DXF_LWPOLYLINE_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_mline.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_mline.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_mline.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,5 @@
+#include "dxf_mline.h"
+
+DXF_Mline::DXF_Mline()
+{
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_mline.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_mline.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_mline.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,13 @@
+#ifndef DXF_MLINE_H
+#define DXF_MLINE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Mline: public DXF_Data
+{
+	public:
+	DXF_Mline();
+};
+
+#endif // DXF_MLINE_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_mtext.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_mtext.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_mtext.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,111 @@
+#include "dxf_mtext.h"
+
+DXF_Mtext::DXF_Mtext()
+{
+}
+
+void DXF_Mtext::ConvertMtext (int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+		int x;
+
+
+	for (x=0;x<Counter;x++)
+	{
+		if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive) )
+	   {
+			tx=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			ty=-(LineTable4[x].Line2.toDouble());
+		}
+
+		if (LineTable4[x].Line1.contains(" 40", Qt::CaseSensitive))
+		{
+			theight=LineTable4[x].Line2.toDouble();
+		}
+
+
+		if (LineTable4[x].Line1.contains(" 50", Qt::CaseSensitive))
+		{
+			trotation=LineTable4[x].Line2.toDouble();
+		}
+
+
+		if (LineTable4[x].Line1.contains("  1", Qt::CaseSensitive))
+		{
+			ttext=LineTable4[x].Line2;
+		}
+
+
+	}
+
+
+	dxf_check_string_chars CheckText1;
+
+	CheckText1.TextToCheck=ttext;
+
+	ttext=CheckText1.CheckText();
+
+	/* <text x="-29" y="-8" size="9" rotation="270" text="Test"/> */
+
+
+	xtext=QString::number(tx+0.5,'f',0);
+	ytext=QString::number(ty+0.5,'f',0);
+	htext=QString::number(theight,'f',0);
+	rtext=QString::number(trotation,'f',0);
+
+	/* create qet elmt code */
+
+	Lineout=("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<text x=");
+	Lineout.append(QChar(34));
+	Lineout.append(xtext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y=");
+	Lineout.append(QChar(34));
+	Lineout.append(ytext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" size=");
+	Lineout.append(QChar(34));
+	Lineout.append(htext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" rotation=");
+	Lineout.append(QChar(34));
+	Lineout.append(rtext);
+	Lineout.append(QChar(34));
+
+	//ttext = ControlText (ttext);
+
+	Lineout.append(" text=");
+	Lineout.append(QChar(34));
+	Lineout.append(ttext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+
+
+
+
+	if (Entitieswitch==1)
+	{
+		BlockList[0].BlockDef.append(Lineout);
+
+	}
+	if (Entitieswitch==0)
+	{
+
+		BlockList[BlockCount].BlockDef.append(Lineout);
+	}
+
+	return ;
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_mtext.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_mtext.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_mtext.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,32 @@
+#ifndef DXF_MTEXT_H
+#define DXF_MTEXT_H
+
+#include <QtCore>
+#include <dxf_data.h>
+#include "dxf_check_string_chars.h"
+
+class DXF_Mtext: public DXF_Data
+{
+	public:
+
+	int LTypeCount1;
+	int LayerCount1;
+
+	QString ttext;
+	QString xtext; // x-coord
+	QString ytext; // y-coord
+	QString htext; // height
+	QString rtext; // rotation
+
+	double tx;
+	double ty;
+	double theight;
+	double trotation;
+	double tscale;
+
+	DXF_Mtext();
+
+	void ConvertMtext(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+};
+
+#endif // DXF_MTEXT_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_point.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_point.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_point.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,107 @@
+#include "dxf_point.h"
+
+DXF_Point::DXF_Point()
+{
+}
+
+void DXF_Point::ConvertPoint (int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+	int x;
+
+	for (x=0;x<Counter;x++)
+	{
+
+		if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive))
+	   {
+			lijn_x1=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			lijn_y1=-(LineTable4[x].Line2.toDouble());
+		}
+
+		/*if (LineTable4[x].Line1.contains(" 11", Qt::CaseSensitive))
+	   {
+			lijn_x2=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 21", Qt::CaseSensitive))
+		{
+			lijn_y2=-LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains("  6", Qt::CaseSensitive))
+		{
+			LineTypeOFLine=LineTable4[x].Line2;
+		}
+
+		if (LineTable4[x].Line1.contains("  8", Qt::CaseSensitive))
+		{
+			LayerNameOFLine=LineTable4[x].Line2;
+		}*/
+
+	}
+
+	if (lijn_x1>0 and lijn_y1<0)
+	{
+		PointOrient="n";
+	}
+
+	if (lijn_x1>0 and lijn_y1>0)
+	{
+		PointOrient="o";
+	}
+
+
+	if (lijn_x1<0 and lijn_y1>0)
+	{
+		PointOrient="s";
+	}
+
+
+	if (lijn_x1<0 and lijn_y1<0)
+	{
+		PointOrient="w";
+	}
+
+
+	Lineout="   ";
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<terminal x=");
+
+	Lineout.append(QChar(34));
+	Lineout.append(QString::number (lijn_x1,'f',2));
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y=");
+
+	Lineout.append(QChar(34));
+	Lineout.append(QString::number (lijn_y1,'f',2));
+	Lineout.append(QChar(34));
+
+	Lineout.append(" orientation=");
+
+	Lineout.append(QChar(34));
+	Lineout.append(PointOrient);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+	if (Entitieswitch==1)
+	{
+		BlockList[0].BlockDef.append(Lineout);
+
+	}
+	if (Entitieswitch==0)
+	{
+
+		BlockList[BlockCount].BlockDef.append(Lineout);
+	}
+
+	return ;
+
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_point.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_point.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_point.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,38 @@
+#ifndef DXF_POINT_H
+#define DXF_POINT_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Point: public DXF_Data
+{
+	public:
+
+	int LineCount;
+	int LTypeCount1;
+	int LayerCount1;
+	int Entities1;
+
+	double lijn_x1;
+	double lijn_x2;
+	double lijn_y1;
+	double lijn_y2;
+
+
+	QString line_x1;
+	QString line_y1;
+	QString line_x2;
+	QString line_y2;
+
+	QString Lineout;
+
+	QString LineTypeOFLine;
+	QString LayerNameOFLine;
+	QString PointOrient;
+
+	DXF_Point();
+
+	void ConvertPoint (int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+};
+
+#endif // DXF_POINT_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_polyline.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_polyline.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_polyline.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,184 @@
+#include "dxf_polyline.h"
+
+DXF_Polyline::DXF_Polyline()
+{
+}
+
+void DXF_Polyline::PolyLineBegin(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+	int x;
+	int check;
+	Polyclose=0;
+
+	for (x=0;x<Counter;x++)
+	{
+
+		check=LineTable4[x].Line1.toInt();
+		if (LineTable4[x].Line1.contains(" 70"))
+		{
+			 Polyclose=LineTable4[x].Line2.toDouble();
+
+		}
+
+		if (LineTable4[x].Line1.contains(" 10"))
+		{
+			 Polyx=LineTable4[x].Line2.toDouble();
+			 startx=QString::number(Polyx,'f',2);
+
+		 }
+
+		 if (LineTable4[x].Line1.contains(" 20") )
+		 {
+			 Polyy=-LineTable4[x].Line2.toDouble();
+			 starty=QString::number(Polyy,'f',2);
+		 }
+
+
+
+
+	}
+
+	Lineout=("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<polygon");
+
+	if (Polyclose==1)
+	{
+		Pclose="true";
+	}
+	else
+	{
+		Pclose="false";
+	}
+
+	Lineout.append(" closed=");
+	Lineout.append(QChar(34));
+	Lineout.append(Pclose);
+	Lineout.append(QChar(34));
+
+	if (Entitieswitch==1)
+	{
+		BlockList[0].BlockDef.append(Lineout);
+
+	}
+	if (Entitieswitch==0)
+	{
+
+		BlockList[BlockCount].BlockDef.append(Lineout);
+	}
+
+
+	return ;
+}
+
+void DXF_Polyline::PolyLineVector(int Vector, int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+	int x;
+
+	for (x=0;x<Counter;x++)
+	{
+
+
+		if (LineTable4[x].Line1.contains(" 70"))
+		{
+			 Polyclose=LineTable4[x].Line2.toDouble();
+
+		}
+
+		if (LineTable4[x].Line1.contains(" 10"))
+		{
+			 Polyx=LineTable4[x].Line2.toDouble();
+			 startx=QString::number(Polyx,'f',2);
+
+		 }
+
+		 if (LineTable4[x].Line1.contains(" 20") )
+		 {
+			 Polyy=-LineTable4[x].Line2.toDouble();
+			 starty=QString::number(Polyy,'f',2);
+		 }
+
+
+
+
+	}
+
+	Lineout=(" x");
+	Lineout.append(QString::number( Vector));
+	Lineout.append("=");
+
+
+
+	Lineout.append(QChar(34));
+	Lineout.append(startx);
+	Lineout.append(QChar(34));
+
+
+
+
+
+	Lineout.append(" y");
+	Lineout.append(QString::number(Vector));
+	Lineout.append("=");
+
+
+
+	Lineout.append(QChar(34));
+	Lineout.append(starty);
+	Lineout.append(QChar(34));
+
+
+
+	if (Entitieswitch==1)
+	{
+		BlockList[0].BlockDef.append(Lineout);
+
+	}
+	if (Entitieswitch==0)
+	{
+
+		BlockList[BlockCount].BlockDef.append(Lineout);
+	}
+
+
+	return ;
+
+
+
+}
+
+void DXF_Polyline::PolyLineEnd(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+
+
+	Lineout=(" antialias=");
+	Lineout.append(QChar(34));
+	Lineout.append("false");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" style=");
+	Lineout.append(QChar(34));
+	Lineout.append("line-style:normal;line-weight:thin;filling:none;color:black");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+
+	if (Entitieswitch==1)
+	{
+		BlockList[0].BlockDef.append(Lineout);
+
+	}
+	if (Entitieswitch==0)
+	{
+
+		BlockList[BlockCount].BlockDef.append(Lineout);
+	}
+
+	return;
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_polyline.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_polyline.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_polyline.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,33 @@
+#ifndef DXF_POLYLINE_H
+#define DXF_POLYLINE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Polyline: public DXF_Data
+{
+	public:
+
+	QString Lineout;
+	QString width1;
+	QString height1;
+	QString startx;
+	QString starty;
+	QString Pclose;
+
+	double Polyx;
+	double Polyy;
+	double Polyclose;
+
+
+
+
+	DXF_Polyline();
+
+	void PolyLineBegin(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+	void PolyLineVector(int Vector,int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+	void PolyLineEnd(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+
+};
+
+#endif // DXF_POLYLINE_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_solid.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_solid.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_solid.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,168 @@
+#include "dxf_solid.h"
+
+DXF_solid::DXF_solid()
+{
+}
+
+void DXF_solid::ConvertSolid (int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+	int x;
+	int y;
+
+
+	LineStyle1="normal";
+	Pclose="true";
+
+
+	for (x=0;x<Counter;x++)
+	{
+
+		if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive))
+	   {
+			lijn_x1=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			lijn_y1=-(LineTable4[x].Line2.toDouble());
+		}
+
+		if (LineTable4[x].Line1.contains(" 11", Qt::CaseSensitive))
+	   {
+			lijn_x2=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 21", Qt::CaseSensitive))
+		{
+			lijn_y2=-LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 12", Qt::CaseSensitive))
+	   {
+			lijn_x3=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 22", Qt::CaseSensitive))
+		{
+			lijn_y3=-LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 13", Qt::CaseSensitive))
+	   {
+			lijn_x4=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 23", Qt::CaseSensitive))
+		{
+			lijn_y4=-LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains("  6", Qt::CaseSensitive))
+		{
+			LineTypeOFLine=LineTable4[x].Line2;
+		}
+
+		if (LineTable4[x].Line1.contains("  8", Qt::CaseSensitive))
+		{
+			LayerNameOFLine=LineTable4[x].Line2;
+		}
+
+	}
+
+	dxf_check_ltype Check_LineType;
+
+	Check_LineType.LayerCount=LayerCount1;
+	Check_LineType.LTypeCount=LTypeCount1;
+	Check_LineType.LType_to_check=LineTypeOFLine;
+	Check_LineType.Layer_name_to_check=LayerNameOFLine;
+
+	LineStyle1= Check_LineType.Check_LType(LTypeDXF, LayerDXF);
+
+
+	Lineout=("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<polygon");
+
+	Lineout.append(" closed=");
+	Lineout.append(QChar(34));
+	Lineout.append(Pclose);
+	Lineout.append(QChar(34));
+
+	//1
+	Lineout.append(" x1=");
+	Lineout.append(QChar(34));
+	Lineout.append(QString::number(lijn_x1,'f',2));
+	Lineout.append(QChar(34));
+	Lineout.append(" y1=");
+	Lineout.append(QChar(34));
+	Lineout.append(QString::number(lijn_y1,'f',2));
+	Lineout.append(QChar(34));
+
+	//2
+	Lineout.append(" x2=");
+	Lineout.append(QChar(34));
+	Lineout.append(QString::number(lijn_x2,'f',2));
+	Lineout.append(QChar(34));
+	Lineout.append(" y2=");
+	Lineout.append(QChar(34));
+	Lineout.append(QString::number(lijn_y2,'f',2));
+	Lineout.append(QChar(34));
+
+	//3
+	Lineout.append(" x3=");
+	Lineout.append(QChar(34));
+	Lineout.append(QString::number(lijn_x3,'f',2));
+	Lineout.append(QChar(34));
+	Lineout.append(" y3=");
+	Lineout.append(QChar(34));
+	Lineout.append(QString::number(lijn_y3,'f',2));
+	Lineout.append(QChar(34));
+
+	//3
+	Lineout.append(" x4=");
+	Lineout.append(QChar(34));
+	Lineout.append(QString::number(lijn_x4,'f',2));
+	Lineout.append(QChar(34));
+	Lineout.append(" y4=");
+	Lineout.append(QChar(34));
+	Lineout.append(QString::number(lijn_y4,'f',2));
+	Lineout.append(QChar(34));
+
+	Lineout.append(" antialias=");
+	Lineout.append(QChar(34));
+	Lineout.append("false");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" style=");
+	Lineout.append(QChar(34));
+	Lineout.append("line-style:");
+	Lineout.append(LineStyle1);
+	Lineout.append(";");
+	Lineout.append("line-weight:thin;");
+	Lineout.append("filling:black;");
+	Lineout.append("color:black");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+
+
+	if (Entitieswitch==1)
+	{
+		BlockList[0].BlockDef.append(Lineout);
+
+	}
+	if (Entitieswitch==0)
+	{
+
+		BlockList[BlockCount].BlockDef.append(Lineout);
+	}
+
+
+	return ;
+
+
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_solid.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_solid.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_solid.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,53 @@
+#ifndef DXF_SOLID_H
+#define DXF_SOLID_H
+
+#include <QtCore>
+#include <dxf_data.h>
+#include "dxf_check_ltype.h"
+#include "dxf_ltype.h"
+
+class DXF_solid: public DXF_Data
+{
+	public:
+
+	int LineCount;
+	int LTypeCount1;
+	int LayerCount1;
+	int Entities1;
+
+	double lijn_x1;
+	double lijn_x2;
+	double lijn_x3;
+	double lijn_x4;
+
+	double lijn_y1;
+	double lijn_y2;
+	double lijn_y3;
+	double lijn_y4;
+
+
+	QString line_x1;
+	QString line_x2;
+	QString line_x3;
+	QString line_x4;
+
+	QString Pclose;
+
+
+	QString line_y1;
+	QString line_y2;
+	QString line_y3;
+	QString line_y4;
+
+	QString Lineout;
+
+	QString LineTypeOFLine;
+	QString LayerNameOFLine;
+
+	DXF_solid();
+
+	void ConvertSolid (int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+
+};
+
+#endif // DXF_SOLID_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_spline.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_spline.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_spline.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,5 @@
+#include "dxf_spline.h"
+
+DXF_Spline::DXF_Spline()
+{
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_spline.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_spline.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_spline.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,13 @@
+#ifndef DXF_SPLINE_H
+#define DXF_SPLINE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Spline: public DXF_Data
+{
+	public:
+	DXF_Spline();
+};
+
+#endif // DXF_SPLINE_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_text.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_text.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_text.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,111 @@
+#include "dxf_text.h"
+
+DXF_Text::DXF_Text()
+{
+}
+
+void DXF_Text::ConvertText (int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF  LineTable4[], struct _LType_ACAD LTypeDXF[], struct _Layer_ACAD  LayerDXF[], struct _Block_ACAD BlockList[])
+{
+
+		int x;
+
+
+	for (x=0;x<Counter;x++)
+	{
+		if (LineTable4[x].Line1.contains(" 10", Qt::CaseSensitive) )
+	   {
+			tx=LineTable4[x].Line2.toDouble();
+		}
+
+		if (LineTable4[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			ty=-(LineTable4[x].Line2.toDouble());
+		}
+
+		if (LineTable4[x].Line1.contains(" 40", Qt::CaseSensitive))
+		{
+			theight=LineTable4[x].Line2.toDouble();
+		}
+
+
+		if (LineTable4[x].Line1.contains(" 50", Qt::CaseSensitive))
+		{
+			trotation=LineTable4[x].Line2.toDouble();
+		}
+
+
+		if (LineTable4[x].Line1.contains("  1", Qt::CaseSensitive))
+		{
+			ttext=LineTable4[x].Line2;
+		}
+
+
+	}
+
+
+	dxf_check_string_chars CheckText1;
+
+	CheckText1.TextToCheck=ttext;
+
+	ttext=CheckText1.CheckText();
+
+	/* <text x="-29" y="-8" size="9" rotation="270" text="Test"/> */
+
+
+	xtext=QString::number(tx+0.5,'f',0);
+	ytext=QString::number(ty+0.5,'f',0);
+	htext=QString::number(theight,'f',0);
+	rtext=QString::number(trotation,'f',0);
+
+	/* create qet elmt code */
+
+	Lineout=("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<text x=");
+	Lineout.append(QChar(34));
+	Lineout.append(xtext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y=");
+	Lineout.append(QChar(34));
+	Lineout.append(ytext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" size=");
+	Lineout.append(QChar(34));
+	Lineout.append(htext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" rotation=");
+	Lineout.append(QChar(34));
+	Lineout.append(rtext);
+	Lineout.append(QChar(34));
+
+	//ttext = ControlText (ttext);
+
+	Lineout.append(" text=");
+	Lineout.append(QChar(34));
+	Lineout.append(ttext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+
+
+
+
+	if (Entitieswitch==1)
+	{
+		BlockList[0].BlockDef.append(Lineout);
+
+	}
+	if (Entitieswitch==0)
+	{
+
+		BlockList[BlockCount].BlockDef.append(Lineout);
+	}
+
+	return ;
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_text.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_text.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_text.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,30 @@
+#ifndef DXF_TEXT_H
+#define DXF_TEXT_H
+
+#include <QtCore>
+#include <dxf_data.h>
+#include "dxf_check_string_chars.h"
+
+class DXF_Text: public DXF_Data
+{
+	public:
+
+
+	QString ttext;
+	QString xtext; // x-coord
+	QString ytext; // y-coord
+	QString htext; // height
+	QString rtext; // rotation
+
+	double tx;
+	double ty;
+	double theight;
+	double trotation;
+	double tscale;
+
+	DXF_Text();
+
+	void ConvertText(int Counter, int BlockCount, int Entitieswitch, struct _ReadLineDXF LineTable4[2000], struct _LType_ACAD LTypeDXF[200], struct _Layer_ACAD LayerDXF[200],struct _Block_ACAD BlockList[2000]);
+};
+
+#endif // DXF_TEXT_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_vertex.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_vertex.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_vertex.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,5 @@
+#include "dxf_vertex.h"
+
+DXF_Vertex::DXF_Vertex()
+{
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_vertex.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_vertex.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_vertex.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,13 @@
+#ifndef DXF_VERTEX_H
+#define DXF_VERTEX_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Vertex: public DXF_Data
+{
+	public:
+	DXF_Vertex();
+};
+
+#endif // DXF_VERTEX_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_xline.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_xline.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_xline.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,5 @@
+#include "dxf_xline.h"
+
+DXF_Xline::DXF_Xline()
+{
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxf_xline.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxf_xline.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxf_xline.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,13 @@
+#ifndef DXF_XLINE_H
+#define DXF_XLINE_H
+
+#include <QtCore>
+#include <dxf_data.h>
+
+class DXF_Xline: public DXF_Data
+{
+	public:
+	DXF_Xline();
+};
+
+#endif // DXF_XLINE_H

Added: branches/newdxf/sources/editor/dxftoelmt/dxftoelmt.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxftoelmt.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxftoelmt.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,4624 @@
+#include "dxftoelmt.h"
+
+dxfTOelmt::dxfTOelmt()
+{
+}
+
+QString dxfTOelmt::CreateElmt()
+{
+
+
+
+
+	QString StatusBarMessage;
+
+	//DXF_Data Data1;
+
+
+/* open file */
+
+	QFile file(m_file_path);
+	if (!file.open(QFile::ReadOnly | QFile::Text))
+	{
+		//QMessageBox::warning(this, file.tr("Application"));
+							 /*,file.tr("Cannot read file %1:\n%2.")
+							 .arg(file.fileName)
+							 .arg(file.errorString()));*/
+
+	}
+
+	QTextStream in(&file);
+
+/* read fist 2 lines of input file */
+
+	ReadLine=in.readLine();
+	Line1=ReadLine;
+	ReadLine=in.readLine();
+	Line2=ReadLine;
+	dxfLineCounter=2;
+	ActiveSection=0;
+	BlockCount=1;
+
+	while (!ReadLine.isNull())
+	{
+		Aantal_Tekens = Line2.length();
+
+		if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("SECTION", Qt::CaseSensitive)and Aantal_Tekens==7)
+		{
+
+			ReadLine=in.readLine();
+			Line1=ReadLine;
+			ReadLine=in.readLine();
+			Line2=ReadLine;
+			dxfLineCounter=dxfLineCounter+2;
+
+/* HEADER SECTION of DXF file */
+
+			Aantal_Tekens = Line2.length();
+			if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("HEADER", Qt::CaseSensitive)and Aantal_Tekens==6)
+			{
+				ActiveSection=1;
+				LineCount1=1;
+
+				Aantal_Tekens = Line2.length();
+				switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+				while(switch1==false)
+				{
+
+					ReadLine=in.readLine();
+					Line1=ReadLine;
+					LineTable1[LineCount1].Line1=Line1;
+					ReadLine=in.readLine();
+					Line2=ReadLine;
+					LineTable1[LineCount1].Line2=Line2;
+					LineCount1=LineCount1+1;
+					dxfLineCounter=dxfLineCounter+2;
+
+
+					Aantal_Tekens = Line2.length();
+					switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+					if (LineCount1>=2000)
+					{
+						switch1=1;
+
+					}
+				}
+
+
+				DXF_Header DXFvar;
+				DXFvar.GetDXFvar(LineCount1, LineTable1, &SizeSymbol1);
+
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;
+
+			}
+
+/* CLASSES SECTION of DXF file */
+
+			Aantal_Tekens = Line2.length();
+			if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("CLASSES", Qt::CaseSensitive)and Aantal_Tekens==7)
+			{
+				ActiveSection=2;
+
+
+				Aantal_Tekens = Line2.length();
+				switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+				while(switch2==false)
+				{
+
+					ReadLine=in.readLine();
+					Line1=ReadLine;
+					ReadLine=in.readLine();
+					Line2=ReadLine;
+					dxfLineCounter=dxfLineCounter+2;
+
+					Aantal_Tekens = Line2.length();
+					switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+				}
+
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;
+			}
+
+/* TABLES SECTION of DXF file */
+
+			Aantal_Tekens = Line2.length();
+			if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("TABLES", Qt::CaseSensitive)and Aantal_Tekens==6)
+			{
+				ActiveSection=3;
+
+				Aantal_Tekens = Line2.length();
+				switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+				LineCount2=1;
+				LineCount3=1;
+
+				switch3=false;
+				switch4=false;
+
+
+
+				while(switch2==false)
+				{
+
+					ReadLine=in.readLine();
+					Line1=ReadLine;
+					ReadLine=in.readLine();
+					Line2=ReadLine;
+					dxfLineCounter=dxfLineCounter+2;
+
+
+
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("LTYPE", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						LineTable2[LineCount2].Line1=Line1;
+
+						LineTable2[LineCount2].Line2=Line2;
+						LineCount2=LineCount2+1;
+
+						Aantal_Tekens = Line2.length();
+						switch3=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDTAB", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+						while(switch3==false)
+						{
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							LineTable2[LineCount2].Line1=Line1;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							LineTable2[LineCount2].Line2=Line2;
+							LineCount2=LineCount2+1;
+							dxfLineCounter=dxfLineCounter+2;
+
+
+							Aantal_Tekens = Line2.length();
+							switch3=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDTAB", Qt::CaseSensitive)and Aantal_Tekens==6);
+							if (LineCount2>=2000)
+							{
+								switch3=1;
+
+							}
+						}
+
+
+					}
+
+
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("LAYER", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						LineTable3[LineCount3].Line1=Line1;
+
+						LineTable3[LineCount3].Line2=Line2;
+						LineCount3=LineCount3+1;
+
+						Aantal_Tekens = Line2.length();
+						switch4=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDTAB", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+						while(switch4==false)
+						{
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							LineTable3[LineCount3].Line1=Line1;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							LineTable3[LineCount3].Line2=Line2;
+							LineCount3=LineCount3+1;
+							dxfLineCounter=dxfLineCounter+2;
+
+
+							Aantal_Tekens = Line2.length();
+							switch4=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDTAB", Qt::CaseSensitive)and Aantal_Tekens==6);
+							if (LineCount3>=2000)
+							{
+								switch4=1;
+
+							}
+						}
+
+
+
+					}
+
+
+
+
+					Aantal_Tekens = Line2.length();
+					switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+				}
+
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;
+
+			}
+			if (switch3==1)
+			{
+
+				DXF_LType Load_LType;
+				LtypeCount= Load_LType.LoadLTypeTable(LineCount2, LineTable2,LTypeDXF );
+				switch3=false;
+
+
+
+
+			}
+			if (switch4==1)
+			{
+				DXF_Layer Load_Layer;
+				LayerCount= Load_Layer.LoadLayerTable(LineCount3, LineTable3, LayerDXF);
+				switch4=false;
+
+			}
+
+/* BLOCK SECTION of DXF file */
+
+			Aantal_Tekens = Line2.length();
+			if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("BLOCKS", Qt::CaseSensitive)and Aantal_Tekens==6)
+			{
+				ActiveSection=4;
+				Entitieswitch=0;
+				BlockCount=1;
+
+				LineCount4=1;
+
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;
+
+				Aantal_Tekens = Line2.length();
+				switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+				while(switch2==false)
+				{
+
+					/*ReadLine=in.readLine();
+					Line1=ReadLine;
+					ReadLine=in.readLine();
+					Line2=ReadLine;
+					dxfLineCounter=dxfLineCounter+2;*/
+
+					switch9=false;
+
+					LineTable4[LineCount4].Line1=Line1;
+					LineTable4[LineCount4].Line2=Line2;
+					LineCount4=LineCount4+1;
+
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("BLOCK", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+						Control9=Line1.toDouble();
+						//switch9=(Control9==0  and Line2.contains("ENDBLK", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+						if (Control9==0)
+						{
+							switch9=true;
+						}
+						while (switch9==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+
+
+							Control9=Line1.toDouble();
+							if (Control9==0)
+							{
+								switch9=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch9=1;
+
+							}
+
+
+
+						}
+
+						DXF_block Load_Block;
+
+						Load_Block.ConvertBlock(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+						switch9=false;
+
+
+					}
+
+					/*Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDBLK", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+						Control9=Line1.toDouble();
+						if (Control9==0)
+						{
+							switch9=true;
+						}
+
+						while (switch9==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+
+
+							Control9=Line1.toDouble();
+							if (Control9==0)
+							{
+								switch9=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch9=1;
+
+							}
+
+
+
+						}
+
+						DXF_block Load_Block2;
+
+						Load_Block2.ConvertEndBlock(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+						BlockCount=BlockCount+1;
+
+					}*/
+
+
+					// converting block base types
+
+					switch10=0;
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ARC", Qt::CaseSensitive)and Aantal_Tekens==3)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+						DXF_Arc Load_Arc;
+
+						Load_Arc.LayerCount1=LayerCount;
+						Load_Arc.LTypeCount1=LtypeCount;
+
+						Load_Arc.ConvertArc(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ATTDEF", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+						DXF_Attrib Load_Attrib;
+
+						Load_Attrib.ConvertAttrib (LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ATTRIB", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+						DXF_Attdef Load_Attdef;
+
+						Load_Attdef.ConvertAttdef(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("CIRCLE", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+							switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+						DXF_Circle Load_Circle;
+
+						Load_Circle.LayerCount1=LayerCount;
+						Load_Circle.LTypeCount1=LtypeCount;
+
+						Load_Circle.ConvertCircle(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ELLIPSE", Qt::CaseSensitive)and Aantal_Tekens==7)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("INSERT", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("LINE", Qt::CaseSensitive)and Aantal_Tekens==4)
+					{
+
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+						}
+
+						DXF_Line Load_Line;
+
+						Load_Line.LayerCount1=LayerCount;
+						Load_Line.LTypeCount1=LtypeCount;
+
+
+						Load_Line.ConvertLine(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+
+					}
+
+
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("LWPOLYLINE", Qt::CaseSensitive)and Aantal_Tekens==10)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("MLINE", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("MTEXT", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("POINT", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+							switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+
+
+						DXF_Point Load_Point;
+
+						Load_Point.LayerCount1=LayerCount;
+						Load_Point.LTypeCount1=LtypeCount;
+
+
+						Load_Point.ConvertPoint(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					switch11=0;
+					switch12=0;
+					LineCount4=1;
+					LineCount5=1;
+					LineCount6=1;
+
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("POLYLINE", Qt::CaseSensitive)and Aantal_Tekens==8)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+							switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+
+
+
+						}
+
+						// poly begin oproepen
+						DXF_Polyline Load_Polybegin;
+
+						Load_Polybegin.PolyLineBegin( LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+
+
+
+
+						Control11=0;
+						LineCount5=1;
+						switch13=0;
+						VectorCount=1;
+
+						while (switch13==0)
+						{
+							Control11=0;
+							switch11=0;
+							LineCount5=1;
+
+							Aantal_Tekens = Line2.length();
+							if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("VERTEX", Qt::CaseSensitive)and Aantal_Tekens==6)
+							{
+								ReadLine=in.readLine();
+								Line1=ReadLine;
+								ReadLine=in.readLine();
+								Line2=ReadLine;
+								dxfLineCounter=dxfLineCounter+2;
+
+								LineTable5[LineCount5].Line1=Line1;
+								LineTable5[LineCount5].Line2=Line2;
+								LineCount5=LineCount5+1;
+
+								Control11=Line1.toDouble();
+								if (Control11==0)
+								{
+									switch11=true;
+								}
+
+
+								while (switch11==false)
+								{
+									ReadLine=in.readLine();
+									Line1=ReadLine;
+									ReadLine=in.readLine();
+									Line2=ReadLine;
+									dxfLineCounter=dxfLineCounter+2;
+
+									LineTable5[LineCount5].Line1=Line1;
+									LineTable5[LineCount5].Line2=Line2;
+									LineCount5=LineCount5+1;
+
+									Control11=Line1.toDouble();
+									if (Control11==0)
+									{
+										switch11=true;
+									}
+									if (LineCount5>=2000)
+									{
+										switch11=1;
+
+									}
+
+								} //end while 11
+							}
+
+							//Polyvector oproepen
+
+							DXF_Polyline Load_Vector;
+
+							Load_Vector.PolyLineVector(VectorCount, LineCount5, BlockCount, Entitieswitch, LineTable5,LTypeDXF, LayerDXF, BlockList);
+
+							Aantal_Tekens = Line2.length();
+							Control13=Line1.toDouble();
+
+							if (Control13==0 and Line2.contains("SEQEND",Qt::CaseSensitive) and Aantal_Tekens==6)
+							{
+								switch13=true;
+							}
+							else
+							{
+								VectorCount=VectorCount+1;
+							}
+
+
+						}// end while 13
+
+
+
+
+						Aantal_Tekens = Line2.length();
+						Control12=0;
+						if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SEQEND", Qt::CaseSensitive)and Aantal_Tekens==6)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable6[LineCount6].Line1=Line1;
+							LineTable6[LineCount6].Line2=Line2;
+							LineCount6=LineCount6+1;
+
+							Control12=Line1.toDouble();
+							if (Control12==0)
+							{
+								switch12=true;
+							}
+
+
+							while (switch12==false)
+							{
+								ReadLine=in.readLine();
+								Line1=ReadLine;
+								ReadLine=in.readLine();
+								Line2=ReadLine;
+								dxfLineCounter=dxfLineCounter+2;
+
+								LineTable6[LineCount6].Line1=Line1;
+								LineTable6[LineCount6].Line2=Line2;
+								LineCount6=LineCount6+1;
+								switch12=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+								Control12=Line1.toDouble();
+								if (Control12==0)
+								{
+									switch12=true;
+								}
+								if (LineCount6>=2000)
+								{
+									switch10=1;
+
+								}
+
+							}
+
+						}
+
+						DXF_Polyline Load_Polyend;
+
+						Load_Polyend.PolyLineEnd( LineCount6, BlockCount, Entitieswitch, LineTable5,LTypeDXF, LayerDXF, BlockList);
+
+						//end polyline oproepen
+
+						LineCount4=1;
+						LineCount5=1;
+						LineCount6=1;
+
+
+
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SPLINE", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("TEXT", Qt::CaseSensitive)and Aantal_Tekens==4)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+
+						DXF_Text Load_Text;
+
+						Load_Text.ConvertText(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+
+					}
+
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("XLINE", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("VERTEX", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("3DFACE", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("3DSOLID", Qt::CaseSensitive)and Aantal_Tekens==7)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ACAD_PROXY_ENTITY", Qt::CaseSensitive)and Aantal_Tekens==17)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("BODY", Qt::CaseSensitive)and Aantal_Tekens==4)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("DIMENSION", Qt::CaseSensitive)and Aantal_Tekens==9)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("HATCH", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("IMAGE", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("LEADER", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("OLEFRAME", Qt::CaseSensitive)and Aantal_Tekens==8)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("OLE2FRAME", Qt::CaseSensitive)and Aantal_Tekens==9)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("RAY", Qt::CaseSensitive)and Aantal_Tekens==3)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("REGION", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SEQEND", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SHAPE", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SOLID", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+
+						DXF_solid Load_Solid;
+
+						Load_Solid.LayerCount1=LayerCount;
+						Load_Solid.LTypeCount1=LtypeCount;
+
+						Load_Solid.ConvertSolid(LineCount4, BlockCount, Entitieswitch, LineTable4, LTypeDXF, LayerDXF, BlockList);
+
+
+
+						LineCount4=1;
+
+
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("TOLERANCE", Qt::CaseSensitive)and Aantal_Tekens==9)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("TRACE", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("VIEWPORT", Qt::CaseSensitive)and Aantal_Tekens==8)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+
+						}
+
+					}
+
+
+
+
+
+
+
+
+					// end converting block base types
+
+
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDBLK", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+						Control9=Line1.toDouble();
+						if (Control9==0)
+						{
+							switch9=true;
+						}
+
+						while (switch9==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+
+
+							Control9=Line1.toDouble();
+							if (Control9==0)
+							{
+								switch9=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch9=1;
+
+							}
+
+
+
+						}
+
+						DXF_block Load_Block2;
+
+						Load_Block2.ConvertEndBlock(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+						BlockCount=BlockCount+1;
+
+					}
+
+
+					/*ReadLine=in.readLine();
+					Line1=ReadLine;
+					ReadLine=in.readLine();
+					Line2=ReadLine;
+					dxfLineCounter=dxfLineCounter+2;*/
+
+
+
+					Aantal_Tekens = Line2.length();
+					switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+				}
+
+				/*ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;*/
+
+			}
+
+/* ENTITIES SECTION of DXF file */
+
+			Aantal_Tekens = Line2.length();
+			if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("ENTITIES", Qt::CaseSensitive)and Aantal_Tekens==8)
+			{
+				ActiveSection=5;
+				Entitieswitch=1;
+				//BlockCount=0;
+
+				//Selector();
+
+				Aantal_Tekens = Line2.length();
+				switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+				LineCount4=1;
+
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;
+
+				while(switch2==false)
+				{
+
+					switch10=0;
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ARC", Qt::CaseSensitive)and Aantal_Tekens==3)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+						DXF_Arc Load_Arc;
+
+						Load_Arc.LayerCount1=LayerCount;
+						Load_Arc.LTypeCount1=LtypeCount;
+
+						Load_Arc.ConvertArc(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ATTDEF", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+						DXF_Attrib Load_Attrib;
+
+						Load_Attrib.ConvertAttrib (LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ATTRIB", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+						DXF_Attdef Load_Attdef;
+
+						Load_Attdef.ConvertAttdef(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("CIRCLE", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+							switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+						DXF_Circle Load_Circle;
+
+						Load_Circle.LayerCount1=LayerCount;
+						Load_Circle.LTypeCount1=LtypeCount;
+
+						Load_Circle.ConvertCircle(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ELLIPSE", Qt::CaseSensitive)and Aantal_Tekens==7)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+						DXF_Ellipse Load_Ellipse;
+
+						Load_Ellipse.LayerCount1=LayerCount;
+						Load_Ellipse.LTypeCount1=LtypeCount;
+
+
+						//Load_Ellipse.ConvertEllipse(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("INSERT", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+						DXF_Insert Load_Insert;
+
+						Load_Insert.LayerCount1=LayerCount;
+						Load_Insert.LTypeCount1=LtypeCount;
+
+
+						Load_Insert.ConvertInsert(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("LINE", Qt::CaseSensitive)and Aantal_Tekens==4)
+					{
+
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+						}
+
+						DXF_Line Load_Line;
+
+						Load_Line.LayerCount1=LayerCount;
+						Load_Line.LTypeCount1=LtypeCount;
+
+
+						Load_Line.ConvertLine(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+
+					}
+
+
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("LWPOLYLINE", Qt::CaseSensitive)and Aantal_Tekens==10)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("MLINE", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("MTEXT", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+						DXF_Mtext Load_Mtext;
+
+						Load_Mtext.LayerCount1=LayerCount;
+						Load_Mtext.LTypeCount1=LtypeCount;
+
+
+						Load_Mtext.ConvertMtext(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+
+
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("POINT", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+							switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+
+
+						DXF_Point Load_Point;
+
+						Load_Point.LayerCount1=LayerCount;
+						Load_Point.LTypeCount1=LtypeCount;
+
+
+						Load_Point.ConvertPoint(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					switch11=0;
+					switch12=0;
+					LineCount4=1;
+					LineCount5=1;
+					LineCount6=1;
+
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("POLYLINE", Qt::CaseSensitive)and Aantal_Tekens==8)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+							switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+
+
+
+						}
+
+						// poly begin oproepen
+						DXF_Polyline Load_Polybegin;
+
+						Load_Polybegin.PolyLineBegin( LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+
+
+
+
+						Control11=0;
+						LineCount5=1;
+						switch13=0;
+						VectorCount=1;
+
+						while (switch13==0)
+						{
+							Control11=0;
+							switch11=0;
+							LineCount5=1;
+
+							Aantal_Tekens = Line2.length();
+							if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("VERTEX", Qt::CaseSensitive)and Aantal_Tekens==6)
+							{
+								ReadLine=in.readLine();
+								Line1=ReadLine;
+								ReadLine=in.readLine();
+								Line2=ReadLine;
+								dxfLineCounter=dxfLineCounter+2;
+
+								LineTable5[LineCount5].Line1=Line1;
+								LineTable5[LineCount5].Line2=Line2;
+								LineCount5=LineCount5+1;
+
+								Control11=Line1.toDouble();
+								if (Control11==0)
+								{
+									switch11=true;
+								}
+
+
+								while (switch11==false)
+								{
+									ReadLine=in.readLine();
+									Line1=ReadLine;
+									ReadLine=in.readLine();
+									Line2=ReadLine;
+									dxfLineCounter=dxfLineCounter+2;
+
+									LineTable5[LineCount5].Line1=Line1;
+									LineTable5[LineCount5].Line2=Line2;
+									LineCount5=LineCount5+1;
+
+									Control11=Line1.toDouble();
+									if (Control11==0)
+									{
+										switch11=true;
+									}
+									if (LineCount5>=2000)
+									{
+										switch11=1;
+
+									}
+
+								} //end while 11
+							}
+
+							//Polyvector oproepen
+
+							DXF_Polyline Load_Vector;
+
+							Load_Vector.PolyLineVector(VectorCount, LineCount5, BlockCount, Entitieswitch, LineTable5,LTypeDXF, LayerDXF, BlockList);
+
+							Aantal_Tekens = Line2.length();
+							Control13=Line1.toDouble();
+
+							if (Control13==0 and Line2.contains("SEQEND",Qt::CaseSensitive) and Aantal_Tekens==6)
+							{
+								switch13=true;
+							}
+							else
+							{
+								VectorCount=VectorCount+1;
+							}
+
+
+						}// end while 13
+
+
+
+
+						Aantal_Tekens = Line2.length();
+						Control12=0;
+						if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SEQEND", Qt::CaseSensitive)and Aantal_Tekens==6)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable6[LineCount6].Line1=Line1;
+							LineTable6[LineCount6].Line2=Line2;
+							LineCount6=LineCount6+1;
+
+							Control12=Line1.toDouble();
+							if (Control12==0)
+							{
+								switch12=true;
+							}
+
+
+							while (switch12==false)
+							{
+								ReadLine=in.readLine();
+								Line1=ReadLine;
+								ReadLine=in.readLine();
+								Line2=ReadLine;
+								dxfLineCounter=dxfLineCounter+2;
+
+								LineTable6[LineCount6].Line1=Line1;
+								LineTable6[LineCount6].Line2=Line2;
+								LineCount6=LineCount6+1;
+								switch12=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+								Control12=Line1.toDouble();
+								if (Control12==0)
+								{
+									switch12=true;
+								}
+								if (LineCount6>=2000)
+								{
+									switch10=1;
+
+								}
+
+							}
+
+						}
+
+						DXF_Polyline Load_Polyend;
+
+						Load_Polyend.PolyLineEnd( LineCount6, BlockCount, Entitieswitch, LineTable5,LTypeDXF, LayerDXF, BlockList);
+
+						//end polyline oproepen
+
+						LineCount4=1;
+						LineCount5=1;
+						LineCount6=1;
+
+
+
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SPLINE", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("TEXT", Qt::CaseSensitive)and Aantal_Tekens==4)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+
+						DXF_Text Load_Text;
+
+						Load_Text.ConvertText(LineCount4, BlockCount, Entitieswitch, LineTable4,LTypeDXF, LayerDXF, BlockList);
+
+						LineCount4=1;
+
+					}
+
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("XLINE", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("VERTEX", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("3DFACE", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("3DSOLID", Qt::CaseSensitive)and Aantal_Tekens==7)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("ACAD_PROXY_ENTITY", Qt::CaseSensitive)and Aantal_Tekens==17)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("BODY", Qt::CaseSensitive)and Aantal_Tekens==4)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("DIMENSION", Qt::CaseSensitive)and Aantal_Tekens==9)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("HATCH", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("IMAGE", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("LEADER", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("OLEFRAME", Qt::CaseSensitive)and Aantal_Tekens==8)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("OLE2FRAME", Qt::CaseSensitive)and Aantal_Tekens==9)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("RAY", Qt::CaseSensitive)and Aantal_Tekens==3)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("REGION", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SEQEND", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SHAPE", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("SOLID", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						LineTable4[LineCount4].Line1=Line1;
+						LineTable4[LineCount4].Line2=Line2;
+						LineCount4=LineCount4+1;
+
+
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							LineTable4[LineCount4].Line1=Line1;
+							LineTable4[LineCount4].Line2=Line2;
+							LineCount4=LineCount4+1;
+
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+
+						DXF_solid Load_Solid;
+
+						Load_Solid.LayerCount1=LayerCount;
+						Load_Solid.LTypeCount1=LtypeCount;
+
+						Load_Solid.ConvertSolid(LineCount4, BlockCount, Entitieswitch, LineTable4, LTypeDXF, LayerDXF, BlockList);
+
+
+
+						LineCount4=1;
+
+
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("TOLERANCE", Qt::CaseSensitive)and Aantal_Tekens==9)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("TRACE", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+						}
+
+					}
+
+
+					Aantal_Tekens = Line2.length();
+					switch10=0;
+					if (Line1.contains(" 0",Qt::CaseSensitive)and Line2.contains("VIEWPORT", Qt::CaseSensitive)and Aantal_Tekens==8)
+					{
+						ReadLine=in.readLine();
+						Line1=ReadLine;
+						ReadLine=in.readLine();
+						Line2=ReadLine;
+						dxfLineCounter=dxfLineCounter+2;
+
+						//LineTable4[LineCount4].Line1=Line1;
+						//LineTable4[LineCount4].Line2=Line2;
+						//LineCount4=LineCount4+1;
+
+
+						//switch10=(Line1.contains(" 0",Qt::CaseSensitive) and 0);
+						Control10=Line1.toDouble();
+						if (Control10==0)
+						{
+							switch10=true;
+						}
+
+
+						while (switch10==false)
+						{
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							//LineTable4[LineCount4].Line1=Line1;
+							//LineTable4[LineCount4].Line2=Line2;
+							//LineCount4=LineCount4+1;
+							//switch10=(Line1.contains(" 0",Qt::CaseSensitive)and 0);
+
+							Control10=Line1.toDouble();
+							if (Control10==0)
+							{
+								switch10=true;
+							}
+							if (LineCount4>=2000)
+							{
+								switch10=1;
+
+							}
+
+
+						}
+
+					}
+					Aantal_Tekens = Line2.length();
+
+
+					Control2=Line1.toDouble();
+					if ((Control2==0) and ( Line2.contains("ENDSEC", Qt::CaseSensitive))and Aantal_Tekens==6)
+					{
+						switch2=true;
+					}
+
+				}
+
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;
+				switch10=0;
+
+			}
+
+/* OBJECTS SECTION of DXF file */
+
+			Aantal_Tekens = Line2.length();
+			if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("OBJECTS", Qt::CaseSensitive)and Aantal_Tekens==7)
+			{
+				ActiveSection=6;
+
+				Aantal_Tekens = Line2.length();
+				switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+				while(switch2==false)
+				{
+
+					ReadLine=in.readLine();
+					Line1=ReadLine;
+					ReadLine=in.readLine();
+					Line2=ReadLine;
+					dxfLineCounter=dxfLineCounter+2;
+
+					Aantal_Tekens = Line2.length();
+					switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+				}
+
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;
+
+			}
+
+
+/* ACDSDATA SECTION of DXF file */
+
+			Aantal_Tekens = Line2.length();
+			if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("ACDSDATA", Qt::CaseSensitive)and Aantal_Tekens==8)
+			{
+				ActiveSection=6;
+
+				Aantal_Tekens = Line2.length();
+				switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+				while(switch2==false)
+				{
+
+					ReadLine=in.readLine();
+					Line1=ReadLine;
+					ReadLine=in.readLine();
+					Line2=ReadLine;
+					dxfLineCounter=dxfLineCounter+2;
+
+					Aantal_Tekens = Line2.length();
+					switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+				}
+
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;
+
+			}
+
+
+/* ENDSEC of DXF file */
+
+			Aantal_Tekens = Line2.length();
+			if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6)
+			{
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;
+
+
+			}
+
+/* EOF of DXF file */
+
+			Aantal_Tekens = Line2.length();
+			if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("EOF", Qt::CaseSensitive)and Aantal_Tekens==3)
+			{
+				StatusBarMessage="end of file";
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;
+			}
+
+
+		}
+
+	}
+
+	dxf_elmt_output CreateOutputElmt;
+	CreateOutputElmt.Filename=Filename1;
+
+	ElmtResult = CreateOutputElmt.elmt(BlockCount, Flag, BlockList, Filename1);
+
+
+
+	//StatusBarMessage="end of conversion";
+
+	return ElmtResult;
+}
+
+void dxfTOelmt::Selector()
+{
+
+
+}

Added: branches/newdxf/sources/editor/dxftoelmt/dxftoelmt.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/dxftoelmt.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/dxftoelmt.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,78 @@
+#ifndef DXFTOELMT_H
+#define DXFTOELMT_H
+
+#include <QtCore>
+#include <QFileDialog>
+//#include "ui_mainwindow.h"
+
+#include "QTextStream"
+
+#include <QMessageBox>
+
+#include "dxf_data.h"
+#include "dxf_header.h"
+#include "dxf_ltype.h"
+#include "dxf_layer.h"
+#include "dxf_line.h"
+#include "dxf_circle.h"
+#include "dxf_arc.h"
+#include "dxf_attdef.h"
+#include "dxf_attrib.h"
+#include "dxf_elmt_output.h"
+#include "dxf_polyline.h"
+#include "dxf_point.h"
+#include "dxf_text.h"
+#include "dxf_polyline.h"
+#include "dxf_solid.h"
+#include "dxf_block.h"
+#include "dxf_insert.h"
+#include "dxf_ellipse.h"
+#include "dxf_mtext.h"
+#include <cmath>
+
+
+
+class dxfTOelmt : public DXF_Data
+{
+	public:
+
+
+
+	struct _LType_ACAD LTypeDXF[200];
+	struct _Layer_ACAD LayerDXF[200];
+
+	struct _ReadLineDXF LineTable1[2000];
+	struct _ReadLineDXF LineTable2[2000];
+	struct _ReadLineDXF LineTable3[2000];
+	struct _ReadLineDXF LineTable4[2000];
+
+	struct _PolyTable PTable[2000];
+
+	struct _SizeSymbol SizeSymbol1;
+
+	int Flag;
+	int ActiveSection;
+	int Entitieswitch;
+	int dxfLineCounter;
+	int Aantal_Tekens;
+
+
+	QString m_file_path;
+	QString m_path_dir;
+	QString Filename1;
+	QString ReadLine;
+	QString Line1;
+	QString Line2;
+
+	QString ElmtResult;
+
+	dxfTOelmt();
+
+	QString CreateElmt();
+
+	QTextStream in;
+
+	void Selector();
+};
+
+#endif // DXFTOELMT_H

Added: branches/newdxf/sources/editor/dxftoelmt/mainwindow.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/mainwindow.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/mainwindow.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,139 @@
+#include "mainwindow.h"
+#include "ui_mainwindow.h"
+#include "QTextStream"
+#include <QFileDialog>
+
+
+
+#if QT_VERSION >= 0x050000
+	#include <QtWidgets>
+#else
+	#include <QMessageBox>
+#endif
+
+
+MainWindow::MainWindow(QWidget *parent) :
+    QMainWindow(parent),
+    ui(new Ui::MainWindow)
+{
+
+    ui->setupUi(this);
+
+}
+
+MainWindow::~MainWindow()
+{
+    delete ui;
+}
+
+
+void MainWindow::loadFile()
+{
+
+    QFileDialog dialog(this);
+    dialog.setNameFilter(tr("DXF files (*.dxf *.DXF)"));
+    dialog.setFileMode(QFileDialog::ExistingFile);
+    dialog.setViewMode(QFileDialog::Detail);
+
+    if (dialog.exec() == QDialog::Accepted) {
+        m_file_path = dialog.selectedFiles().first();
+        m_path_dir = dialog.directory().absolutePath();
+
+		StatusBarMessage="Read DXF file for convertion";
+
+		ui->statusBar->clearMessage();
+		ui->statusBar->showMessage(StatusBarMessage );
+		ui->statusBar->repaint();
+
+        QFile file(m_file_path);
+        if (!file.open(QFile::ReadOnly | QFile::Text)) {
+            QMessageBox::warning(this, tr("Application"),
+					  tr("Cannot read file %1:\n%2.").arg(m_file_path).arg(file.errorString()));
+            return;
+        }
+
+        ui -> m_import_file_path_le -> setPlaceholderText(m_file_path);
+        ui->ExportFile->setPlaceholderText(m_path_dir);
+
+
+
+		QTextStream in(&file);
+		QString textAll = in.readAll();
+
+		ui->ImportDXF->setPlainText(textAll);
+		ui->ImportDXF->show();
+		ui->ImportDXF->repaint();
+
+		Filename = fillElmtName();
+
+		ui->statusBar->clearMessage();
+
+		 ui->ExportToELMT->clear();
+
+		//Filename=ui->m_elmt_name_le->placeholderText();
+
+		StatusBarMessage="Start of DXF convertion";
+
+		ui->statusBar->clearMessage();
+		ui->statusBar->showMessage(StatusBarMessage );
+		ui->statusBar->repaint();
+
+		 dxfTOelmt ConvertDXF;
+
+
+		 ConvertDXF.m_file_path=m_file_path;
+		 ConvertDXF.m_path_dir=m_path_dir;
+		 ConvertDXF.Filename1=Filename;
+
+		 StatusConvertion=ConvertDXF.CreateElmt();
+
+		 ui->ExportToELMT->setPlainText(StatusConvertion);
+		 ui->ExportToELMT->repaint();
+
+		 StatusBarMessage="End of DXF convertion";
+
+		 ui->statusBar->clearMessage();
+		 ui->statusBar->showMessage(StatusBarMessage );
+		 ui->statusBar->repaint();
+
+	return;
+
+    }
+}
+
+
+QString MainWindow::fillElmtName()
+{
+    QString name = m_file_path.split("/").last();
+    name.remove(".dxf");
+    ui->m_elmt_name_le->setText(name);
+	return name;
+}
+
+void MainWindow::on_m_save_elmt_pb_clicked() {
+
+    QFile file(m_path_dir + "/" + ui->m_elmt_name_le->text() + ".elmt");
+    if (!file.open(QFile::WriteOnly | QFile::Text)) {
+        QMessageBox::warning(this, tr("Application"),
+                             tr("Cannot write file %1:\n%2.")
+                             .arg(m_path_dir)
+                             .arg(file.errorString()));
+        return;
+    }
+
+    QTextStream out(&file);
+    out << ui->ExportToELMT->toPlainText();
+
+    file.close();
+    QMessageBox::information(this, tr("Export"), tr("L'\351l\351ment %1 \340 bien \351t\351 enregistr\351").arg(ui->m_elmt_name_le->text()));
+}
+
+void MainWindow::on_m_load_dxf_pb_clicked()
+{
+     loadFile();
+}
+
+void MainWindow::on_LineCountDXF_textEdited(const QString &arg1)
+{
+
+}

Added: branches/newdxf/sources/editor/dxftoelmt/mainwindow.h
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/mainwindow.h	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/mainwindow.h	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,61 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include "dxftoelmt.h"
+
+QT_BEGIN_NAMESPACE
+    class QPlainTextEdit;
+QT_END_NAMESPACE
+
+
+namespace Ui {
+class MainWindow;
+}
+
+class MainWindow : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    explicit MainWindow(QWidget *parent = 0);
+    ~MainWindow();
+
+
+	int VectorCount;
+
+	QString StatusConvertion;
+	QString StatusBarMessage;
+	QString Filename;
+
+
+
+
+private slots:
+
+    void on_m_save_elmt_pb_clicked();
+    void on_m_load_dxf_pb_clicked();
+
+
+
+	void on_LineCountDXF_textEdited(const QString &arg1);
+
+	private:
+
+    Ui::MainWindow *ui;
+
+
+
+    void loadFile();
+	//void createElmt();
+	QString fillElmtName();
+
+    QString m_file_path, m_path_dir;
+
+
+
+
+
+};
+
+#endif // MAINWINDOW_H

Added: branches/newdxf/sources/editor/dxftoelmt/old_data.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/old_data.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/old_data.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,4307 @@
+void MainWindow::createElmt()
+{
+
+	/* declare DXF compounts */
+	//DXF_Line ConvertLine1;
+
+
+
+
+
+	/* declaire variables */
+
+	QString fileName;
+	QString textAll;
+	QString Line1;
+	QString Line2;
+	QString Line3;
+	QString ReadLine;
+
+	double x1;
+	double x2;
+	double y1;
+	double y2;
+
+
+	/* mtext */
+	double mx;
+	double my;
+	double mheight;
+	double mrotation;
+
+	QString mtext1;
+	QString mtext2;
+	QString mtext3 [100];
+	QString mtext4;
+	QString mtextresult;
+	int countmtext;
+	int forlus3;
+
+	/* text */
+
+	QString ttext;
+	QString xtext; // x-coord
+	QString ytext; // y-coord
+	QString htext; // height
+	QString rtext; // rotation
+
+	/* attribute */
+	double attx;
+	double atty;
+	double attheight;
+	double attrotation;
+
+	QString atttext;
+	QString atttag;
+	QString xattext; // x-coord
+	QString yattext; // y-coord
+	QString hattext; // height
+	QString rattext; // rotation
+
+
+	double xwidth1;
+	double xheight1;
+
+
+
+
+
+
+
+	QString line_x1;
+	QString line_y1;
+	QString line_x2;
+	QString line_y2;
+
+	QString x_center;
+	QString y_center;
+	QString straal;
+	QString start_hoek;
+	QString end_hoek;
+	QString breedte;
+	QString hoogte;
+	QString hoek;
+
+
+	/* POLYLINE */
+
+	QString PolyTable1;
+	QString Pclose;
+
+
+
+
+
+
+	QString Lineout;
+	QString width1;
+	QString height1;
+	bool switch1;
+	bool switch2;
+	bool switch3;
+	bool switch4;
+	bool switch5;
+
+
+
+	int countEndSec;
+
+
+	/* LTYPE var */
+	int LTypeCount;
+
+
+
+	/* Layer var */
+	int LayerCount;
+
+
+
+	/* function variable */
+
+
+	int LineCount;
+	int count1;
+	int dxfLineCounter;
+	int Aantal_Tekens;
+
+	QString LineBack;
+	QString LineBack1;
+	QString LineBack2;
+	QString StatusbarMessage;
+	QString ActiveFunction;
+
+
+	/* setup basic values */
+	x1 = 0;
+	x2 = 400;
+	y1 = 0;
+	y2 = 400;
+	dxfLineCounter=0;
+	//ui->
+
+
+	/* open file */
+
+	QFile file(m_file_path);
+	if (!file.open(QFile::ReadOnly | QFile::Text)) {
+		QMessageBox::warning(this, tr("Application"),
+							 tr("Cannot read file %1:\n%2.")
+							 .arg(fileName)
+							 .arg(file.errorString()));
+		return;
+	}
+
+
+	QTextStream in(&file);
+
+	/* read fist 2 lines of input file */
+
+	ReadLine=in.readLine();
+	Line1=ReadLine;
+	ReadLine=in.readLine();
+	Line2=ReadLine;
+
+	dxfLineCounter=dxfLineCounter+2;
+	countEndSec=0;
+	Aantal_Tekens = Line2.length();
+
+	ActiveFunction="Read first 2 lines";
+
+	StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+	ui->statusBar->clearMessage();
+	ui->statusBar->showMessage(StatusbarMessage );
+
+	/* go to evaluation of the input lines */
+
+	while (!ReadLine.isNull())
+	{
+		Aantal_Tekens = Line2.length();
+
+		if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("SECTION", Qt::CaseSensitive)and Aantal_Tekens==7)
+		{
+
+			ReadLine=in.readLine();
+			Line1=ReadLine;
+			ReadLine=in.readLine();
+			Line2=ReadLine;
+
+			dxfLineCounter=dxfLineCounter+2;
+			Aantal_Tekens = Line2.length();
+			ActiveFunction="Section";
+
+			StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+			ui->statusBar->clearMessage();
+			ui->statusBar->showMessage(StatusbarMessage );
+
+			Aantal_Tekens = Line2.length();
+			if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("HEADER", Qt::CaseSensitive)and Aantal_Tekens==6)
+			{
+
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+
+				dxfLineCounter=dxfLineCounter+2;
+
+
+				ActiveFunction="HEADER";
+
+				StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+				ui->statusBar->clearMessage();
+				ui->statusBar->showMessage(StatusbarMessage );
+
+				Aantal_Tekens = Line2.length();
+				switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive) and Aantal_Tekens==6);
+
+
+				while (switch1==false)
+				{
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 9", Qt::CaseSensitive) and Line2.contains("$LIMMIN", Qt::CaseSensitive) and Aantal_Tekens==7)
+					{
+
+						switch2=false;
+
+						while (switch2 == false and switch1 == false)
+						{
+
+
+							if (Line1.contains(" 10"))
+						   {
+								x1=Line2.toDouble();
+							}
+
+							if (Line1.contains(" 20"))
+							{
+								y1=Line2.toDouble();
+							}
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+
+							dxfLineCounter=dxfLineCounter+2;
+							ActiveFunction="HEADER MIN size of drawing";
+
+							StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+							ui->statusBar->clearMessage();
+							ui->statusBar->showMessage(StatusbarMessage );
+
+							Aantal_Tekens = Line2.length();
+							switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+							switch2=Line1.contains(" 9", Qt::CaseSensitive);
+						}
+
+
+					}
+
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 9", Qt::CaseSensitive) and Line2.contains("$LIMMAX", Qt::CaseSensitive) and Aantal_Tekens==7)
+					{
+						switch2=false;
+
+						while (switch2 == false and switch1 == false)
+						{
+
+
+							if (Line1.contains(" 10", Qt::CaseSensitive))
+						   {
+								x2=Line2.toDouble();
+							}
+
+							if (Line1.contains(" 20", Qt::CaseSensitive))
+							{
+								y2=Line2.toDouble();
+							}
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+
+							dxfLineCounter=dxfLineCounter+2;
+
+							ActiveFunction="HEADER MAX size of drawing";
+
+							StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+							ui->statusBar->clearMessage();
+							ui->statusBar->showMessage(StatusbarMessage );
+
+							Aantal_Tekens = Line2.length();
+							switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive) and Aantal_Tekens==6);
+							switch2=Line1.contains(" 9", Qt::CaseSensitive);
+						}
+					}
+
+					/* find out max size of dxf drawing */
+
+					if( Line2.contains("$LIMMIN", Qt::CaseSensitive))
+					{
+						switch3 = false;
+					}
+					else
+					{
+						if( Line2.contains("$LIMMAX", Qt::CaseSensitive))
+						{
+							switch3 = false;
+
+						}
+						else
+						{
+							switch3 = true;
+
+						}
+					}
+
+					if (Line1.contains(" 9", Qt::CaseSensitive) and switch3)
+					{
+						switch2=false;
+
+						while (switch2 == false and switch1 == false)
+						{
+
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+
+							dxfLineCounter=dxfLineCounter+2;
+
+
+							StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+							ui->statusBar->clearMessage();
+							ui->statusBar->showMessage(StatusbarMessage );
+
+							Aantal_Tekens = Line2.length();
+							switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+							switch2=Line1.contains(" 9", Qt::CaseSensitive);
+						}
+
+
+
+					}
+
+
+					Aantal_Tekens = Line2.length();
+					switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive) and Aantal_Tekens==6);
+
+				}
+			}
+
+
+
+/* CLASSES */
+			Aantal_Tekens = Line2.length();
+			if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("CLASSES", Qt::CaseSensitive)and Aantal_Tekens==7)
+			{
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;
+
+				ActiveFunction="CLASSES";
+
+				StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+				ui->statusBar->clearMessage();
+				ui->statusBar->showMessage(StatusbarMessage );
+
+				Aantal_Tekens = Line2.length();
+				switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive) and Aantal_Tekens==6);
+
+				while (switch1==false)
+				{
+					ReadLine=in.readLine();
+					Line1=ReadLine;
+					ReadLine=in.readLine();
+					Line2=ReadLine;
+
+					dxfLineCounter=dxfLineCounter+2;
+					ActiveFunction="CLASSES";
+
+					StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+					ui->statusBar->clearMessage();
+					ui->statusBar->showMessage(StatusbarMessage );
+
+
+					Aantal_Tekens = Line2.length();
+					switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+				}
+			}
+
+/* TABLES */
+			Aantal_Tekens = Line2.length();
+			if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("TABLES", Qt::CaseSensitive)and Aantal_Tekens==6)
+			{
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;
+
+				ActiveFunction="TABLES";
+
+				StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+				ui->statusBar->clearMessage();
+				ui->statusBar->showMessage(StatusbarMessage );
+
+				LTypeCount = 0;
+				LayerCount = 0;
+
+				Aantal_Tekens = Line2.length();
+				switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+				while (switch1==false)
+				{
+					ReadLine=in.readLine();
+					Line1=ReadLine;
+					ReadLine=in.readLine();
+					Line2=ReadLine;
+
+					dxfLineCounter=dxfLineCounter+2;
+					Aantal_Tekens = Line2.length();
+
+					ActiveFunction="read TABLES";
+
+					StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+					ui->statusBar->clearMessage();
+					ui->statusBar->showMessage(StatusbarMessage );
+
+
+ /* LTYPE */
+
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("LTYPE", Qt::CaseSensitive) and Aantal_Tekens==5)
+					{
+
+						switch5=false;
+
+
+
+						if (LTypeCount >= 200)
+						{
+							switch5=true;
+						}
+
+						while (switch5==false)
+						{
+
+
+							if (Line1.contains("  5",Qt::CaseSensitive))
+							{
+								DXF_Data::LTypeDXF[LTypeCount].LTypeHandle.clear();
+								DXF_Data::LTypeDXF[LTypeCount].LTypeHandle.append( Line2);
+								//LTypeDXF[LTypeCount].LTypeHandle=Line2;
+							}
+
+							if (Line1.contains("  2",Qt::CaseSensitive))
+							{
+
+								LTypeDXF[LTypeCount].LTypeNaam=Line2;
+							}
+
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							ActiveFunction="TABLES get Line type";
+
+							StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+							ui->statusBar->clearMessage();
+							ui->statusBar->showMessage(StatusbarMessage );
+
+
+
+							switch5=(Line1.contains(" 0", Qt::CaseSensitive) );
+						}
+
+						LTypeCount=LTypeCount+1;
+
+
+
+
+					}
+
+ /* LAYER*/
+					Aantal_Tekens = Line2.length();
+
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("LAYER", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+
+						switch5=false;
+
+
+						if (LayerCount >= 200)
+						{
+							switch5=true;
+						}
+
+						while (switch5==false)
+						{
+
+
+							if (Line1.contains("  5",Qt::CaseSensitive))
+							{
+
+								LayerDXF[LayerCount].LayerHandle=Line2;
+							}
+
+							if (Line1.contains("  2",Qt::CaseSensitive))
+							{
+
+								LayerDXF[LayerCount].LayerName=Line2;
+
+							}
+
+							if (Line1.contains("  6",Qt::CaseSensitive))
+							{
+
+								LayerDXF[LayerCount].LayerLineType=Line2;
+							}
+
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							ActiveFunction="TABLES get Layers";
+
+							StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+							ui->statusBar->clearMessage();
+							ui->statusBar->showMessage(StatusbarMessage );
+
+
+							switch5=(Line1.contains(" 0", Qt::CaseSensitive) );
+						}
+
+						LayerCount=LayerCount+1;
+
+					}
+
+
+					Aantal_Tekens = Line2.length();
+					switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+				}
+			}
+
+/* Blocks */
+			Aantal_Tekens = Line2.length();
+
+			if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("BLOCKS", Qt::CaseSensitive)and Aantal_Tekens==6)
+			{
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;
+
+				ActiveFunction="BLocks";
+
+				StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+				ui->statusBar->clearMessage();
+				ui->statusBar->showMessage(StatusbarMessage );
+
+				Aantal_Tekens = Line2.length();
+				switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+				while (switch1==false)
+				{
+					ReadLine=in.readLine();
+					Line1=ReadLine;
+					ReadLine=in.readLine();
+					Line2=ReadLine;
+					dxfLineCounter=dxfLineCounter+2;
+
+					ActiveFunction="Blocks description";
+
+					StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+					ui->statusBar->clearMessage();
+					ui->statusBar->showMessage(StatusbarMessage );
+
+					Aantal_Tekens = Line2.length();
+					switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+				}
+			}
+
+/* Entities */
+			Aantal_Tekens = Line2.length();
+			if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("ENTITIES", Qt::CaseSensitive)and Aantal_Tekens==8)
+			{
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;
+
+				ActiveFunction="Entities";
+
+				StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+				ui->statusBar->clearMessage();
+				ui->statusBar->showMessage(StatusbarMessage );
+
+				Aantal_Tekens = Line2.length();
+				switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+				while (switch1==false)
+				{
+
+/* Polyline */
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("POLYLINE", Qt::CaseSensitive)and Aantal_Tekens==8)
+					{
+
+						switch2=false;
+						LineCount=0;
+						count1=0;
+						VectorCount=0;
+
+						ActiveFunction="Polyline";
+
+						StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+						ui->statusBar->clearMessage();
+						ui->statusBar->showMessage(StatusbarMessage );
+
+
+						while (switch2 == false and switch1 == false)
+						{
+
+							Aantal_Tekens = Line2.length();
+							if (Line1.contains(" 0") and Line2.contains("VERTEX")and Aantal_Tekens==6)
+							{
+								switch4=false;
+
+								ReadLine=in.readLine();
+								Line1=ReadLine;
+								ReadLine=in.readLine();
+								Line2=ReadLine;
+								dxfLineCounter=dxfLineCounter+2;
+
+								ActiveFunction="Polyline Vertex";
+
+								StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+								ui->statusBar->clearMessage();
+								ui->statusBar->showMessage(StatusbarMessage );
+
+
+
+								while (switch4==false)
+								{
+
+									LineTable2[count1].Line1=Line1;
+									LineTable2[count1].Line2=Line2;
+
+									count1=count1+1;
+
+									ReadLine=in.readLine();
+									Line1=ReadLine;
+									ReadLine=in.readLine();
+									Line2=ReadLine;
+									dxfLineCounter=dxfLineCounter+2;
+
+									ActiveFunction="Polyline Vertex";
+
+									StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+									ui->statusBar->clearMessage();
+									ui->statusBar->showMessage(StatusbarMessage );
+
+									switch4=Line1.contains(" 0", Qt::CaseSensitive);
+
+									if (count1 >= 2000)
+									{
+
+										switch4 = true;
+
+
+
+									}
+
+								}
+
+								ConvertVertex(count1);
+								count1=0;
+
+
+
+							}
+							else
+							{
+								LineTable1[LineCount].Line1=Line1;
+								LineTable1[LineCount].Line2=Line2;
+								LineCount=LineCount+1;
+
+								ReadLine=in.readLine();
+								Line1=ReadLine;
+								ReadLine=in.readLine();
+								Line2=ReadLine;
+
+								dxfLineCounter=dxfLineCounter+2;
+								ActiveFunction="Polyline";
+
+								StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+								ui->statusBar->clearMessage();
+								ui->statusBar->showMessage(StatusbarMessage );
+							}
+
+							Aantal_Tekens = Line2.length();
+							switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+							switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("SEQEND", Qt::CaseSensitive)and Aantal_Tekens==6);
+
+							if (LineCount >= 2000)
+							{
+
+								switch1 = true;
+								switch2 = true;
+
+
+							}
+
+
+						}
+
+
+						LineBack = ConvertPolyline(LineCount);
+
+						Lineout.append(LineBack);
+
+
+
+						LineBack2 = ConvertPolylineVector(count1);
+
+						Lineout.append(LineBack2);
+
+
+
+						LineBack1=ConvertPolylineEnd(LineCount);
+
+						Lineout.append(LineBack1);
+
+
+
+
+
+
+					}
+
+/* Text */
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("TEXT", Qt::CaseSensitive)and Aantal_Tekens==4)
+					{
+						switch2=false;
+						LineCount=0;
+
+						ActiveFunction="Text";
+
+						StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+						ui->statusBar->clearMessage();
+						ui->statusBar->showMessage(StatusbarMessage );
+
+						while (switch2 == false and switch1 == false)
+						{
+
+							LineTable1[LineCount].Line1=Line1;
+							LineTable1[LineCount].Line2=Line2;
+							LineCount=LineCount+1;
+
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							Aantal_Tekens = Line2.length();
+							switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+							switch2=Line1.contains(" 0", Qt::CaseSensitive);
+
+							if (LineCount >= 2000)
+							{
+
+								switch1 = true;
+								switch2 = true;
+
+							}
+						}
+
+						LineBack = ConvertText(LineCount);
+						Lineout.append(LineBack);
+
+
+
+
+
+
+					}
+
+/* Mtext */
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("MTEXT", Qt::CaseSensitive)and Aantal_Tekens==5)
+					{
+
+						ui->SectionCount1->setPlaceholderText("Mtext function");
+						ui->SectionCount1->repaint();
+
+						switch2=false;
+						countmtext=0;
+
+						ActiveFunction="Mtext";
+
+						StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+						ui->statusBar->clearMessage();
+						ui->statusBar->showMessage(StatusbarMessage );
+
+						while (switch2 == false and switch1 == false)
+						{
+
+
+							if (Line1.contains(" 10", Qt::CaseSensitive))
+						   {
+								mx=Line2.toDouble();
+							}
+
+							if (Line1.contains(" 20", Qt::CaseSensitive))
+							{
+								my=Line2.toDouble();
+							}
+
+							if (Line1.contains(" 40", Qt::CaseSensitive))
+							{
+								mheight=Line2.toDouble();
+							}
+
+							if (Line1.contains(" 50", Qt::CaseSensitive))
+							{
+								mrotation=Line2.toDouble();
+							}
+
+							if (Line1.contains("  1", Qt::CaseSensitive))
+							{
+								mtext4=Line2;
+								mtext3[countmtext]=mtext4.section(';',-1);;
+								countmtext=countmtext+1;
+							}
+
+							if (Line1.contains("  3", Qt::CaseSensitive))
+							{
+
+								mtext4=Line2;
+								mtext3[countmtext]=mtext4.section(';',-1);;
+								countmtext=countmtext+1;
+
+							}
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							ActiveFunction="MText codes";
+
+							StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+							ui->statusBar->clearMessage();
+							ui->statusBar->showMessage(StatusbarMessage );
+
+							Aantal_Tekens = Line2.length();
+							switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+							switch2=Line1.contains(" 0", Qt::CaseSensitive);
+						}
+
+
+
+					}
+
+/* Attrib */
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ATTRIB", Qt::CaseSensitive)and Aantal_Tekens==6)
+					{
+						switch2=false;
+
+						ui->SectionCount1->setPlaceholderText("Attrib function");
+						ui->SectionCount1->repaint();
+
+
+						ActiveFunction="Attrib";
+
+						StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+						ui->statusBar->clearMessage();
+						ui->statusBar->showMessage(StatusbarMessage );
+
+						while (switch2 == false and switch1 == false)
+						{
+
+							if (Line1.contains(" 10", Qt::CaseSensitive))
+						   {
+								attx=Line2.toDouble();
+							}
+
+							if (Line1.contains(" 20", Qt::CaseSensitive))
+							{
+								atty=Line2.toDouble();
+							}
+
+							if (Line1.contains(" 40", Qt::CaseSensitive))
+							{
+								attheight=Line2.toDouble();
+							}
+
+							if (Line1.contains("  1", Qt::CaseSensitive))
+							{
+								atttext=Line2;
+							}
+
+							if (Line1.contains("  2", Qt::CaseSensitive))
+							{
+								atttag=Line2;
+							}
+
+							if (Line1.contains(" 50", Qt::CaseSensitive))
+							{
+								attrotation=Line2.toDouble();
+							}
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							ActiveFunction="Attrib code";
+
+							StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+							ui->statusBar->clearMessage();
+							ui->statusBar->showMessage(StatusbarMessage );
+
+							Aantal_Tekens = Line2.length();
+							switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+							switch2=Line1.contains(" 0", Qt::CaseSensitive);
+						}
+
+						/* <input x="-23" y="15.5" size="9" rotation="90" rotate="true" text="_" tagg="label"/> */
+
+						xattext=QString::number(attx+0.5,'f',0);
+						yattext=QString::number(atty+0.5,'f',0);
+						hattext=QString::number(attheight+0.5,'f',0);
+
+
+						Lineout.append("   ");
+						Lineout.append("   ");
+						Lineout.append("   ");
+						Lineout.append("<input x=");
+						Lineout.append(QChar(34));
+						Lineout.append(xattext);
+						Lineout.append(QChar(34));
+
+						Lineout.append(" y=");
+						Lineout.append(QChar(34));
+						Lineout.append(yattext);
+						Lineout.append(QChar(34));
+
+						Lineout.append(" size=");
+						Lineout.append(QChar(34));
+						Lineout.append(hattext);
+						Lineout.append(QChar(34));
+
+						Lineout.append(" rotation=");
+						Lineout.append(QChar(34));
+						Lineout.append(rattext);
+						Lineout.append(QChar(34));
+
+						Lineout.append(" rotate=");
+						Lineout.append(QChar(34));
+						Lineout.append("true");
+						Lineout.append(QChar(34));
+
+						if(atttext.contains("<"))
+						{
+							atttext.replace("<","&lt;");
+						}
+						if(atttext.contains(">"))
+						{
+							atttext.replace(">","&gt;");
+						}
+						if(atttext.contains("&"))
+						{
+							atttext.replace("&","&amp;");
+						}
+						if(atttext.contains(QChar(39)))
+						{
+							atttext.replace(QChar(39),"&apos;");
+						}
+						if(atttext.contains(QChar(34)))
+						{
+							atttext.replace(QChar(34),"&quot;");
+						}
+
+						if(ttext.contains("/"))
+						{
+							atttext.replace("/","-");
+						}
+
+						if(ttext.contains(QChar(92)))
+						{
+							atttext.replace(QChar(92),"-");
+						}
+
+						if(ttext.contains("*"))
+						{
+							atttext.replace("*","x");
+						}
+
+						if(atttext.contains("?"))
+						{
+							atttext.replace("?","...");
+						}
+
+						if(atttext.contains("|"))
+						{
+							atttext.replace("|","-");
+						}
+
+						Lineout.append(" text=");
+						Lineout.append(QChar(34));
+						Lineout.append(atttext);
+						Lineout.append(QChar(34));
+
+						Lineout.append(" tagg=");
+						Lineout.append(QChar(34));
+						Lineout.append(atttag);
+						Lineout.append(QChar(34));
+
+						Lineout.append(" />");
+						Lineout.append('\n');
+
+
+
+					}
+
+
+/* Line */
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("LINE", Qt::CaseSensitive) and Aantal_Tekens==4)
+					{
+						switch2=false;
+						LineCount=0;
+
+						ActiveFunction="Line";
+
+						StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+						ui->statusBar->clearMessage();
+						ui->statusBar->showMessage(StatusbarMessage );
+
+						while (switch2 == false and switch1 == false)
+						{
+							//ConvertLine1.LineTable1[LineCount].Line1=Line1;
+							//ConvertLine1.LineTable1[LineCount].Line2=Line2;
+							LineCount=LineCount+1;
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							ActiveFunction="Line code";
+
+							StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+							ui->statusBar->clearMessage();
+							ui->statusBar->showMessage(StatusbarMessage);
+
+							Aantal_Tekens = Line2.length();
+							switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+							switch2=Line1.contains(" 0", Qt::CaseSensitive);
+
+							if (LineCount >= 2000)
+							{
+
+								switch1 = true;
+								switch2 = true;
+
+							}
+						}
+
+						//ConvertLine1.LayerCount1=LayerCount;
+						//ConvertLine1.LineCount=LineCount;
+						//ConvertLine1.LayerDXF=LayerDXF;
+
+
+						//LineBack = ConvertLine1.ConvertLine();
+
+						Lineout.append(LineBack);
+
+					}
+
+/* Arc */
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ARC", Qt::CaseSensitive) and Aantal_Tekens==3)
+					{
+						switch2=false;
+						LineCount=0;
+
+						ActiveFunction="Arc";
+
+						StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+						ui->statusBar->clearMessage();
+						ui->statusBar->showMessage(StatusbarMessage );
+
+						while (switch2 == false and switch1 == false)
+						{
+
+							LineTable1[LineCount].Line1=Line1;
+							LineTable1[LineCount].Line2=Line2;
+							LineCount=LineCount+1;
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							ActiveFunction="Arc code";
+
+							StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+							ui->statusBar->clearMessage();
+							ui->statusBar->showMessage(StatusbarMessage );
+
+							Aantal_Tekens = Line2.length();
+							switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+							switch2=Line1.contains(" 0", Qt::CaseSensitive);
+
+							if (LineCount >= 2000)
+							{
+
+								switch1 = true;
+								switch2 = true;
+
+							}
+						}
+
+						LineBack = ConvertArc(LineCount, LTypeCount, LayerCount);
+						Lineout.append(LineBack);
+
+
+
+
+					}
+
+/* Circle */
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("CIRCLE", Qt::CaseSensitive) and Aantal_Tekens==6)
+					{
+						switch2=false;
+						LineCount=0;
+
+						ActiveFunction="Circle";
+
+						StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+						ui->statusBar->clearMessage();
+						ui->statusBar->showMessage(StatusbarMessage );
+
+						while (switch2 == false and switch1 == false)
+						{
+
+							LineTable1[LineCount].Line1=Line1;
+							LineTable1[LineCount].Line2=Line2;
+							LineCount=LineCount+1;
+
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+							ActiveFunction="Circle code";
+
+							StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+							ui->statusBar->clearMessage();
+							ui->statusBar->showMessage(StatusbarMessage );
+
+							Aantal_Tekens = Line2.length();
+							switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+							switch2=(Line1.contains("  0", Qt::CaseSensitive));
+
+
+							if (LineCount >= 2000)
+							{
+
+								switch1 = true;
+								switch2 = true;
+
+							}
+						}
+
+						LineBack = ConvertCircle(LineCount, LTypeCount, LayerCount);
+						Lineout.append(LineBack);
+
+
+
+
+					}
+
+/* Lwpolyline*/
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("LWPOLYLINE", Qt::CaseSensitive) and Aantal_Tekens==10)
+					{
+						switch2=false;
+						LineCount=0;
+
+						ActiveFunction="LWPOLYLINE";
+
+						StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+						ui->statusBar->clearMessage();
+						ui->statusBar->showMessage(StatusbarMessage );
+
+						while (switch2 == false and switch1 == false)
+						{
+
+							LineTable1[LineCount].Line1=Line1;
+							LineTable1[LineCount].Line2=Line2;
+							LineCount=LineCount+1;
+
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+							ActiveFunction="Circle code";
+
+							StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+							ui->statusBar->clearMessage();
+							ui->statusBar->showMessage(StatusbarMessage );
+
+							Aantal_Tekens = Line2.length();
+							switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+							switch2=(Line1.contains("  0", Qt::CaseSensitive));
+
+
+							if (LineCount >= 2000)
+							{
+
+								switch1 = true;
+								switch2 = true;
+
+							}
+						}
+
+						LineBack = ConvertLwpolyline(LineCount, LTypeCount, LayerCount);
+						Lineout.append(LineBack);
+
+
+
+
+										}
+
+
+/* Ellipse */
+					Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ELLIPSE", Qt::CaseSensitive) and Aantal_Tekens==7)
+					{
+						switch2=false;
+						LineCount=0;
+
+						ActiveFunction="ELLIPSE";
+
+						StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+						ui->statusBar->clearMessage();
+						ui->statusBar->showMessage(StatusbarMessage );
+
+						while (switch2 == false and switch1 == false)
+						{
+
+							LineTable1[LineCount].Line1=Line1;
+							LineTable1[LineCount].Line2=Line2;
+							LineCount=LineCount+1;
+
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+							ActiveFunction="Ellipse code";
+
+							StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+							ui->statusBar->clearMessage();
+							ui->statusBar->showMessage(StatusbarMessage );
+
+							Aantal_Tekens = Line2.length();
+							switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+							switch2=(Line1.contains("  0", Qt::CaseSensitive));
+
+
+							if (LineCount >= 2000)
+							{
+
+								switch1 = true;
+								switch2 = true;
+
+							}
+						}
+
+						//LineBack = ConvertEllipse(LineCount, LTypeCount, LayerCount);
+						//Lineout.append(LineBack);/* Ellipse */
+					}
+
+
+					/*Aantal_Tekens = Line2.length();
+					if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ELLIPSE", Qt::CaseSensitive) and Aantal_Tekens==7)
+					{
+						switch2=false;
+						LineCount=0;
+
+						ActiveFunction="Ellipse";
+
+						StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+						ui->statusBar->clearMessage();
+						ui->statusBar->showMessage(StatusbarMessage );
+
+						while (switch2 == false and switch1 == false)
+						{
+
+							LineTable1[LineCount].Line1=Line1;
+							LineTable1[LineCount].Line2=Line2;
+							LineCount=LineCount+1;
+
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+							ActiveFunction="Circle code";
+
+							StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+							ui->statusBar->clearMessage();
+							ui->statusBar->showMessage(StatusbarMessage );
+
+							Aantal_Tekens = Line2.length();
+							switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+							switch2=(Line1.contains("  0", Qt::CaseSensitive));
+
+
+							if (LineCount >= 2000)
+							{
+
+								switch1 = true;
+								switch2 = true;
+
+							}
+						}
+
+						LineBack = ConvertCircle(LineCount, LTypeCount, LayerCount);
+						Lineout.append(LineBack);
+
+
+
+
+					}*/
+
+
+
+
+
+
+
+/* control */
+					Aantal_Tekens = Line2.length();
+
+					ActiveFunction="End of loop control";
+
+					StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+					ui->statusBar->clearMessage();
+					ui->statusBar->showMessage(StatusbarMessage );
+
+					ui->ExportToELMT->setPlainText(Lineout);
+					ui->ExportToELMT->repaint();
+
+					if( Line2.contains("POLYLINE", Qt::CaseSensitive)and Aantal_Tekens==8)
+					{
+						switch3 = false;
+					}
+					else
+
+						if( Line2.contains("TEXT", Qt::CaseSensitive)and Aantal_Tekens==4)
+						{
+							switch3 = false;
+
+						}
+						else
+							if( Line2.contains("LINE", Qt::CaseSensitive)and Aantal_Tekens==4)
+							{
+								switch3 = false;
+							}
+							else
+								if( Line2.contains("ARC", Qt::CaseSensitive)and Aantal_Tekens==3)
+								{
+									switch3 = false;
+								}
+								else
+									  if ( Line2.contains("CIRCLE", Qt::CaseSensitive)and Aantal_Tekens==6)
+									{
+										switch3 = false;
+									}
+									else
+										if ( Line2.contains("MTEXT", Qt::CaseSensitive)and Aantal_Tekens==5)
+										{
+											switch3 = false;
+										}
+										else
+											if ( Line2.contains("ATTRIB", Qt::CaseSensitive)and Aantal_Tekens==6)
+											{
+												switch3 = false;
+											}
+											else
+
+												if ( Line2.contains("ELLIPSE", Qt::CaseSensitive)and Aantal_Tekens==7)
+												{
+													switch3 = false;
+												}
+												else
+
+													if ( Line2.contains("LWPOLYLINE", Qt::CaseSensitive)and Aantal_Tekens==7)
+													{
+														switch3 = false;
+													}
+													else
+													{
+														switch3 = true;
+													}
+
+
+
+
+
+					if (Line1.contains(" 0", Qt::CaseSensitive) and switch3)
+					{
+						switch2=false;
+
+						while (switch2 == false and switch1 == false)
+						{
+
+
+							ReadLine=in.readLine();
+							Line1=ReadLine;
+							ReadLine=in.readLine();
+							Line2=ReadLine;
+							dxfLineCounter=dxfLineCounter+2;
+
+							ActiveFunction="Reading code that needs to converted";
+
+							StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+							ui->statusBar->clearMessage();
+							ui->statusBar->showMessage(StatusbarMessage );
+
+							switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive));
+							switch2=Line1.contains(" 0", Qt::CaseSensitive);
+						}
+
+
+
+					}
+
+
+					switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive));
+
+					ui->ExportToELMT->setPlainText(Lineout);
+					ui->ExportToELMT->repaint();
+
+				}
+
+
+
+				/*-------*/
+				while (switch1==false)
+				{
+					ReadLine=in.readLine();
+					Line1=ReadLine;
+					ReadLine=in.readLine();
+					Line2=ReadLine;
+					dxfLineCounter=dxfLineCounter+2;
+
+					ActiveFunction="Read next pair of lines";
+
+					StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+					ui->statusBar->clearMessage();
+					ui->statusBar->showMessage(StatusbarMessage );
+
+					switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive));
+				}
+			}
+
+/* Objects */
+
+			Aantal_Tekens = Line2.length();
+			if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("OBJECTS", Qt::CaseSensitive)and Aantal_Tekens==7)
+			{
+
+				ActiveFunction="Objects";
+
+				StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+				ui->statusBar->clearMessage();
+				ui->statusBar->showMessage(StatusbarMessage );
+
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;
+
+				switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive));
+
+				while (switch1==false)
+				{
+					ReadLine=in.readLine();
+					Line1=ReadLine;
+					ReadLine=in.readLine();
+					Line2=ReadLine;
+					dxfLineCounter=dxfLineCounter+2;
+
+					ActiveFunction="Object codes";
+
+					StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+					ui->statusBar->clearMessage();
+					ui->statusBar->showMessage(StatusbarMessage );
+
+					switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive));
+				}
+			}
+
+/* Thumbnailimage */
+
+			Aantal_Tekens = Line2.length();
+			if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("THUMBNAILIMAGE", Qt::CaseSensitive) and Aantal_Tekens==14)
+			{
+				ActiveFunction="Thumbnailimage";
+
+				StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+				ui->statusBar->clearMessage();
+				ui->statusBar->showMessage(StatusbarMessage );
+
+				ReadLine=in.readLine();
+				Line1=ReadLine;
+				ReadLine=in.readLine();
+				Line2=ReadLine;
+				dxfLineCounter=dxfLineCounter+2;
+
+				ActiveFunction="Thumbnailimage";
+
+				StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+				ui->statusBar->clearMessage();
+				ui->statusBar->showMessage(StatusbarMessage );
+
+				switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive));
+
+				while (switch1==false)
+				{
+					ReadLine=in.readLine();
+					Line1=ReadLine;
+					ReadLine=in.readLine();
+					Line2=ReadLine;
+					dxfLineCounter=dxfLineCounter+2;
+
+					ActiveFunction="Thumbnailimage codes";
+
+					StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+					ui->statusBar->clearMessage();
+					ui->statusBar->showMessage(StatusbarMessage );
+
+					switch1=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive));
+				}
+			}
+
+		}
+
+/* Endsection  */
+		Aantal_Tekens = Line2.length();
+		if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6)
+		{
+
+			ActiveFunction="Endsection";
+
+			StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+			ui->statusBar->clearMessage();
+			ui->statusBar->showMessage(StatusbarMessage );
+
+			countEndSec+=1;
+
+			ReadLine=in.readLine();
+			Line1=ReadLine;
+			ReadLine=in.readLine();
+			Line2=ReadLine;
+			dxfLineCounter=dxfLineCounter+2;
+
+			ActiveFunction="Endsection code";
+
+			StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+			ui->statusBar->clearMessage();
+			ui->statusBar->showMessage(StatusbarMessage );
+
+			if (countEndSec==1)
+			{
+				QString bestand;
+
+				bestand = ui->m_elmt_name_le->placeholderText();
+
+
+				xwidth1=x2-x1;
+				xheight1=y2-y1;
+				width1=QString::number (xwidth1,'f',2);
+				height1=QString::number (xheight1,'f',2);
+				/* definition */
+				Lineout.append("<definition");
+
+				Lineout.append(" width=");
+				Lineout.append(QChar(34));
+				Lineout.append(width1);
+				Lineout.append(QChar(34));
+
+				Lineout.append(" height=");
+				Lineout.append(QChar(34));
+				Lineout.append(height1);
+				Lineout.append(QChar(34));
+
+
+				Lineout.append(" version=");
+				Lineout.append(QChar(34));
+				Lineout.append("0.4");
+				Lineout.append(QChar(34));
+
+				Lineout.append(" hotspot_x=");
+				Lineout.append(QChar(34));
+				Lineout.append("5");
+				Lineout.append(QChar(34));
+
+				Lineout.append(" hotspot_y=");
+				Lineout.append(QChar(34));
+				Lineout.append("5");
+				Lineout.append(QChar(34));
+
+				Lineout.append(" type=");
+				Lineout.append(QChar(34));
+				Lineout.append("element");
+				Lineout.append(QChar(34));
+
+				Lineout.append(" orientation=");
+				Lineout.append(QChar(34));
+				Lineout.append("dyyy");
+				Lineout.append(QChar(34));
+
+				Lineout.append(" ic=");
+				Lineout.append(QChar(34));
+				Lineout.append("true");
+				Lineout.append(QChar(34));
+
+				Lineout.append(" lin_type=");
+				Lineout.append(QChar(34));
+				Lineout.append("simple");
+				Lineout.append(QChar(34));
+
+				Lineout.append(">");
+				Lineout.append('\n');
+
+				ui->ExportToELMT->setPlainText(Lineout);
+				ui->ExportToELMT->repaint();
+
+				/* names */
+				Lineout.append("   ");
+				Lineout.append("<names>");
+				Lineout.append('\n');
+
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("fr");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("en");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("be");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("nl");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("hr");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("pl");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("it");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("sl");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("ca");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("pt");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("el");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("de");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("es");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("cs");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("ro");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("ru");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("<name lang=");
+				Lineout.append(QChar(34));
+				Lineout.append("ar");
+				Lineout.append(QChar(34));
+				Lineout.append(">");
+				Lineout.append(ui->m_elmt_name_le->text());
+				Lineout.append("</name>");
+				Lineout.append('\n');
+
+
+				Lineout.append("   ");
+				Lineout.append("</names>");
+				Lineout.append('\n');
+
+
+
+				/* informations */
+				Lineout.append("   ");
+				Lineout.append("<informations>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("Author : Ronny Desmedt");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("   ");
+				Lineout.append("ELMT created by dxfTOelmt converter");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("</informations>");
+				Lineout.append('\n');
+
+				Lineout.append("   ");
+				Lineout.append("<description>");
+				Lineout.append('\n');
+
+
+
+
+
+
+
+			}
+		}
+
+/* EOF */
+		if (Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("EOF", Qt::CaseSensitive))
+		{
+
+			ActiveFunction="EOF";
+
+			StatusbarMessage = SetStatusBarMessage(dxfLineCounter, Line1, Line2, ActiveFunction);
+
+			ui->statusBar->clearMessage();
+			ui->statusBar->showMessage(StatusbarMessage );
+
+			//<terminal x="0" y="7" orientation="n"/>
+
+			Lineout.append("   ");
+			Lineout.append("   ");
+			Lineout.append("   ");
+			Lineout.append("<terminal x=");
+
+			Lineout.append(QChar(34));
+			Lineout.append("0");
+			Lineout.append(QChar(34));
+
+			Lineout.append(" y=");
+
+			Lineout.append(QChar(34));
+			Lineout.append("0");
+			Lineout.append(QChar(34));
+
+			Lineout.append(" orientation=");
+
+			Lineout.append(QChar(34));
+			Lineout.append("n");
+			Lineout.append(QChar(34));
+
+			Lineout.append(" />");
+			Lineout.append('\n');
+
+			Lineout.append("   ");
+			Lineout.append("</description>");
+			Lineout.append('\n');
+
+			Lineout.append("</definition>");
+
+			Lineout.append('\n');
+
+
+			ReadLine=in.readLine();
+		}
+
+
+	}/*end reading file*/
+
+	ui->ExportToELMT->setPlainText(Lineout);
+	ui->ExportToELMT->repaint();
+
+}
+
+/*************/
+/* functions */
+/*************/
+
+/* LINE */
+
+QString MainWindow::ConvertLine( int LineCount, int LTypeCount1, int LayerCount1)
+{
+
+	//DXF_LType LType1;
+
+	int x;
+	int y;
+
+	QString Lineout;
+	QString line_x1;
+	QString line_y1;
+	QString line_x2;
+	QString line_y2;
+	QString LineTypeOFLine;
+	QString LayerNameOFLine;
+	QString LineStyle;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+
+	double lijn_x1;
+	double lijn_x2;
+	double lijn_y1;
+	double lijn_y2;
+
+	ui->SectionCount1->setPlaceholderText("Line function");
+	ui->SectionCount1->repaint();
+
+
+	ActiveFunction="Line function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	ui->statusBar->clearMessage();
+	ui->statusBar->showMessage(StatusbarMessage );
+
+	LineStyle="normal";
+
+	/* get line parameters */
+
+	for (x=0;x<LineCount;x++)
+	{
+
+		if (LineTable1[x].Line1.contains(" 10", Qt::CaseSensitive))
+	   {
+			lijn_x1=LineTable1[x].Line2.toDouble();
+		}
+
+		if (LineTable1[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			lijn_y1=-(LineTable1[x].Line2.toDouble());
+		}
+
+		if (LineTable1[x].Line1.contains(" 11", Qt::CaseSensitive))
+	   {
+			lijn_x2=LineTable1[x].Line2.toDouble();
+		}
+
+		if (LineTable1[x].Line1.contains(" 21", Qt::CaseSensitive))
+		{
+			lijn_y2=-LineTable1[x].Line2.toDouble();
+		}
+
+		if (LineTable1[x].Line1.contains("  6", Qt::CaseSensitive))
+		{
+			LineTypeOFLine=LineTable1[x].Line2;
+		}
+
+		if (LineTable1[x].Line1.contains("  8", Qt::CaseSensitive))
+		{
+			LayerNameOFLine=LineTable1[x].Line2;
+		}
+
+	}
+
+	/* find out line type */
+
+	if (LineTypeOFLine == "")
+	{
+
+		for (y=0;y<LayerCount1+1;y++)
+		{
+
+			if (LayerDXF[y].LayerName.contains(LayerNameOFLine))
+			{
+				//LineStyle=LType1.GetLineType(LayerDXF[y].LayerLineType);
+			}
+		}
+
+	}
+	else
+	{
+		LineStyle=GetLineType(LineTypeOFLine);
+
+	}
+
+	/* create qet elmt code */
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<line lenght1=");
+	Lineout.append(QChar(34));
+	Lineout.append("1.5");
+	Lineout.append(QChar(34));
+	Lineout.append(" lenght2=");
+	Lineout.append(QChar(34));
+	Lineout.append("1.5");
+	Lineout.append(QChar(34));
+	Lineout.append(" antialias=");
+	Lineout.append(QChar(34));
+	Lineout.append("false");
+	Lineout.append(QChar(34));
+	Lineout.append(" end1=");
+	Lineout.append(QChar(34));
+	Lineout.append("none");
+	Lineout.append(QChar(34));
+	Lineout.append(" end2=");
+	Lineout.append(QChar(34));
+	Lineout.append("none");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" style=");
+	Lineout.append(QChar(34));
+	Lineout.append("line-style:");
+	Lineout.append(LineStyle);
+	Lineout.append(";");
+	Lineout.append("line-weight:thin;");
+	Lineout.append("filling:none;");
+	Lineout.append("color:black");
+	Lineout.append(QChar(34));
+
+
+	line_x1=QString::number (lijn_x1,'f',2);
+	line_y1=QString::number (lijn_y1,'f',2);
+	line_x2=QString::number (lijn_x2,'f',2);
+	line_y2=QString::number (lijn_y2,'f',2);
+
+	Lineout.append(" x1=");
+	Lineout.append(QChar(34));
+	Lineout.append(line_x1);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y1=");
+	Lineout.append(QChar(34));
+	Lineout.append(line_y1);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" x2=");
+	Lineout.append(QChar(34));
+	Lineout.append(line_x2);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y2=");
+	Lineout.append(QChar(34));
+	Lineout.append(line_y2);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+	return Lineout;
+}
+
+/* Circle */
+
+/*QString MainWindow::ConvertCircle( int LineCount,int LTypeCount1, int LayerCount1)
+{
+
+
+	int x;
+	int y;
+
+	QString Lineout;
+	QString x_center;
+	QString y_center;
+	QString breedte;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString LineTypeOFLine;
+	QString LayerNameOFLine;
+	QString LineStyle;
+
+
+	double center_x;
+	double center_y;
+	double radius;
+
+	ui->SectionCount1->setPlaceholderText("Circle function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Circle function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	for (x=0;x<LineCount;x++)
+	{
+		if (LineTable1[x].Line1.contains(" 10", Qt::CaseSensitive) )
+	   {
+			center_x=LineTable1[x].Line2.toDouble();
+		}
+
+		if (LineTable1[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			center_y=-(LineTable1[x].Line2.toDouble());
+		}
+
+		if (LineTable1[x].Line1.contains(" 40", Qt::CaseSensitive))
+		{
+			radius=LineTable1[x].Line2.toDouble();
+		}
+		if (LineTable1[x].Line1.contains("  6", Qt::CaseSensitive))
+		{
+			LineTypeOFLine=LineTable1[x].Line2;
+		}
+
+		if (LineTable1[x].Line1.contains("  8", Qt::CaseSensitive))
+		{
+			LayerNameOFLine=LineTable1[x].Line2;
+		}
+
+
+    }*/
+
+    /* find out line type */
+
+    /*if (LineTypeOFLine == "")
+	{
+
+		for (y=0;y<LayerCount1+1;y++)
+		{
+
+			if (LayerDXF[y].LayerName.contains(LayerNameOFLine))
+			{
+				LineStyle=GetLineType(LayerDXF[y].LayerLineType);
+			}
+		}
+
+	}
+	else
+	{
+		LineStyle=GetLineType(LineTypeOFLine);
+
+	}
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<ellipse x=");
+
+	x_center=QString::number ((center_x - radius),'f',2);
+	y_center=QString::number ((center_y - radius),'f',2);
+
+	Lineout.append(QChar(34));
+	Lineout.append(x_center);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y=");
+	Lineout.append(QChar(34));
+	Lineout.append(y_center);
+	Lineout.append(QChar(34));
+
+
+	Lineout.append(" antialias=");
+	Lineout.append(QChar(34));
+	Lineout.append("true");
+	Lineout.append(QChar(34));
+
+	breedte=QString::number (( radius * 2),'f',2);
+
+	Lineout.append(" height=");
+	Lineout.append(QChar(34));
+	Lineout.append(breedte);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" width=");
+	Lineout.append(QChar(34));
+	Lineout.append(breedte);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" style=");
+	Lineout.append(QChar(34));
+	Lineout.append("line-style:");
+	Lineout.append(LineStyle);
+	Lineout.append(";");
+	Lineout.append("line-weight:thin;");
+	Lineout.append("filling:none;");
+	Lineout.append("color:black");
+	Lineout.append(QChar(34));
+
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+    return Lineout;*/
+}
+
+
+
+QString MainWindow::ControlText (QString Ctext1)
+{
+	QString ActiveFunction;
+	QString StatusbarMessage;
+
+	ui->SectionCount1->setPlaceholderText("Control chars in text");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Cotrol text on special characters";
+
+	StatusbarMessage = SetStatusBarMessage(0, " ", " ", ActiveFunction);
+
+	if(Ctext1.contains("<"))
+	{
+		Ctext1.replace("<","&lt;");
+	}
+	if(Ctext1.contains(">"))
+	{
+		Ctext1.replace(">","&gt;");
+	}
+	if(Ctext1.contains("&"))
+	{
+		Ctext1.replace("&","&amp;");
+	}
+	if(Ctext1.contains(QChar(39)))
+	{
+		Ctext1.replace(QChar(39),"&apos;");
+	}
+	if(Ctext1.contains(QChar(34)))
+	{
+		Ctext1.replace(QChar(34),"&quot;");
+	}
+
+	if(Ctext1.contains("/"))
+	{
+		Ctext1.replace("/","-");
+	}
+
+	if(Ctext1.contains(QChar(92)))
+	{
+		Ctext1.replace(QChar(92),"-");
+	}
+
+	if(Ctext1.contains("*"))
+	{
+		Ctext1.replace("*","x");
+	}
+
+	if(Ctext1.contains("?"))
+	{
+		Ctext1.replace("?","...");
+	}
+
+	if(Ctext1.contains("|"))
+	{
+		Ctext1.replace("|","-");
+	}
+
+	return Ctext1;
+
+}
+
+
+QString MainWindow::ConvertText( int LineCount)
+{
+
+
+	int x;
+
+	QString Lineout;
+	QString ttext;
+	QString xtext;
+	QString ytext;
+	QString htext;
+	QString rtext;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString TextHeight;
+	QString TextScale;
+
+
+	double tx;
+	double ty;
+	double theight;
+	double trotation;
+	double tscale;
+
+	ui->SectionCount1->setPlaceholderText("Text function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Text function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+
+	for (x=0;x<LineCount;x++)
+	{
+
+
+		if (LineTable1[x].Line1.contains(" 10", Qt::CaseSensitive))
+		{
+			tx=LineTable1[x].Line2.toDouble();
+		}
+
+		if (LineTable1[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			ty=LineTable1[x].Line2.toDouble();
+		}
+
+		if (LineTable1[x].Line1.contains(" 40", Qt::CaseSensitive))
+		{
+			theight=LineTable1[x].Line2.toDouble();
+		}
+
+		if (LineTable1[x].Line1.contains("  1", Qt::CaseSensitive))
+		{
+			ttext=LineTable1[x].Line2;
+		}
+
+		if (LineTable1[x].Line1.contains(" 50", Qt::CaseSensitive))
+		{
+			trotation=LineTable1[x].Line2.toDouble();
+		}
+		if (LineTable1[x].Line1.contains(" 41", Qt::CaseSensitive))
+		{
+			tscale=LineTable1[x].Line2.toDouble();
+		}
+	}
+
+	/* <text x="-29" y="-8" size="9" rotation="270" text="Test"/> */
+
+
+	xtext=QString::number(tx+0.5,'f',0);
+	ytext=QString::number(ty+0.5,'f',0);
+	htext=QString::number(theight+0.5,'f',0);
+	rtext=QString::number(trotation-90,'f',0);
+
+	/* create qet elmt code */
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<text x=");
+	Lineout.append(QChar(34));
+	Lineout.append(xtext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y=");
+	Lineout.append(QChar(34));
+	Lineout.append(ytext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" size=");
+	Lineout.append(QChar(34));
+	Lineout.append(htext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" rotation=");
+	Lineout.append(QChar(34));
+	Lineout.append(rtext);
+	Lineout.append(QChar(34));
+
+	ttext = ControlText (ttext);
+
+	Lineout.append(" text=");
+	Lineout.append(QChar(34));
+	Lineout.append(ttext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+
+
+	return Lineout;
+
+
+}
+
+QString MainWindow::ConvertMText( int LineCount)
+{
+	/* <text x="-29" y="-8" size="9" rotation="270" text="Test"/> */
+
+
+	/*ytext=QString::number(my,'f',2);
+	htext=QString::number(mheight,'f',2);
+
+
+	for (forlus3=0;forlus3==countmtext;forlus3++)
+	{
+
+
+
+		if(mtext3[forlus3].contains("<"))
+		{
+			mtext3[forlus3].replace("<","&lt;");
+		}
+		if(mtext3[forlus3].contains(">"))
+		{
+			mtext3[forlus3].replace(">","&gt;");
+		}
+		if(mtext3[forlus3].contains("&"))
+		{
+			mtext3[forlus3].replace("&","&amp;");
+		}
+		if(mtext3[forlus3].contains(QChar(39)))
+		{
+			mtext3[forlus3].replace(QChar(39),"&apos;");
+		}
+		if(mtext3[forlus3].contains(QChar(34)))
+		{
+			mtext3[forlus3].replace(QChar(34),"&quot;");
+		}
+
+		if(mtext3[forlus3].contains("/"))
+		{
+			mtext3[forlus3].replace("/","-");
+		}
+
+		if(mtext3[forlus3].contains(QChar(92)))
+		{
+			mtext3[forlus3].replace(QChar(92),"-");
+		}
+
+		if(mtext3[forlus3].contains("*"))
+		{
+			mtext3[forlus3].replace("*","x");
+		}
+
+		if(mtext3[forlus3].contains("?"))
+		{
+			mtext3[forlus3].replace("?","...");
+		}
+
+		if(mtext3[forlus3].contains("|"))
+		{
+			mtext3[forlus3].replace("|","-");
+		}
+		if (forlus3==0)
+		{
+			mtextresult= mtext3[forlus3];
+		}
+		else
+		{
+			mtextresult.append( mtext3[forlus3]);
+		}
+	}
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<text x=");
+	Lineout.append(QChar(34));
+	Lineout.append(xtext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y=");
+	Lineout.append(QChar(34));
+	Lineout.append(ytext);
+	Lineout.append(QChar(34));
+
+
+	Lineout.append(" size=");
+	Lineout.append(QChar(34));
+	Lineout.append(htext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" rotation=");
+	Lineout.append(QChar(34));
+	Lineout.append(rtext);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" text=");
+	Lineout.append(QChar(34));
+	Lineout.append(mtextresult);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');*/
+
+	//ui->ExportToELMT->setPlainText(Lineout);
+	//ui->ExportToELMT->repaint();
+}
+
+QString MainWindow::ConvertArc(int LineCount,int LTypeCount1, int LayerCount1)
+{
+
+
+
+	int x;
+	int y;
+
+	double center_x;
+	double center_y;
+	double radius;
+	double start_angle;
+	double end_angle;
+	double hoek2;
+	double begin;
+	double einde;
+	double begin1;
+	double einde1;
+	double hoek_einde;
+	double N;
+	double O;
+	double J;
+	double K;
+	double L;
+	double M;
+	double R;
+	double S;
+	double T;
+	double U;
+	double V;
+	double W;
+
+
+	QString Lineout;
+	QString x_center;
+	QString y_center;
+	QString breedte;
+	QString hoogte;
+	QString hoek;
+	QString start_hoek;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString LineTypeOFLine;
+	QString LayerNameOFLine;
+	QString LineStyle;
+
+	ui->SectionCount1->setPlaceholderText("Arc function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Arc function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	for (x=0;x<LineCount;x++)
+	{
+		if (LineTable1[x].Line1.contains(" 10", Qt::CaseSensitive) )
+	   {
+			center_x=LineTable1[x].Line2.toDouble();
+		}
+
+		if (LineTable1[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			center_y=-(LineTable1[x].Line2.toDouble());
+		}
+
+		if (LineTable1[x].Line1.contains(" 40", Qt::CaseSensitive))
+		{
+			radius=LineTable1[x].Line2.toDouble();
+		}
+
+
+		if (LineTable1[x].Line1.contains(" 50", Qt::CaseSensitive))
+		{
+			start_angle=LineTable1[x].Line2.toDouble();
+		}
+
+
+		if (LineTable1[x].Line1.contains(" 51", Qt::CaseSensitive))
+		{
+			end_angle=LineTable1[x].Line2.toDouble();
+		}
+
+		if (LineTable1[x].Line1.contains("  6", Qt::CaseSensitive))
+		{
+			LineTypeOFLine=LineTable1[x].Line2;
+		}
+
+		if (LineTable1[x].Line1.contains("  8", Qt::CaseSensitive))
+		{
+			LayerNameOFLine=LineTable1[x].Line2;
+		}
+
+
+	}
+
+
+	/* find out line type */
+
+	if (LineTypeOFLine == "")
+	{
+
+		for (y=0;y<LayerCount1+1;y++)
+		{
+
+			if (LayerDXF[y].LayerName.contains(LayerNameOFLine))
+			{
+				LineStyle=GetLineType(LayerDXF[y].LayerLineType);
+			}
+		}
+
+	}
+	else
+	{
+		LineStyle=GetLineType(LineTypeOFLine);
+
+	}
+
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<arc x=");
+
+	x_center=QString::number ((center_x - radius),'f',2);
+	y_center=QString::number ((center_y - radius),'f',2);
+
+	Lineout.append(QChar(34));
+	Lineout.append(x_center);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y=");
+	Lineout.append(QChar(34));
+	Lineout.append(y_center);
+	Lineout.append(QChar(34));
+
+
+	Lineout.append(" antialias=");
+	Lineout.append(QChar(34));
+	Lineout.append("false");
+	Lineout.append(QChar(34));
+
+	breedte=QString::number (( radius * 2),'f',2);
+	hoogte=QString::number (( radius * 2),'f',2);
+
+	Lineout.append(" width=");
+	Lineout.append(QChar(34));
+	Lineout.append(breedte);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" height=");
+	Lineout.append(QChar(34));
+	Lineout.append(hoogte);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" style=");
+	Lineout.append(QChar(34));
+	Lineout.append("line-style:");
+	Lineout.append(LineStyle);
+	Lineout.append(";");
+	Lineout.append("line-weight:thin;");
+	Lineout.append("filling:none;");
+	Lineout.append("color:black");
+	Lineout.append(QChar(34));
+
+
+
+	/*
+		h = (450° - acad°)/30
+		qet° = 30* (450° - acad°)/30 = 450° - acad°
+		dus als acad_start° = 60° Þ qet_start° = 450° - 60° = 390° en opnieuw qet_start° > 360° dus qet_start° = 390° - 360° = 30°
+		acad­­_end° = 110° Þ qet_end° = 450° - 110° = 340° < 360° dus die hoek blijft 340°
+		qet_hoek° = qet_end° - qet_start° = 340° - 30° = 310°
+
+	*/
+
+	/* hoek ACAD omrekenen naar QET */
+
+
+	begin1=450-start_angle;
+	einde1=450-end_angle;
+
+
+	if (begin1>360)
+	{
+		begin=begin1-360;
+	}
+	else
+	{
+		if(begin1<0)
+		{
+			begin=360-begin1;
+		}
+		else
+		{
+			begin=begin1;
+		}
+	}
+
+	if (einde1>360)
+	{
+		einde=einde1-360;
+	}
+	else
+	{
+		if (einde1<0)
+		{
+			einde=einde1-360;
+		}
+		else
+		{
+			einde=einde1;
+		}
+	}
+
+
+
+	/* calculate hoek */
+
+	if (begin>einde)
+	{
+		N=einde-begin;
+	}
+	else
+	{
+		N=einde-begin-360;
+	}
+
+	if (N<0)
+	{
+		O=-N;
+	}
+	else
+	{
+		O=N;
+	}
+
+	J=end_angle-start_angle+N;
+	K=360-end_angle;
+	L=360-start_angle;
+	M=K-L;
+	R=-O;
+	S=J-O;
+
+	if (S < -360)
+	{
+		T=S+360;
+	}
+	else
+	{
+		T=S;
+	}
+
+	if (begin<einde)
+	{
+		U=M;
+	}
+	else
+	{
+		U=T;
+	}
+
+	if (U<0)
+	{
+		V=-U;
+	}
+	else
+	{
+		V=U;
+	}
+
+	W=U+V;
+
+	if (W==0)
+	{
+		hoek2=-V;
+	}
+	else
+	{
+		hoek2=T;
+	}
+
+
+
+
+
+
+
+	/* einde omrekening */
+
+	hoek=QString::number (-hoek2,'f',0);
+	start_hoek=QString::number ((-(begin-90)),'f',0);
+
+
+	Lineout.append(" start=");
+	Lineout.append(QChar(34));
+	Lineout.append(start_hoek);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" angle=");
+	Lineout.append(QChar(34));
+	Lineout.append(hoek);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+	return Lineout;
+
+}
+
+
+QString MainWindow::ConvertAttrib( int LineCount, int LTypeCount1, int LayerCount1)
+{
+
+	int x;
+
+	double x_as;
+	double y_as;
+
+	QString startx;
+	QString starty;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString Lineout;
+
+
+	ui->SectionCount1->setPlaceholderText("Attribute  function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Attribute function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	for (x=0;x<LineCount;x++)
+	{
+
+
+
+
+		if (LineTable1[x].Line1.contains(" 10"))
+		{
+			 x_as=LineTable1[x].Line2.toDouble();
+			 startx=QString::number(x_as,'f',2);
+
+		 }
+
+		 if (LineTable1[x].Line1.contains(" 20") )
+		 {
+			 y_as=-LineTable1[x].Line2.toDouble();
+			 starty=QString::number(y_as,'f',2);
+		 }
+
+
+
+
+	}
+
+
+	return Lineout;
+}
+
+
+/* polyline */
+QString MainWindow::ConvertPolyline(int LineCount)
+{
+
+
+	int x;
+
+	QString Lineout;
+	QString Pclose;
+	QString startx;
+	QString starty;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+
+	double Polyclose;
+	double polyx;
+	double polyy;
+
+	ui->SectionCount1->setPlaceholderText("Polyline function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Polyline function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	for (x=0;x<LineCount;x++)
+	{
+
+
+		if (LineTable1[x].Line1.contains(" 70"))
+		{
+			 Polyclose=LineTable1[x].Line2.toDouble();
+
+		}
+
+		if (LineTable1[x].Line1.contains(" 10"))
+		{
+			 polyx=LineTable1[x].Line2.toDouble();
+			 startx=QString::number(polyx,'f',2);
+
+		 }
+
+		 if (LineTable1[x].Line1.contains(" 20") )
+		 {
+			 polyy=-LineTable1[x].Line2.toDouble();
+			 starty=QString::number(polyy,'f',2);
+		 }
+
+
+
+
+	}
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<polygon");
+
+	if (Polyclose==1)
+	{
+		Pclose="true";
+	}
+	else
+	{
+		Pclose="false";
+	}
+
+	Lineout.append(" closed=");
+	Lineout.append(QChar(34));
+	Lineout.append(Pclose);
+	Lineout.append(QChar(34));
+
+
+	return Lineout;
+}
+
+QString MainWindow::ConvertBlock( int LineCount, int LTypeCount1, int LayerCount1)
+{
+	int x;
+
+	double x_as;
+	double y_as;
+
+	QString startx;
+	QString starty;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString Lineout;
+
+
+	ui->SectionCount1->setPlaceholderText("Block  function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Block function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	for (x=0;x<LineCount;x++)
+	{
+
+
+
+
+		if (LineTable1[x].Line1.contains(" 10"))
+		{
+			 x_as=LineTable1[x].Line2.toDouble();
+			 startx=QString::number(x_as,'f',2);
+
+		 }
+
+		 if (LineTable1[x].Line1.contains(" 20") )
+		 {
+			 y_as=-LineTable1[x].Line2.toDouble();
+			 starty=QString::number(y_as,'f',2);
+		 }
+
+
+
+
+	}
+
+
+	return Lineout;
+}
+
+
+/*ellipse */
+QString MainWindow::ConvertEllipse(int LineCount, int LTypeCount1, int LayerCount1)
+{
+
+	int x;
+	int y;
+
+	QString Lineout;
+	QString LineTypeOFLine;
+	QString LayerNameOFLine;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString LineStyle;
+
+
+	double center_x1;
+	double center_y1;
+	double center_x2;
+	double center_y2;
+	double ratio;
+	double begin;
+	double einde;
+	double hoek2;
+	double start_angle;
+	double end_angle;
+	double radius;
+
+	double N;
+	double O;
+	double J;
+	double K;
+	double L;
+	double M;
+	double R;
+	double S;
+	double T;
+	double U;
+	double V;
+	double W;
+
+	QString Cx1;
+	QString Cy1;
+	QString Width1;
+	QString Height1;
+
+	QString Hoek1;
+	QString x_center;
+	QString y_center;
+	QString hoogte;
+	QString breedte;
+	QString hoek;
+	QString start_hoek;
+
+
+
+	ui->SectionCount1->setPlaceholderText("Ellipse function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Ellipse function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	for (x=0;x<LineCount;x++)
+	{
+		if (LineTable1[x].Line1.contains(" 10", Qt::CaseSensitive) )
+		{
+			center_x1=LineTable1[x].Line2.toDouble();
+		}
+
+		if (LineTable1[x].Line1.contains(" 20", Qt::CaseSensitive))
+		{
+			center_y1=-(LineTable1[x].Line2.toDouble());
+		}
+
+		if (LineTable1[x].Line1.contains(" 11", Qt::CaseSensitive) )
+		{
+			center_x2=LineTable1[x].Line2.toDouble();
+		}
+
+		if (LineTable1[x].Line1.contains(" 21", Qt::CaseSensitive))
+		{
+			center_y2=-(LineTable1[x].Line2.toDouble());
+		}
+
+		if (LineTable1[x].Line1.contains(" 40", Qt::CaseSensitive))
+		{
+			ratio=LineTable1[x].Line2.toDouble();
+		}
+
+
+		if (LineTable1[x].Line1.contains(" 41", Qt::CaseSensitive))
+		{
+			begin=LineTable1[x].Line2.toDouble();
+		}
+
+		if (LineTable1[x].Line1.contains(" 42", Qt::CaseSensitive))
+		{
+			einde=LineTable1[x].Line2.toDouble();
+		}
+
+
+
+
+
+		if (LineTable1[x].Line1.contains("  6", Qt::CaseSensitive))
+		{
+			LineTypeOFLine=LineTable1[x].Line2;
+		}
+
+		if (LineTable1[x].Line1.contains("  8", Qt::CaseSensitive))
+		{
+			LayerNameOFLine=LineTable1[x].Line2;
+		}
+
+
+	}
+
+	/* find out line type */
+
+	if (LineTypeOFLine == "")
+	{
+
+		for (y=0;y<LayerCount1+1;y++)
+		{
+
+			if (LayerDXF[y].LayerName.contains(LayerNameOFLine))
+			{
+				LineStyle=GetLineType(LayerDXF[y].LayerLineType);
+			}
+		}
+
+	}
+	else
+	{
+		LineStyle=GetLineType(LineTypeOFLine);
+
+	}
+
+	//<arc width="20" x="-15" y="-8" antialias="true" height="38" style="line-style:normal;line-weight:normal;filling:none;color:black" start="-30" angle="-299"/>
+	/*Outputwaarde = "     " & "     " & "<ellipse x=" & Chr(34) & Round(Center_x, 2) & Chr(34)
+			   Outputwaarde = Outputwaarde & " y=" & Chr(34) & Round(Center_y, 2) & Chr(34)
+			   Outputwaarde = Outputwaarde & " antialias=" & Chr(34) & "true" & Chr(34)
+			   Outputwaarde = Outputwaarde & " width=" & Chr(34) & (Round(Center_x, 2) - Round(End_point_x, 2) * 2) & Chr(34)
+			   Outputwaarde = Outputwaarde & " height=" & Chr(34) & ((Round(End_point_x, 2) * Round(Ratio, 2)) * 2) & Chr(34)
+			   Outputwaarde = Outputwaarde & " style=" & Chr(34) & "line-style:normal;line-weight:thin;filling:none;color:black" & Chr(34)
+
+			   Outputwaarde = Outputwaarde & "/>"*/
+
+
+	Cx1=QString::number (center_x1,'f',2);
+	Cy1=QString::number (center_y1,'f',2);
+	Height1=QString::number ((center_x1-center_x2)*2,'f',2);
+	Width1=QString::number ((center_x1*ratio)*2,'f',2);
+	start_angle = begin;
+	end_angle=einde;
+
+
+
+
+	/* calculate hoek */
+
+	if (begin>einde)
+	{
+		N=einde-begin;
+	}
+	else
+	{
+		N=einde-begin-360;
+	}
+
+	if (N<0)
+	{
+		O=-N;
+	}
+	else
+	{
+		O=N;
+	}
+
+	J=end_angle-start_angle+N;
+	K=360-end_angle;
+	L=360-start_angle;
+	M=K-L;
+	R=-O;
+	S=J-O;
+
+	if (S < -360)
+	{
+		T=S+360;
+	}
+	else
+	{
+		T=S;
+	}
+
+	if (begin<einde)
+	{
+		U=M;
+	}
+	else
+	{
+		U=T;
+	}
+
+	if (U<0)
+	{
+		V=-U;
+	}
+	else
+	{
+		V=U;
+	}
+
+	W=U+V;
+
+	if (W==0)
+	{
+		hoek2=-V;
+	}
+	else
+	{
+		hoek2=T;
+	}
+
+
+
+
+
+
+
+	/* einde omrekening */
+
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<arc x=");
+
+	x_center=QString::number ((center_x1 ),'f',2);
+	y_center=QString::number((center_y1),'f',2);
+
+
+	Lineout.append(QChar(34));
+	Lineout.append(x_center);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" y=");
+	Lineout.append(QChar(34));
+	Lineout.append(y_center);
+	Lineout.append(QChar(34));
+
+
+	Lineout.append(" antialias=");
+	Lineout.append(QChar(34));
+	Lineout.append("false");
+	Lineout.append(QChar(34));
+
+	breedte=Width1;
+	hoogte=Height1;
+
+	Lineout.append(" width=");
+	Lineout.append(QChar(34));
+	Lineout.append(breedte);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" height=");
+	Lineout.append(QChar(34));
+	Lineout.append(hoogte);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" style=");
+	Lineout.append(QChar(34));
+	Lineout.append("line-style:");
+	Lineout.append(LineStyle);
+	Lineout.append(";");
+	Lineout.append("line-weight:thin;");
+	Lineout.append("filling:none;");
+	Lineout.append("color:black");
+	Lineout.append(QChar(34));
+
+
+
+	hoek=QString::number (-hoek2,'f',0);
+	start_hoek=QString::number ((-(begin-90)),'f',0);
+
+
+	Lineout.append(" start=");
+	Lineout.append(QChar(34));
+	Lineout.append(start_hoek);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" angle=");
+	Lineout.append(QChar(34));
+	Lineout.append(hoek);
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+
+
+
+
+
+
+
+
+
+	return Lineout;
+}
+
+QString MainWindow::ConvertInsert(int LineCount, int LTypeCount1, int LayerCount1)
+{
+	int x;
+
+	double x_as;
+	double y_as;
+
+	QString startx;
+	QString starty;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString Lineout;
+
+
+	ui->SectionCount1->setPlaceholderText("Insert function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Insert function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	for (x=0;x<LineCount;x++)
+	{
+
+
+
+
+		if (LineTable1[x].Line1.contains(" 10"))
+		{
+			 x_as=LineTable1[x].Line2.toDouble();
+			 startx=QString::number(x_as,'f',2);
+
+		 }
+
+		 if (LineTable1[x].Line1.contains(" 20") )
+		 {
+			 y_as=-LineTable1[x].Line2.toDouble();
+			 starty=QString::number(y_as,'f',2);
+		 }
+
+
+
+
+	}
+
+
+	return Lineout;
+}
+
+QString MainWindow::ConvertLwpolyline(int LineCount, int LTypeCount1, int LayerCount1)
+{
+	int x;
+	int y;
+	int VertexCount;
+	int forlus1;
+
+	double x_as;
+	double y_as;
+	double LineClose;
+
+	QString startx;
+	QString starty;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString Lineout;
+	QString Handle;
+	QString LineTypeOFLine;
+	QString LayerNameOFLine;
+	QString LineStyle;
+	QString Pclose;
+
+
+
+
+
+	ui->SectionCount1->setPlaceholderText("Lwpolyline  function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Lwpolyline function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	VertexCount=0;
+
+	for (x=0;x<LineCount;x++)
+	{
+
+		if (LineTable1[x].Line1.contains(" 70"))
+		{
+			 LineClose=LineTable1[x].Line2.toDouble();
+
+
+		 }
+
+
+		if (LineTable1[x].Line1.contains(" 10", Qt::CaseSensitive))
+		{
+			 x_as=LineTable1[x].Line2.toDouble();
+			 PTable[VertexCount].Line1=QString::number(x_as,'f',2);
+
+		 }
+
+		 if (LineTable1[x].Line1.contains(" 20", Qt::CaseSensitive) )
+		 {
+			 y_as=-LineTable1[x].Line2.toDouble();
+			 PTable[VertexCount].Line2=QString::number(y_as,'f',2);
+			 VertexCount=VertexCount+1;
+
+		 }
+
+
+		 if (LineTable1[x].Line1.contains("  5", Qt::CaseSensitive) )
+		 {
+			 Handle=LineTable1[x].Line2;
+
+		 }
+
+		 if (LineTable1[x].Line1.contains("  6", Qt::CaseSensitive))
+		 {
+			 LineTypeOFLine=LineTable1[x].Line2;
+		 }
+
+		 if (LineTable1[x].Line1.contains("  8", Qt::CaseSensitive))
+		 {
+			 LayerNameOFLine=LineTable1[x].Line2;
+		 }
+
+
+		 if (VertexCount >=2000)
+		 {
+			 x=LineCount+1;
+		 }
+
+
+
+
+	}
+
+	/* find out line type */
+
+	if (LineTypeOFLine == "")
+	{
+
+		for (y=0;y<LayerCount1+1;y++)
+		{
+
+			if (LayerDXF[y].LayerName.contains(LayerNameOFLine))
+			{
+				LineStyle=GetLineType(LayerDXF[y].LayerLineType);
+			}
+		}
+
+	}
+	else
+	{
+		LineStyle=GetLineType(LineTypeOFLine);
+
+	}
+
+
+
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("   ");
+	Lineout.append("<polygon");
+
+	if (LineClose==1)
+	{
+		Pclose="true";
+	}
+	else
+	{
+		Pclose="false";
+	}
+
+	Lineout.append(" closed=");
+	Lineout.append(QChar(34));
+	Lineout.append(Pclose);
+	Lineout.append(QChar(34));
+
+
+	for (forlus1=0 ; forlus1 < (VertexCount) ; forlus1=forlus1+1)
+	{
+		Lineout.append(" x");
+		Lineout.append(QString::number( forlus1+1));
+		Lineout.append("=");
+
+
+
+		Lineout.append(QChar(34));
+		Lineout.append(PTable[forlus1].Line1);
+		Lineout.append(QChar(34));
+
+
+
+
+
+		Lineout.append(" y");
+		Lineout.append(QString::number(forlus1+1));
+		Lineout.append("=");
+
+
+
+		Lineout.append(QChar(34));
+		Lineout.append(PTable [forlus1].Line2);
+		Lineout.append(QChar(34));
+
+
+
+	}
+
+	Lineout.append(" antialias=");
+	Lineout.append(QChar(34));
+	Lineout.append("false");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" style=");
+	Lineout.append(QChar(34));
+	Lineout.append("line-style:");
+	Lineout.append(LineStyle);
+	Lineout.append(";");
+	Lineout.append("line-weight:thin;");
+	Lineout.append("filling:none;");
+	Lineout.append("color:black");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+
+	return Lineout;
+}
+
+QString MainWindow::ConvertPoint(int LineCount, int LTypeCount1, int LayerCount1)
+{
+	int x;
+
+	double x_as;
+	double y_as;
+
+	QString startx;
+	QString starty;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString Lineout;
+
+
+	ui->SectionCount1->setPlaceholderText("Point  function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Point function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	for (x=0;x<LineCount;x++)
+	{
+
+
+
+
+		if (LineTable1[x].Line1.contains(" 10"))
+		{
+			 x_as=LineTable1[x].Line2.toDouble();
+			 startx=QString::number(x_as,'f',2);
+
+		 }
+
+		 if (LineTable1[x].Line1.contains(" 20") )
+		 {
+			 y_as=-LineTable1[x].Line2.toDouble();
+			 starty=QString::number(y_as,'f',2);
+		 }
+
+
+
+
+	}
+
+
+	return Lineout;
+}
+
+QString MainWindow::ConvertShape( int LineCount, int LTypeCount1, int LayerCount1)
+{
+	int x;
+
+	double x_as;
+	double y_as;
+
+	QString startx;
+	QString starty;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString Lineout;
+
+
+	ui->SectionCount1->setPlaceholderText("Shape function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Shape function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	for (x=0;x<LineCount;x++)
+	{
+
+
+
+
+		if (LineTable1[x].Line1.contains(" 10"))
+		{
+			 x_as=LineTable1[x].Line2.toDouble();
+			 startx=QString::number(x_as,'f',2);
+
+		 }
+
+		 if (LineTable1[x].Line1.contains(" 20") )
+		 {
+			 y_as=-LineTable1[x].Line2.toDouble();
+			 starty=QString::number(y_as,'f',2);
+		 }
+
+
+
+
+	}
+
+
+	return Lineout;
+}
+
+QString MainWindow::ConvertSolid( int LineCount, int LTypeCount1, int LayerCount1)
+{
+	int x;
+
+	double x_as;
+	double y_as;
+
+	QString startx;
+	QString starty;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString Lineout;
+
+
+	ui->SectionCount1->setPlaceholderText("Solid  function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Solid function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	for (x=0;x<LineCount;x++)
+	{
+
+
+
+
+		if (LineTable1[x].Line1.contains(" 10"))
+		{
+			 x_as=LineTable1[x].Line2.toDouble();
+			 startx=QString::number(x_as,'f',2);
+
+		 }
+
+		 if (LineTable1[x].Line1.contains(" 20") )
+		 {
+			 y_as=-LineTable1[x].Line2.toDouble();
+			 starty=QString::number(y_as,'f',2);
+		 }
+
+
+
+
+	}
+
+
+	return Lineout;
+}
+
+QString MainWindow::ConvertSpline(int LineCount, int LTypeCount1, int LayerCount1)
+{
+	int x;
+
+	double x_as;
+	double y_as;
+
+	QString startx;
+	QString starty;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString Lineout;
+
+
+	ui->SectionCount1->setPlaceholderText("Spline  function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Spline function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	for (x=0;x<LineCount;x++)
+	{
+
+
+
+
+		if (LineTable1[x].Line1.contains(" 10"))
+		{
+			 x_as=LineTable1[x].Line2.toDouble();
+			 startx=QString::number(x_as,'f',2);
+
+		 }
+
+		 if (LineTable1[x].Line1.contains(" 20") )
+		 {
+			 y_as=-LineTable1[x].Line2.toDouble();
+			 starty=QString::number(y_as,'f',2);
+		 }
+
+
+
+
+	}
+
+
+	return Lineout;
+}
+
+/* vector of polyline */
+QString MainWindow::ConvertVertex(int LineCount)
+{
+
+
+
+	int x;
+	//int x2;
+	//int forlus1;
+
+	QString Lineout;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+
+	//QString PolyTable [200] [2];
+
+	double polyx;
+	double polyy;
+
+	ui->SectionCount1->setPlaceholderText("Vertex function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Vertex function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	for (x=0;x<LineCount;x++)
+	{
+
+		if (LineTable2[x].Line1.contains(" 10"))
+		{
+			 polyx=LineTable2[x].Line2.toDouble();
+			 PTable[VectorCount].Line1=QString::number(polyx,'f',2);
+
+		 }
+
+		 if (LineTable2[x].Line1.contains(" 20") )
+		 {
+			 polyy=-LineTable2[x].Line2.toDouble();
+			 PTable[VectorCount].Line2=QString::number(polyy,'f',2);
+			 VectorCount=VectorCount+1;
+		 }
+
+
+	}
+
+
+	 return Lineout;
+
+}
+
+/* polyline vector function */
+QString MainWindow::ConvertPolylineVector( int LineCount)
+{
+
+
+
+	int forlus1;
+
+	QString Lineout;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+
+	ui->SectionCount1->setPlaceholderText("PolylineVector function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Polyline vector function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	 for (forlus1=0 ; forlus1 < (VectorCount) ; forlus1=forlus1+1)
+	 {
+		 Lineout.append(" x");
+		 Lineout.append(QString::number( forlus1+1));
+		 Lineout.append("=");
+
+
+
+		 Lineout.append(QChar(34));
+		 Lineout.append(PTable[forlus1].Line1);
+		 Lineout.append(QChar(34));
+
+
+
+
+
+		 Lineout.append(" y");
+		 Lineout.append(QString::number(forlus1+1));
+		 Lineout.append("=");
+
+
+
+		 Lineout.append(QChar(34));
+		 Lineout.append(PTable [forlus1].Line2);
+		 Lineout.append(QChar(34));
+
+
+
+	 }
+
+
+
+	 return Lineout;
+}
+
+
+
+QString MainWindow::ConvertXline(int LineCount, int LTypeCount1, int LayerCount1)
+{
+	int x;
+
+	double x_as;
+	double y_as;
+
+	QString startx;
+	QString starty;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString Lineout;
+
+
+	ui->SectionCount1->setPlaceholderText("Xline  function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Xline function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	for (x=0;x<LineCount;x++)
+	{
+
+
+
+
+		if (LineTable1[x].Line1.contains(" 10"))
+		{
+			 x_as=LineTable1[x].Line2.toDouble();
+			 startx=QString::number(x_as,'f',2);
+
+		 }
+
+		 if (LineTable1[x].Line1.contains(" 20") )
+		 {
+			 y_as=-LineTable1[x].Line2.toDouble();
+			 starty=QString::number(y_as,'f',2);
+		 }
+
+
+
+
+	}
+
+
+	return Lineout;
+}
+
+
+QString MainWindow::ConvertImage(int LineCount, int LTypeCount1, int LayerCount1)
+{
+	int x;
+
+	double x_as;
+	double y_as;
+
+	QString startx;
+	QString starty;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString Lineout;
+
+
+	ui->SectionCount1->setPlaceholderText("Image  function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Image function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	for (x=0;x<LineCount;x++)
+	{
+
+
+
+
+		if (LineTable1[x].Line1.contains(" 10"))
+		{
+			 x_as=LineTable1[x].Line2.toDouble();
+			 startx=QString::number(x_as,'f',2);
+
+		 }
+
+		 if (LineTable1[x].Line1.contains(" 20") )
+		 {
+			 y_as=-LineTable1[x].Line2.toDouble();
+			 starty=QString::number(y_as,'f',2);
+		 }
+
+
+
+
+	}
+
+
+	return Lineout;
+}
+
+
+QString MainWindow::ConvertHatch(int LineCount, int LTypeCount1, int LayerCount1)
+{
+	int x;
+
+	double x_as;
+	double y_as;
+
+	QString startx;
+	QString starty;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString Lineout;
+
+
+	ui->SectionCount1->setPlaceholderText("Hatch  function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Hatch function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	for (x=0;x<LineCount;x++)
+	{
+
+
+
+
+		if (LineTable1[x].Line1.contains(" 10"))
+		{
+			 x_as=LineTable1[x].Line2.toDouble();
+			 startx=QString::number(x_as,'f',2);
+
+		 }
+
+		 if (LineTable1[x].Line1.contains(" 20") )
+		 {
+			 y_as=-LineTable1[x].Line2.toDouble();
+			 starty=QString::number(y_as,'f',2);
+		 }
+
+
+
+
+	}
+
+
+	return Lineout;
+}
+
+
+QString MainWindow::ConvertMline( int LineCount, int LTypeCount1, int LayerCount1)
+{
+	int x;
+
+	double x_as;
+	double y_as;
+
+	QString startx;
+	QString starty;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+	QString Lineout;
+
+
+	ui->SectionCount1->setPlaceholderText("Mline  function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Mline function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	for (x=0;x<LineCount;x++)
+	{
+
+
+
+
+		if (LineTable1[x].Line1.contains(" 10"))
+		{
+			 x_as=LineTable1[x].Line2.toDouble();
+			 startx=QString::number(x_as,'f',2);
+
+		 }
+
+		 if (LineTable1[x].Line1.contains(" 20") )
+		 {
+			 y_as=-LineTable1[x].Line2.toDouble();
+			 starty=QString::number(y_as,'f',2);
+		 }
+
+
+
+
+	}
+
+
+	return Lineout;
+}
+
+
+/* polyline end */
+QString MainWindow::ConvertPolylineEnd(int LineCount)
+{
+
+
+
+	QString Lineout;
+	QString ActiveFunction;
+	QString StatusbarMessage;
+
+	ui->SectionCount1->setPlaceholderText("PolylineEnd function");
+	ui->SectionCount1->repaint();
+
+	ActiveFunction="Polyline end function";
+
+	StatusbarMessage = SetStatusBarMessage(LineCount, " ", " ", ActiveFunction);
+
+	Lineout.append(" antialias=");
+	Lineout.append(QChar(34));
+	Lineout.append("false");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" style=");
+	Lineout.append(QChar(34));
+	Lineout.append("line-style:normal;line-weight:thin;filling:none;color:black");
+	Lineout.append(QChar(34));
+
+	Lineout.append(" />");
+	Lineout.append('\n');
+
+	return Lineout;
+}
+
+/* send actions to statusbar */
+QString MainWindow::SetStatusBarMessage(int Counter, QString InLine1, QString InLine2, QString ActiveFunc)
+{
+	QString StatusbarMessage;
+
+	StatusbarMessage="";
+	StatusbarMessage.append(QString::number(Counter));
+	StatusbarMessage.append(" / ");
+	StatusbarMessage.append( InLine1);
+	StatusbarMessage.append(" / ");
+	StatusbarMessage.append( InLine2);
+	StatusbarMessage.append(" / ");
+	StatusbarMessage.append(ActiveFunc);
+
+	ui->statusBar->clearMessage();
+	ui->statusBar->showMessage(StatusbarMessage );
+
+	return StatusbarMessage;
+}
+
+/* check line style */
+QString MainWindow::GetLineType (QString FindLT)
+{
+	QString LineStyle;
+
+	if (FindLT == "Continuous" )
+	{
+	   LineStyle="normal";
+	}
+
+	if (FindLT == "CONTINUOUS" )
+	{
+	   LineStyle="normal";
+	}
+
+	if (FindLT == "Center" )
+	{
+	   LineStyle="dashdotted";
+	}
+
+	if (FindLT == "CENTER" )
+	{
+	   LineStyle="dashdotted";
+	}
+
+	if (FindLT == "CENTER2" )
+	{
+	   LineStyle="dashdotted";
+	}
+
+	if (FindLT == "CENTERX2" )
+	{
+	   LineStyle="dashdotted";
+	}
+
+	if (FindLT == "DASHED" )
+	{
+	   LineStyle="dashed";
+	}
+
+	if (FindLT == "DASHED2" )
+	{
+	   LineStyle="dashed";
+	}
+
+	if (FindLT == "DASHEDX2" )
+	{
+	   LineStyle="dashed";
+	}
+
+
+	if (FindLT == "HIDDEN" )
+	{
+	   LineStyle="dashed";
+	}
+
+	if (FindLT == "HIDDEN2" )
+	{
+	   LineStyle="dashed";
+	}
+
+	if (FindLT == "HIDDENX2" )
+	{
+	   LineStyle="dashed";
+	}
+
+	if (FindLT == "EPL_DASH" )
+	{
+	   LineStyle="dashed";
+	}
+
+	if (FindLT == "EPL_DASHDOT" )
+	{
+	   LineStyle="dashdotted";
+	}
+
+	if (FindLT == "DASHDOT" )
+	{
+	   LineStyle="dashdotted";
+	}
+
+	if (FindLT == "DASHDOT2" )
+	{
+	   LineStyle="dashdotted";
+	}
+
+	if (FindLT == "DASHDOTX2" )
+	{
+	   LineStyle="dashdotted";
+	}
+
+	return LineStyle;
+}
+
+void MainWindow::fillElmtName() {
+	QString name = m_file_path.split("/").last();
+	name.remove(".dxf");
+	ui->m_elmt_name_le->setText(name);
+}
+
+void MainWindow::on_m_save_elmt_pb_clicked() {
+
+	QFile file(m_path_dir + "/" + ui->m_elmt_name_le->text() + ".elmt");
+	if (!file.open(QFile::WriteOnly | QFile::Text)) {
+		QMessageBox::warning(this, tr("Application"),
+							 tr("Cannot write file %1:\n%2.")
+							 .arg(m_path_dir)
+							 .arg(file.errorString()));
+		return;
+	}
+
+	QTextStream out(&file);
+	out << ui->ExportToELMT->toPlainText();
+
+	file.close();
+	QMessageBox::information(this, tr("Export"), tr("L'\351l\351ment %1 \340 bien \351t\351 enregistr\351").arg(ui->m_elmt_name_le->text()));
+}
+
+void MainWindow::on_m_load_dxf_pb_clicked() {
+	 loadFile();
+}
+
+void MainWindow::on_LineCountDXF_textEdited(const QString &arg1)
+{
+
+}
+

Added: branches/newdxf/sources/editor/dxftoelmt/tables.cpp
===================================================================
--- branches/newdxf/sources/editor/dxftoelmt/tables.cpp	                        (rev 0)
+++ branches/newdxf/sources/editor/dxftoelmt/tables.cpp	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,111 @@
+
+Aantal_Tekens = Line2.length();
+if (Line1.contains(" 2", Qt::CaseSensitive) and Line2.contains("TABLES", Qt::CaseSensitive)and Aantal_Tekens==6)
+{
+    ActiveSection=3;
+
+    switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+    while(switch2==false)
+    {
+        ReadLine=in.readLine();
+        Line1=ReadLine;
+        ReadLine=in.readLine();
+        Line2=ReadLine;
+        dxfLineCounter=dxfLineCounter+2;
+
+        Aantal_Tekens = Line2.length();
+        if (Line1.contains(" 0",Qt::CaseSensitive) and Line2.contains("TABLE",Qt::CaseSensitive)and Aantal_Tekens==5)
+        {
+
+            ReadLine=in.readLine();
+            Line1=ReadLine;
+            ReadLine=in.readLine();
+            Line2=ReadLine;
+            dxfLineCounter=dxfLineCounter+2;
+
+
+
+                Aantal_Tekens = Line2.length();
+                if(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("LTYPE",Qt::CaseSensitive) and Aantal_Tekens==5)
+                {
+                    switch3=false;
+                    LineCount2=1;
+
+                    switch3=(Line1.contains(" 0",Qt::CaseSensitive) and Line2.contains("ENDTAB",Qt::CaseSensitive)and Aantal_Tekens==6);
+                    while (switch3==false)
+                    {
+                        ReadLine=in.readLine();
+                        Line1=ReadLine;
+                        LineTable2[LineCount2].Line1=Line1;
+                        ReadLine=in.readLine();
+                        Line2=ReadLine;
+                        LineTable2[LineCount2].Line2=Line2;
+                        LineCount2=LineCount2+1;
+                        dxfLineCounter=dxfLineCounter+2;
+
+                        Aantal_Tekens = Line2.length();
+                        switch3=(Line1.contains(" 0",Qt::CaseSensitive) and Line2.contains("ENDTAB",Qt::CaseSensitive)and Aantal_Tekens==6);
+
+                        if (LineCount2>=200)
+                        {
+                            switch3=true;
+                        }
+                    }
+                }
+            }
+
+            Aantal_Tekens = Line2.length();
+            if(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("LAYER",Qt::CaseSensitive) and Aantal_Tekens==5)
+            {
+
+                    switch4=false;
+                    LineCount3=1;
+
+
+                    switch4=(Line1.contains(" 0",Qt::CaseSensitive) and Line2.contains("ENDTAB",Qt::CaseSensitive)and Aantal_Tekens==6);
+                    while (switch4==false)
+                    {
+                        ReadLine=in.readLine();
+                        Line1=ReadLine;
+                        LineTable3[LineCount3].Line1=Line1;
+                        ReadLine=in.readLine();
+                        Line2=ReadLine;
+                        LineTable3[LineCount3].Line2=Line2;
+                        LineCount3=LineCount3+1;
+                        dxfLineCounter=dxfLineCounter+2;
+
+
+                        Aantal_Tekens = Line2.length();
+                        switch4=(Line1.contains(" 0",Qt::CaseSensitive) and Line2.contains("ENDTAB",Qt::CaseSensitive)and Aantal_Tekens==6);
+
+                        if (LineCount3>=200)
+                        {
+                            switch4=true;
+                        }
+                    }
+
+            }
+
+        Aantal_Tekens = Line2.length();
+        switch2=(Line1.contains(" 0", Qt::CaseSensitive) and Line2.contains("ENDSEC", Qt::CaseSensitive)and Aantal_Tekens==6);
+        if (LineCount2>=2000)
+        {
+            switch2=1;
+
+        }
+
+    ReadLine=in.readLine();
+    Line1=ReadLine;
+    ReadLine=in.readLine();
+    Line2=ReadLine;
+    dxfLineCounter=dxfLineCounter+2;
+
+    }
+
+    DXF_LType Load_LType;
+    Load_LType.LoadLTypeTable(LineCount2, LineTable2);
+
+    DXF_Layer Load_Layer;
+    Load_Layer.LoadLayerTable(LineCount3, LineTable3);
+
+}

Added: branches/newdxf/sources/editor/ui/mainwindow.ui
===================================================================
--- branches/newdxf/sources/editor/ui/mainwindow.ui	                        (rev 0)
+++ branches/newdxf/sources/editor/ui/mainwindow.ui	2015-01-03 11:26:40 UTC (rev 3586)
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <author>Ronny Desmedt</author>
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1088</width>
+    <height>669</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralWidget">
+   <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <layout class="QGridLayout" name="gridLayout_2" columnstretch="0,0,0,0,0">
+      <property name="spacing">
+       <number>5</number>
+      </property>
+      <item row="4" column="3">
+       <widget class="QLineEdit" name="ExportFile"/>
+      </item>
+      <item row="5" column="1">
+       <widget class="QLineEdit" name="SectionCount1">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+       </widget>
+      </item>
+      <item row="5" column="3">
+       <widget class="QLineEdit" name="m_elmt_name_le"/>
+      </item>
+      <item row="5" column="2">
+       <widget class="QLabel" name="label_4">
+        <property name="text">
+         <string>element name :</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1">
+       <widget class="QLineEdit" name="LineCountDXF"/>
+      </item>
+      <item row="5" column="0">
+       <widget class="QLabel" name="labelSectionCount">
+        <property name="text">
+         <string>Section count</string>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
+         <string>Import file path :</string>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1">
+       <widget class="QLineEdit" name="m_import_file_path_le">
+        <property name="maximumSize">
+         <size>
+          <width>16777165</width>
+          <height>16777215</height>
+         </size>
+        </property>
+        <property name="toolTipDuration">
+         <number>-1</number>
+        </property>
+       </widget>
+      </item>
+      <item row="7" column="0" colspan="2">
+       <widget class="QTextEdit" name="ImportDXF">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="2">
+       <widget class="QLabel" name="label_2">
+        <property name="text">
+         <string>Export directory path :</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0">
+       <widget class="QPushButton" name="m_load_dxf_pb">
+        <property name="text">
+         <string>Load DXF file</string>
+        </property>
+       </widget>
+      </item>
+      <item row="7" column="2" colspan="2">
+       <widget class="QTextEdit" name="ExportToELMT"/>
+      </item>
+      <item row="7" column="4">
+       <widget class="QTextEdit" name="ProcesLog">
+        <property name="enabled">
+         <bool>true</bool>
+        </property>
+        <property name="frameShadow">
+         <enum>QFrame::Sunken</enum>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="0" colspan="2">
+       <widget class="QLabel" name="label_3">
+        <property name="text">
+         <string>Binary DXF can not be converted !!!</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="2">
+       <widget class="QPushButton" name="m_save_elmt_pb">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="text">
+         <string>save to elmt file</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QMenuBar" name="menuBar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>1088</width>
+     <height>23</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QToolBar" name="mainToolBar">
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+  </widget>
+  <widget class="QStatusBar" name="statusBar">
+   <property name="autoFillBackground">
+    <bool>true</bool>
+   </property>
+  </widget>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/