[qet] qet/qet: [4968] update dxftoQET

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


Revision: 4968
Author:   rdsivd
Date:     2017-05-22 20:51:18 +0200 (Mon, 22 May 2017)
Log Message:
-----------
update dxftoQET

Modified Paths:
--------------
    branches/DXFtoQET3_DB/DXFtoQET.pro
    branches/DXFtoQET3_DB/data.h
    branches/DXFtoQET3_DB/db/dbmanager.cpp
    branches/DXFtoQET3_DB/db/dbmanager.h
    branches/DXFtoQET3_DB/dxftoqet3db.cpp
    branches/DXFtoQET3_DB/dxftoqet3db.h
    branches/DXFtoQET3_DB/dxftoqet3db.ui
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.h
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.h

Modified: branches/DXFtoQET3_DB/DXFtoQET.pro
===================================================================
--- branches/DXFtoQET3_DB/DXFtoQET.pro	2017-05-21 06:30:33 UTC (rev 4967)
+++ branches/DXFtoQET3_DB/DXFtoQET.pro	2017-05-22 18:51:18 UTC (rev 4968)
@@ -12,6 +12,7 @@
 TARGET = DXFtoQET
 TEMPLATE = app
 
+DEFINES += QT_DEPRECATED_WARNINGS
 
 SOURCES += $$files(*.cpp)\
     $$files(src/*.cpp) \

Modified: branches/DXFtoQET3_DB/data.h
===================================================================
--- branches/DXFtoQET3_DB/data.h	2017-05-21 06:30:33 UTC (rev 4967)
+++ branches/DXFtoQET3_DB/data.h	2017-05-22 18:51:18 UTC (rev 4968)
@@ -7,9 +7,9 @@
 //#include "db/dbmanager.h"
 
 #define DXF_base_set 1
-#define DXF_item_split 100000 //dxf split tables
-#define DXF_codes_set 300000
-#define DXF_codeset_copies 300000
+#define DXF_item_split 10000 //dxf split tables
+#define DXF_codes_set 10000
+#define DXF_codeset_copies 10000
 #define QET_L_POLYLINE 100
 
 #define DXF_layers_set 500

Modified: branches/DXFtoQET3_DB/db/dbmanager.cpp
===================================================================
--- branches/DXFtoQET3_DB/db/dbmanager.cpp	2017-05-21 06:30:33 UTC (rev 4967)
+++ branches/DXFtoQET3_DB/db/dbmanager.cpp	2017-05-22 18:51:18 UTC (rev 4968)
@@ -52,7 +52,7 @@
 
 	m_db.exec(QsqlString);
 
-	QsqlString="create table dxf_file (Index_count primary key, Code, Waarde, Section, Commando )";
+	QsqlString="create table dxf_file (Index_count primary key, Code, Waarde, Section, Commando, AcadValue )";
 
 	m_db.exec(QsqlString);
 
@@ -503,7 +503,7 @@
 	return;
 }
 
-int dbManager::dbManager_added_records(const QString &pathname, int64_t *Max_lines, int64_t *Record_count, QString dxf_type)
+int dbManager::dbManager_added_records(const QString &pathname, int32_t *Max_lines, int32_t *Record_count, QString dxf_type)
 {
 	m_db.transaction();
 	QSqlQuery Query1;
@@ -1198,7 +1198,7 @@
 }
 
 
-int dbManager::DB_dbManager_added_records(const QString &pathname, int64_t *Max_lines, int64_t *Record_count, QString dxf_type)
+int dbManager::DB_dbManager_added_records(const QString &pathname, int32_t *Max_lines, int32_t *Record_count, QString dxf_type)
 {
 	m_db.transaction();
 	QSqlQuery Query1;
@@ -1560,7 +1560,7 @@
 			Query1.bindValue(":dxf_177",DXF_main_base[0].split_list_1[177][x1]);
 			Query1.bindValue(":dxf_178",DXF_main_base[0].split_list_1[178][x1]);
 			Query1.bindValue(":dxf_179",DXF_main_base[0].split_list_1[179][x1]);
-			/*/Query1.bindValue(":dxf_180",DXF_main_base[0].split_list_1[180][x1]);
+			/*Query1.bindValue(":dxf_180",DXF_main_base[0].split_list_1[180][x1]);
 			Query1.bindValue(":dxf_181",DXF_main_base[0].split_list_1[181][x1]);
 			Query1.bindValue(":dxf_182",DXF_main_base[0].split_list_1[182][x1]);
 			Query1.bindValue(":dxf_183",DXF_main_base[0].split_list_1[183][x1]);
@@ -2679,11 +2679,12 @@
 
 	//Read_list.prepare(QSql_dxf_list);
 
-	QSql_transfer= "INSERT INTO dxf_file (Index_count, Code, Waarde, Section, Commando )";
-	QSql_transfer.append("VALUES (:Index_count, :Code, :Waarde, :Section, :Commando)");
+	QSql_transfer= "INSERT INTO dxf_file (Index_count, Code, Waarde, Section, Commando, AcadValue )";
+	QSql_transfer.append("VALUES (:Index_count, :Code, :Waarde, :Section, :Commando, :AcadValue)");
 
 	Write_transfer.prepare(QSql_transfer);
 
+	Transfer_AcadValue=0;
 
 	while (Read_list.next())
 	{
@@ -2701,6 +2702,8 @@
 			Read_list.next();
 			List_4=Read_list.value(1).toString();
 
+			Transfer_AcadValue=0;
+
 			if (List_3==2)
 			{
 
@@ -2714,11 +2717,23 @@
 			Transfer_Commando=List_2;
 		}
 
+		if (List_1==0 and List_2!="SECTION")
+		{
+			Transfer_AcadValue++;
+		}
+
+		if (List_1==9)
+		{
+			Transfer_AcadValue++;
+		}
+
+
 		Write_transfer.bindValue(":Index_count",transfer_count);
 		Write_transfer.bindValue(":Code",List_1);
 		Write_transfer.bindValue(":Waarde",List_2);
 		Write_transfer.bindValue(":Section",Transfer_Section);
 		Write_transfer.bindValue(":Commando",Transfer_Commando);
+		Write_transfer.bindValue(":AcadValue",Transfer_AcadValue);
 
 		Write_transfer.exec();
 
@@ -2728,4 +2743,6 @@
 	}
 
 	m_db.database().commit();
+
+
 }

Modified: branches/DXFtoQET3_DB/db/dbmanager.h
===================================================================
--- branches/DXFtoQET3_DB/db/dbmanager.h	2017-05-21 06:30:33 UTC (rev 4967)
+++ branches/DXFtoQET3_DB/db/dbmanager.h	2017-05-22 18:51:18 UTC (rev 4968)
@@ -48,6 +48,7 @@
 	QString Transfer_waarde;
 	QString Transfer_Section;
 	QString Transfer_Commando;
+	int32_t Transfer_AcadValue;
 
 	int List_1;
 	QString List_2;
@@ -85,9 +86,9 @@
 
 	void dbManager_create_tables(const QString &pathname);
 
-	int dbManager_added_records(const QString &pathname, int64_t *Max_lines, int64_t *Record_count, QString dxf_type);
+	int dbManager_added_records(const QString &pathname, int32_t *Max_lines, int32_t *Record_count, QString dxf_type);
 
-	int DB_dbManager_added_records(const QString &pathname, int64_t *Max_lines, int64_t *Record_count, QString dxf_type);
+	int DB_dbManager_added_records(const QString &pathname, int32_t *Max_lines, int32_t *Record_count, QString dxf_type);
 
 
 	void dbManager_load_dxf(const QString &pathname);

Modified: branches/DXFtoQET3_DB/dxftoqet3db.cpp
===================================================================
--- branches/DXFtoQET3_DB/dxftoqet3db.cpp	2017-05-21 06:30:33 UTC (rev 4967)
+++ branches/DXFtoQET3_DB/dxftoqet3db.cpp	2017-05-22 18:51:18 UTC (rev 4968)
@@ -624,7 +624,7 @@
 
 		emit send_log(Signal_log1);
 
-		lenght_header=0;
+		lenght_header=-1;
 	}
 
 	Signal_log1.clear();
@@ -670,7 +670,7 @@
 
 		emit send_log(Signal_log1);
 
-		lenght_classes=0;
+		lenght_classes=-1;
 	}
 
 	Signal_log1.clear();
@@ -712,7 +712,7 @@
 
 		emit send_log(Signal_log1);
 
-		lenght_tables=0;
+		lenght_tables=-1;
 
 	}
 
@@ -749,7 +749,7 @@
 
 		emit send_log(Signal_log1);
 
-		lenght_blocks=0;
+		lenght_blocks=-1;
 	}
 
 	Signal_log1.clear();
@@ -780,7 +780,7 @@
 
 		emit send_log(Signal_log1);
 
-		lenght_entities=0;
+		lenght_entities=-1;
 	}
 
 	Signal_log1.clear();
@@ -811,7 +811,7 @@
 
 		emit send_log(Signal_log1);
 
-		lenght_objects=0;
+		lenght_objects=-1;
 	}
 
 	Signal_log1.clear();
@@ -823,7 +823,7 @@
 
 	// thumbnailimage
 
-	lenght_thumbnailimage=dxf_line_count2-index_thumbnailimage;
+	lenght_thumbnailimage=dxf_line_count2-index_objects;
 
 	if(lenght_thumbnailimage<0)
 	{
@@ -832,8 +832,12 @@
 
 		emit send_log(Signal_log1);
 
-		lenght_thumbnailimage=0;
+		lenght_thumbnailimage=-1;
 	}
+	else
+	{
+		lenght_thumbnailimage=dxf_line_count2-index_thumbnailimage;
+	}
 
 	Signal_log1.clear();
 	Signal_log1.append("thumbnailimage lenght : ");
@@ -877,10 +881,10 @@
 
 	if (index_header != -1)
 	{
-		for (for1=index_header+1;for1<max_header; for1++)
+		for (for1=1;for1<max_header-index_header; for1++)
 		{
 
-			dxf_header.append(DXF_main_base[0].dxf_input[for1]);
+			dxf_header.append(DXF_main_base[0].dxf_input[index_header+for1]);
 
 		}
 
@@ -889,10 +893,10 @@
 
 	if (index_classes != -1)
 	{
-		for (for1=index_classes+1;for1<max_classes;for1++)
+		for (for2=1;for2<max_classes-index_classes;for2++)
 		{
 
-			dxf_classes.append(DXF_main_base[0].dxf_input[for1]);
+			dxf_classes.append(DXF_main_base[0].dxf_input[index_classes+for2]);
 
 		}
 
@@ -902,10 +906,10 @@
 	if (index_tables != -1)
 	{
 
-		for (for1=index_tables+1;for1<max_tables;for1++)
+		for (for3=1;for3<max_tables-index_tables;for3++)
 		{
 
-			dxf_tables.append(DXF_main_base[0].dxf_input[for1]);
+			dxf_tables.append(DXF_main_base[0].dxf_input[index_tables+for3]);
 
 		}
 
@@ -914,10 +918,10 @@
 
 	if (index_blocks != -1)
 	{
-		for (for1=index_blocks+1;for1<max_blocks;for1++)
+		for (for4=1;for4<max_blocks-index_blocks;for4++)
 		{
 
-			dxf_blocks.append(DXF_main_base[0].dxf_input[for1]);
+			dxf_blocks.append(DXF_main_base[0].dxf_input[index_blocks+for4]);
 
 		}
 
@@ -926,10 +930,10 @@
 
 	if (index_entities != -1)
 	{
-		for (for1=index_entities+1;for1<max_entities;for1++)
+		for (for5=1;for5<max_entities-index_entities;for5++)
 		{
 
-			dxf_entities.append(DXF_main_base[0].dxf_input[for1]);
+			dxf_entities.append(DXF_main_base[0].dxf_input[index_entities+for5]);
 
 		}
 
@@ -938,10 +942,10 @@
 
 	if (index_objects != -1)
 	{
-		for (for1=index_objects+1;for1<max_objects;for1++)
+		for (for6=1;for6<max_objects-index_objects ;for6++)
 		{
 
-			dxf_objects.append(DXF_main_base[0].dxf_input[for1]);
+			dxf_objects.append(DXF_main_base[0].dxf_input[index_objects+for6]);
 
 		}
 
@@ -950,10 +954,10 @@
 
 	if (index_thumbnailimage != -1)
 	{
-		for (for1=index_thumbnailimage+1;for1<max_thumbnailimage;for1++)
+		for (for7=1;for7<max_thumbnailimage-index_thumbnailimage;for7++)
 		{
 
-			dxf_thumbnailimage.append(DXF_main_base[0].dxf_input[for1]);
+			dxf_thumbnailimage.append(DXF_main_base[0].dxf_input[index_thumbnailimage+for7]);
 
 		}
 
@@ -1136,7 +1140,7 @@
 	count_header_lines=0;
 	id_header=1;
 
-	clear_dxf_header_items();
+	//clear_dxf_header_items();
 	clear_split_tables();
 	x1=-1;
 	x2=0;
@@ -1147,6 +1151,13 @@
 
 		//split_list_1[Header_record.value("Code").toInt()].append(Header_record.value("Waarde").toString());
 
+		Read_Index=Header_record.value("Index_count").toString();
+		Read_Code=Header_record.value("Code").toString();
+		Read_Waarde=Header_record.value("Waarde").toString();
+		Read_Section=Header_record.value("Section").toString();
+		Read_Commando=Header_record.value("Cmmando").toString();
+		Read_AcadValue=Header_record.value("AcadValue").toString();
+
 		if (Header_record.value("Code").toInt()==9 )
 		{
 			x1++;
@@ -1162,6 +1173,20 @@
 			split_tables_list[x1].append(Header_record.value("Waarde").toString() );
 		}
 
+		if (x1 > DXF_item_split)
+		{
+			Signal_log1.clear();
+			Signal_log1.append(QTime::currentTime().toString());
+			Signal_log1.append("\n");
+			Signal_log1.append("split table to short : ");
+			Signal_log1.append(QString::number(x1));
+			Signal_log1.append(" > ");
+			Signal_log1.append(QString::number(DXF_item_split));
+			//Signal_log1.append("============================================================================");
+
+			emit send_log(Signal_log1);
+		}
+
 	}
 
 	Signal_log1.clear();
@@ -1207,7 +1232,7 @@
 
 
 
-	clear_sw_header();
+	//clear_sw_header();
 
 	Signal_log1.clear();
 	Signal_log1.append(QTime::currentTime().toString());
@@ -1221,7 +1246,7 @@
 
 
 
-	clear_dxf_code_tables();
+	//clear_dxf_code_tables();
 
 	ui->dxf_section->clear();
 	ui->dxf_section->insert("Section Header");
@@ -1328,11 +1353,14 @@
 
 	for (int xy=0;xy <1075;xy++)
 	{
-		DXF_main_base[0].split_list_1[xy].clear();
+		if(DXF_main_base[0].split_list_1[xy].count()>0)
+		{
+			DXF_main_base[0].split_list_1[xy].clear();
+		}
 	}
 
 
-	while (count_list_item<x3max and count_list_item<DXF_codeset_copies)
+	while (count_list_item<(x3max-1) and count_list_item<DXF_codeset_copies)
 	{
 
 		line1=QString(split_tables_list[count_tables_list][count_list_item]).toInt();
@@ -1384,15 +1412,22 @@
 
 	for (int xy=0;xy <1200;xy++)
 	{
-		if (DXF_main_base[0].split_list_1[xy].count()==max3)
+		if (DXF_main_base[0].split_list_1[xy].count()>max3)
 		{
 			//DXF_main_base[0].split_list_1[xy].value()=" ";
 		}
 		else
 		{
-			for (int xz=0;xz<max3+1;xz++)
+			for (int xz=DXF_main_base[0].split_list_1[xy].count();xz<max3;xz++)
 			{
-				DXF_main_base[0].split_list_1[xy].append(" ");
+				if (DXF_main_base[0].split_list_1[xy].count()>=max3)
+				{
+
+				}
+				else
+				{
+					DXF_main_base[0].split_list_1[xy].append(" ");
+				}
 			}
 		}
 
@@ -1577,6 +1612,13 @@
 	{
 		QSqlRecord Header_record=Tables_Query.record();
 
+		Read_Index=Header_record.value("Index_count").toString();
+		Read_Code=Header_record.value("Code").toString();
+		Read_Waarde=Header_record.value("Waarde").toString();
+		Read_Section=Header_record.value("Section").toString();
+		Read_Commando=Header_record.value("Cmmando").toString();
+		Read_AcadValue=Header_record.value("AcadValue").toString();
+
 		if (Header_record.value("Code").toInt()==0 )
 		{
 			x1++;
@@ -1591,6 +1633,21 @@
 			split_tables_list[x1].append(Header_record.value("Waarde").toString() );
 		}
 
+
+		if (x1 > DXF_item_split)
+		{
+			Signal_log1.clear();
+			Signal_log1.append(QTime::currentTime().toString());
+			Signal_log1.append("\n");
+			Signal_log1.append("split table to short : ");
+			Signal_log1.append(QString::number(x1));
+			Signal_log1.append(" > ");
+			Signal_log1.append(QString::number(DXF_item_split));
+			//Signal_log1.append("============================================================================");
+
+			emit send_log(Signal_log1);
+		}
+
 	}
 
 	Signal_log1.clear();
@@ -1621,7 +1678,7 @@
 		}
 	}*/
 
-	clear_sw_header();
+	//clear_sw_header();
 
 	Signal_log1.clear();
 	Signal_log1.append("Splitting Classes ");
@@ -1636,7 +1693,7 @@
 	max=0;
 	Record_Count_Tables=1;
 
-	clear_dxf_code_tables();
+	//clear_dxf_code_tables();
 
 	ui->dxf_section->clear();
 	ui->dxf_section->insert("Section Classes");
@@ -1658,9 +1715,6 @@
 		ui->dxf_log->repaint();*/
 
 		count_tables_item=0;
-
-		//Record_Count_Tables=1;
-
 		x3=split_tables_list[count_tables].count();
 
 		if (x3>DXF_codeset_copies)
@@ -1885,14 +1939,9 @@
 	count_tables_lines=0;
 	id_header=1;
 
-	clear_dxf_tables_items();
+	//clear_dxf_tables_items();
 	clear_split_tables();
 
-	for (int xyz=0;xyz<1200;xyz++)
-	{
-		split_tables_list[xyz].clear();
-	}
-
 	x1=-1;
 
 	while (Tables_Query.next())
@@ -1913,6 +1962,21 @@
 			split_tables_list[x1].append(Header_record.value("Waarde").toString() );
 		}
 
+
+		if (x1 > DXF_item_split)
+		{
+			Signal_log1.clear();
+			Signal_log1.append(QTime::currentTime().toString());
+			Signal_log1.append("\n");
+			Signal_log1.append("split table to short : ");
+			Signal_log1.append(QString::number(x1));
+			Signal_log1.append(" > ");
+			Signal_log1.append(QString::number(DXF_item_split));
+			//Signal_log1.append("============================================================================");
+
+			emit send_log(Signal_log1);
+		}
+
 	}
 
 	Signal_log1.clear();
@@ -1943,7 +2007,7 @@
 		}
 	}*/
 
-	clear_sw_header();
+	//clear_sw_header();
 
 	Signal_log1.clear();
 	Signal_log1.append("Splitting tables ");
@@ -1958,7 +2022,7 @@
 	max=0;
 	Record_Count_Tables=1;
 
-	clear_dxf_code_tables();
+	//clear_dxf_code_tables();
 
 	ui->dxf_section->clear();
 	ui->dxf_section->insert("Section Tables");
@@ -2220,7 +2284,7 @@
 	count_tables_lines=0;
 	id_header=1;
 
-	clear_dxf_tables_items();
+	//clear_dxf_tables_items();
 	clear_split_tables();
 
 	x1=-1;
@@ -2229,6 +2293,13 @@
 	{
 		QSqlRecord Header_record=Tables_Query.record();
 
+		Read_Index=Header_record.value("Index_count").toString();
+		Read_Code=Header_record.value("Code").toString();
+		Read_Waarde=Header_record.value("Waarde").toString();
+		Read_Section=Header_record.value("Section").toString();
+		Read_Commando=Header_record.value("Cmmando").toString();
+		Read_AcadValue=Header_record.value("AcadValue").toString();
+
 		if (Header_record.value("Code").toInt()==0 )
 		{
 			x1++;
@@ -2273,7 +2344,7 @@
 		}
 	}*/
 
-	clear_sw_header();
+	//clear_sw_header();
 
 	Signal_log1.clear();
 	Signal_log1.append("Splitting tables ");
@@ -2288,7 +2359,7 @@
 	max=0;
 	Record_Count_Tables=1;
 
-	clear_dxf_code_tables();
+	//clear_dxf_code_tables();
 
 	ui->dxf_section->clear();
 	ui->dxf_section->insert("Section Blokcs");
@@ -2538,7 +2609,7 @@
 	count_tables_lines=0;
 	id_header=1;
 
-	clear_dxf_tables_items();
+	//clear_dxf_tables_items();
 	clear_split_tables();
 
 	x1=-1;
@@ -2547,6 +2618,14 @@
 	{
 		QSqlRecord Header_record=Tables_Query.record();
 
+		Read_Index=Header_record.value("Index_count").toString();
+		Read_Code=Header_record.value("Code").toString();
+		Read_Waarde=Header_record.value("Waarde").toString();
+		Read_Section=Header_record.value("Section").toString();
+		Read_Commando=Header_record.value("Cmmando").toString();
+		Read_AcadValue=Header_record.value("AcadValue").toString();
+
+
 		if (Header_record.value("Code").toInt()==0 )
 		{
 			x1++;
@@ -2591,7 +2670,7 @@
 		}
 	}*/
 
-	clear_sw_header();
+	//clear_sw_header();
 
 	Signal_log1.clear();
 	Signal_log1.append("Splitting entities ");
@@ -2606,7 +2685,7 @@
 	max=0;
 	Record_Count_Tables=1;
 
-	clear_dxf_code_tables();
+	//clear_dxf_code_tables();
 
 	ui->dxf_section->clear();
 	ui->dxf_section->insert("Section entities");
@@ -6586,20 +6665,6 @@
 	index_objects= DXF_main_base[0].dxf_input.indexOf("OBJECTS");
 	index_thumbnailimage= DXF_main_base[0].dxf_input.indexOf("THUMBNAILIMAGE");
 
-	section_lengts();
-
-	copy_list();
-
-
-
-	index_header= DXF_main_base[0].dxf_input.indexOf("HEADER");
-	index_classes= DXF_main_base[0].dxf_input.indexOf("CLASSES");
-	index_tables= DXF_main_base[0].dxf_input.indexOf("TABLES");
-	index_blocks= DXF_main_base[0].dxf_input.indexOf("BLOCKS");
-	index_entities= DXF_main_base[0].dxf_input.indexOf("ENTITIES");
-	index_objects= DXF_main_base[0].dxf_input.indexOf("OBJECTS");
-	index_thumbnailimage= DXF_main_base[0].dxf_input.indexOf("THUMBNAILIMAGE");
-
 	Signal_log1.clear();
 	Signal_log1.append("index header : ");
 	Signal_log1.append(QString::number(index_header));
@@ -6631,12 +6696,10 @@
 
 	copy_list();
 
-	Signal_log1.clear();
-	Signal_log1.append("============================================================================");
-	Signal_log1.append("\n");
 
-	emit send_log(Signal_log1);
 
+
+
 	if (index_header!=-1)
 	{
 		Signal_log1.clear();

Modified: branches/DXFtoQET3_DB/dxftoqet3db.h
===================================================================
--- branches/DXFtoQET3_DB/dxftoqet3db.h	2017-05-21 06:30:33 UTC (rev 4967)
+++ branches/DXFtoQET3_DB/dxftoqet3db.h	2017-05-22 18:51:18 UTC (rev 4968)
@@ -100,78 +100,84 @@
 		int sw_objects[1072];
 		int sw_thumbnailimage[1072];
 
-		int64_t count_header;
-		int64_t count_header_record_id;
-		int64_t count_header_lines;
-		int64_t count_header_item;
+		int32_t count_header;
+		int32_t count_header_record_id;
+		int32_t count_header_lines;
+		int32_t count_header_item;
 
-		int64_t count_classes;
-		int64_t count_classes_record_id;
-		int64_t count_classes_lines;
-		int64_t count_classes_item;
+		int32_t count_classes;
+		int32_t count_classes_record_id;
+		int32_t count_classes_lines;
+		int32_t count_classes_item;
 
-		int64_t count_tables;
-		int64_t count_tables_record_id;
-		int64_t count_tables_lines;
-		int64_t count_tables_item;
+		int32_t count_tables;
+		int32_t count_tables_record_id;
+		int32_t count_tables_lines;
+		int32_t count_tables_item;
 
-		int64_t count_blocks;
-		int64_t count_blocks_record_id;
-		int64_t count_blocks_lines;
-		int64_t count_blocks_item;
+		int32_t count_blocks;
+		int32_t count_blocks_record_id;
+		int32_t count_blocks_lines;
+		int32_t count_blocks_item;
 
-		int64_t count_entities;
-		int64_t count_entities_record_id;
-		int64_t count_entities_lines;
-		int64_t count_entities_item;
+		int32_t count_entities;
+		int32_t count_entities_record_id;
+		int32_t count_entities_lines;
+		int32_t count_entities_item;
 
-		int64_t count_objects;
-		int64_t count_objects_record_id;
-		int64_t count_objects_lines;
-		int64_t count_object_item;
+		int32_t count_objects;
+		int32_t count_objects_record_id;
+		int32_t count_objects_lines;
+		int32_t count_object_item;
 
-		int64_t count_thumbnailimage;
-		int64_t count_thumbnailimage_record_id;
-		int64_t count_thumbnailimage_lines;
-		int64_t count_thumbnailimage_item;
+		int32_t count_thumbnailimage;
+		int32_t count_thumbnailimage_record_id;
+		int32_t count_thumbnailimage_lines;
+		int32_t count_thumbnailimage_item;
 
-		int64_t header_max_items;
-		int64_t header_max_items2;
-		int64_t header_max_items3;
-		int64_t classes_max_items;
-		int64_t classes_max_items2;
-		int64_t classes_max_items3;
-		int64_t tables_max_items;
-		int64_t tables_max_items2;
-		int64_t tables_max_items3;
-		int64_t blocks_max_items;
-		int64_t blocks_max_items2;
-		int64_t blocks_max_items3;
-		int64_t entities_max_items;
-		int64_t entities_max_items2;
-		int64_t entities_max_items3;
-		int64_t objects_max_items;
-		int64_t thumbnailimage_max_items;
+		int32_t header_max_items;
+		int32_t header_max_items2;
+		int32_t header_max_items3;
+		int32_t classes_max_items;
+		int32_t classes_max_items2;
+		int32_t classes_max_items3;
+		int32_t tables_max_items;
+		int32_t tables_max_items2;
+		int32_t tables_max_items3;
+		int32_t blocks_max_items;
+		int32_t blocks_max_items2;
+		int32_t blocks_max_items3;
+		int32_t entities_max_items;
+		int32_t entities_max_items2;
+		int32_t entities_max_items3;
+		int32_t objects_max_items;
+		int32_t thumbnailimage_max_items;
 
 
-		int64_t header_max_count;
-		int64_t classes_max_count;
-		int64_t tables_max_count;
-		int64_t blocks_max_count;
-		int64_t entities_max_count;
-		int64_t objects_max_count;
-		int64_t thumbnailimage_max_count;
+		int32_t header_max_count;
+		int32_t classes_max_count;
+		int32_t tables_max_count;
+		int32_t blocks_max_count;
+		int32_t entities_max_count;
+		int32_t objects_max_count;
+		int32_t thumbnailimage_max_count;
 
-		int64_t Record_Count_Header;
-		int64_t Record_Count_Classes;
-		int64_t Record_Count_Tables;
-		int64_t Record_Count_Blocks;
-		int64_t Record_Count_Entities;
-		int64_t Record_Count_Objects;
-		int64_t Record_Count_Thumbnailimage;
+		int32_t Record_Count_Header;
+		int32_t Record_Count_Classes;
+		int32_t Record_Count_Tables;
+		int32_t Record_Count_Blocks;
+		int32_t Record_Count_Entities;
+		int32_t Record_Count_Objects;
+		int32_t Record_Count_Thumbnailimage;
 
 		int32_t for1;
 		int32_t for2;
+		int32_t for3;
+		int32_t for4;
+		int32_t for5;
+		int32_t for6;
+		int32_t for7;
+		int32_t for8;
 
 		int32_t line1;
 		QString line2;
@@ -189,7 +195,7 @@
 
 		int32_t clear_code_set;
 
-		int64_t max;
+		int32_t max;
 		int max3;
 
 		int32_t index1;
@@ -301,6 +307,13 @@
 		int32_t Max_Lines;
 		int32_t Count_x1;
 
+		QString Read_Index;
+		QString Read_Code;
+		QString Read_Waarde;
+		QString Read_Section;
+		QString Read_Commando;
+		QString Read_AcadValue;
+
 	public:
 
 		void split_header();

Modified: branches/DXFtoQET3_DB/dxftoqet3db.ui
===================================================================
--- branches/DXFtoQET3_DB/dxftoqet3db.ui	2017-05-21 06:30:33 UTC (rev 4967)
+++ branches/DXFtoQET3_DB/dxftoqet3db.ui	2017-05-22 18:51:18 UTC (rev 4968)
@@ -521,13 +521,6 @@
       </property>
      </spacer>
     </item>
-    <item row="0" column="1">
-     <widget class="QPushButton" name="Choose_DB">
-      <property name="text">
-       <string>Choose DB to proces</string>
-      </property>
-     </widget>
-    </item>
     <item row="0" column="0">
      <widget class="QPushButton" name="OpenFile">
       <property name="text">
@@ -608,7 +601,14 @@
       </property>
      </widget>
     </item>
-    <item row="0" column="2">
+    <item row="0" column="4">
+     <widget class="QPushButton" name="Choose_DB">
+      <property name="text">
+       <string>Choose DB to proces</string>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="1">
      <widget class="QPushButton" name="Button_Open_DXF">
       <property name="enabled">
        <bool>true</bool>

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp	2017-05-21 06:30:33 UTC (rev 4967)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp	2017-05-22 18:51:18 UTC (rev 4968)
@@ -422,29 +422,40 @@
 
 					end_seqend=0;
 					count_vertex=0;
+					readrecord=1;
 
 					while (end_seqend==0 and count_vertex<QET_L_POLYLINE)
 					{
-						NewQuery4.next();
+						readrecord=NewQuery4.next();
 						QSqlRecord Record4=NewQuery4.record();
 						//Recordvalue2=Record4.value("Command").toString();
 
-						if (Record4.value("Command").toString()=="VERTEX" and Record4.value("Command_count").toInt()==0)
+						if(readrecord==true)
 						{
-							New_DXF_Polyline.QET_x[count_vertex]=(Record4.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
-							New_DXF_Polyline.QET_y[count_vertex]=(Record4.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
-							count_vertex++;
 
+							if (Record4.value("Command").toString()=="VERTEX" and Record4.value("Command_count").toInt()==0)
+							{
+								New_DXF_Polyline.QET_x[count_vertex]=(Record4.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+								New_DXF_Polyline.QET_y[count_vertex]=(Record4.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+								count_vertex++;
+
+							}
+							else
+							{
+								if (Record4.value("Command").toString()=="SEQEND" and Record4.value("Command_count").toInt()==0)
+								{
+									end_seqend=1;
+								}
+
+								//count_vertex++;
+							}
 						}
 						else
 						{
-							if (Record4.value("Command").toString()=="SEQEND" and Record4.value("Command_count").toInt()==0)
-							{
-								end_seqend=1;
-							}
+							end_seqend=1;
+						}
 
-							//count_vertex++;
-						}
+
 						if (Record4.value("Command").toString()=="SEQEND" and Record4.value("Command_count").toInt()==0)
 						{
 							end_seqend=1;
@@ -538,6 +549,7 @@
 					end_lwpoly=0;
 					max_vertex=0;
 					count_vertex=0;
+					readrecord=1;
 
 					max_vertex=Record3.value("dxf_90").toInt();
 
@@ -552,27 +564,36 @@
 
 					while (end_lwpoly==0 and count_vertex<max_vertex-1)
 					{
-						NewQuery4.next();
+						readrecord=NewQuery4.next();
 						QSqlRecord Record4=NewQuery4.record();
 						//Recordvalue2=Record4.value("Command").toString();
 
-						if (Record3.value("Command").toString()=="LWPOLYLINE" and max_vertex<QET_L_POLYLINE)
+						if(readrecord==true)
 						{
-							New_DXF_LWPolyline.QET_x[count_vertex]=(Record4.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
-							New_DXF_LWPolyline.QET_y[count_vertex]=(Record4.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
-							count_vertex++;
 
+							if (Record3.value("Command").toString()=="LWPOLYLINE" and max_vertex<QET_L_POLYLINE)
+							{
+								New_DXF_LWPolyline.QET_x[count_vertex]=(Record4.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+								New_DXF_LWPolyline.QET_y[count_vertex]=(Record4.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+								count_vertex++;
+
+							}
+							else
+							{
+
+								if (count_vertex>max_vertex)
+								{
+									end_lwpoly=1;
+								}
+
+								//count_vertex++;
+							}
 						}
 						else
 						{
+							end_lwpoly=1;
+						}
 
-							if (count_vertex>max_vertex)
-							{
-								end_lwpoly=1;
-							}
-
-							//count_vertex++;
-						}
 						if (count_vertex>max_vertex)
 						{
 							end_lwpoly=1;

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.h	2017-05-21 06:30:33 UTC (rev 4967)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.h	2017-05-22 18:51:18 UTC (rev 4968)
@@ -34,6 +34,7 @@
 	int end_block;
 	int end_seqend;
 	int end_lwpoly;
+	int readrecord;
 
 	int32_t count_vertex;
 	int32_t xcount;

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp	2017-05-21 06:30:33 UTC (rev 4967)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp	2017-05-22 18:51:18 UTC (rev 4968)
@@ -447,28 +447,37 @@
 
 					end_seqend=0;
 					count_vertex=0;
+					readrecord=1;
 
 					while (end_seqend==0 and count_vertex<QET_L_POLYLINE)
 					{
-						NewQueryBlock.next();
+						readrecord=NewQueryBlock.next();
 						QSqlRecord Record4=NewQueryBlock.record();
 						//Recordvalue2=Record4.value("Command").toString();
-
-						if (Record4.value("Command").toString()=="VERTEX" and Record4.value("Command_count").toInt()==0)
+						if (readrecord==true)
 						{
-							New_DXF_Polyline.QET_x[count_vertex]=(Record4.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
-							New_DXF_Polyline.QET_y[count_vertex]=(Record4.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
-							count_vertex++;
 
+							if (Record4.value("Command").toString()=="VERTEX" and Record4.value("Command_count").toInt()==0)
+							{
+								New_DXF_Polyline.QET_x[count_vertex]=(Record4.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+								New_DXF_Polyline.QET_y[count_vertex]=(Record4.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+								count_vertex++;
+
+							}
+							else
+							{
+								if (Record4.value("Command").toString()=="SEQEND" and Record4.value("Command_count").toInt()==0)
+								{
+									end_seqend=1;
+								}
+
+								//count_vertex++;
+							}
 						}
 						else
 						{
-							if (Record4.value("Command").toString()=="SEQEND" and Record4.value("Command_count").toInt()==0)
-							{
-								end_seqend=1;
-							}
+							end_seqend=1;
 
-							//count_vertex++;
 						}
 						if (Record4.value("Command").toString()=="SEQEND" and Record4.value("Command_count").toInt()==0)
 						{
@@ -566,6 +575,7 @@
 					end_lwpoly=0;
 					max_vertex=0;
 					count_vertex=0;
+					readrecord=1;
 
 					max_vertex=Record3.value("dxf_90").toInt();
 
@@ -580,26 +590,33 @@
 
 					while (end_lwpoly==0 and count_vertex<max_vertex-1)
 					{
-						NewQueryBlock.next();
+						readrecord=NewQueryBlock.next();
 						QSqlRecord Record4=NewQueryBlock.record();
 						//Recordvalue2=Record4.value("Command").toString();
-
-						if (Record3.value("Command").toString()=="LWPOLYLINE" and max_vertex<QET_L_POLYLINE)
+						if(readrecord==true)
 						{
-							New_DXF_LWPolyline.QET_x[count_vertex]=(Record4.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
-							New_DXF_LWPolyline.QET_y[count_vertex]=(Record4.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
-							count_vertex++;
 
-						}
-						else
-						{
-							if (count_vertex>max_vertex)
+							if (Record3.value("Command").toString()=="LWPOLYLINE" and max_vertex<QET_L_POLYLINE)
 							{
-								end_lwpoly=1;
+								New_DXF_LWPolyline.QET_x[count_vertex]=(Record4.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+								New_DXF_LWPolyline.QET_y[count_vertex]=(Record4.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+								count_vertex++;
+
 							}
+							else
+							{
+								if (count_vertex>max_vertex)
+								{
+									end_lwpoly=1;
+								}
 
-							//count_vertex++;
+								//count_vertex++;
+							}
 						}
+						else
+						{
+							end_lwpoly=1;
+						}
 
 						if (count_vertex>max_vertex)
 						{
@@ -738,6 +755,7 @@
 					end_lwpoly=0;
 					max_vertex=0;
 					count_vertex=0;
+					readrecord=1;
 
 					max_vertex=Record3.value("dxf_73").toInt();
 
@@ -756,26 +774,33 @@
 
 					while (end_lwpoly==0 and count_vertex<max_vertex)
 					{
-						NewQueryBlock.next();
+						readrecord=NewQueryBlock.next();
 						QSqlRecord Record4=NewQueryBlock.record();
 						//Recordvalue2=Record4.value("Command").toString();
-
-						if (Record3.value("Command").toString()=="SPLINE" and max_vertex<QET_L_POLYLINE)
+						if (readrecord==true)
 						{
-							New_DXF_LWPolyline.QET_x[count_vertex]=(Record4.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
-							New_DXF_LWPolyline.QET_y[count_vertex]=(Record4.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
-							count_vertex++;
 
-						}
-						else
-						{
-							if (count_vertex>max_vertex)
+							if (Record3.value("Command").toString()=="SPLINE" and max_vertex<QET_L_POLYLINE)
 							{
-								end_lwpoly=1;
+								New_DXF_LWPolyline.QET_x[count_vertex]=(Record4.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+								New_DXF_LWPolyline.QET_y[count_vertex]=(Record4.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+								count_vertex++;
+
 							}
+							else
+							{
+								if (count_vertex>max_vertex)
+								{
+									end_lwpoly=1;
+								}
 
-							//count_vertex++;
+								//count_vertex++;
+							}
 						}
+						else
+						{
+							end_lwpoly=1;
+						}
 
 						if (count_vertex>max_vertex)
 						{
@@ -863,6 +888,7 @@
 					end_lwpoly=0;
 					max_vertex=0;
 					count_vertex=0;
+					readrecord=1;
 
 					max_vertex=Record3.value("dxf_96").toInt()*Record3.value("dxf_91").toInt();
 
@@ -881,25 +907,34 @@
 
 					while (end_lwpoly==0 and count_vertex<max_vertex-1)
 					{
-						NewQueryBlock.next();
+						readrecord=NewQueryBlock.next();
 						QSqlRecord Record4=NewQueryBlock.record();
 						//Recordvalue2=Record4.value("Command").toString();
 
-						if (Record3.value("Command").toString()=="HATCH" and max_vertex<QET_L_POLYLINE)
+						if (readrecord==true)
 						{
-							New_DXF_LWPolyline.QET_x[count_vertex]=(Record4.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
-							New_DXF_LWPolyline.QET_y[count_vertex]=(Record4.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
-							count_vertex++;
 
+							if (Record3.value("Command").toString()=="HATCH" and max_vertex<QET_L_POLYLINE)
+							{
+								New_DXF_LWPolyline.QET_x[count_vertex]=(Record4.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+								New_DXF_LWPolyline.QET_y[count_vertex]=(Record4.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+								count_vertex++;
+
+							}
+							else
+							{
+								if (count_vertex>max_vertex)
+								{
+									end_lwpoly=1;
+								}
+
+								//count_vertex++;
+							}
 						}
 						else
 						{
-							if (count_vertex>max_vertex)
-							{
-								end_lwpoly=1;
-							}
+							end_lwpoly=1;
 
-							//count_vertex++;
 						}
 
 						if (count_vertex>max_vertex)

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h	2017-05-21 06:30:33 UTC (rev 4967)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h	2017-05-22 18:51:18 UTC (rev 4968)
@@ -34,6 +34,7 @@
 	int end_lwpoly;
 
 	int read_error1;
+	int readrecord;
 
 	int32_t count_vertex;
 	int32_t xcount;

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp	2017-05-21 06:30:33 UTC (rev 4967)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp	2017-05-22 18:51:18 UTC (rev 4968)
@@ -41,8 +41,8 @@
 	DXF_main_base[0].QDXF_entitie_ellipse_color="black";
 	DXF_main_base[0].QDXF_entitie_input_color="black";
 	DXF_main_base[0].QDXF_entitie_line_color="black";
-	DXF_main_base[0].QDXF_entitie_lwpolyline_color="black";
-	DXF_main_base[0].QDXF_entitie_polyline_color="black";
+	DXF_main_base[0].QDXF_entitie_lwpolyline_color="red";
+	DXF_main_base[0].QDXF_entitie_polyline_color="blue";
 	DXF_main_base[0].QDXF_entitie_rectangel_color="black";
 	DXF_main_base[0].QDXF_entitie_terminal_color="black";
 	DXF_main_base[0].QDXF_entitie_text_color="black";
@@ -428,32 +428,42 @@
 
 			end_seqend=0;
 			count_vertex=0;
+			readrecord=1;
 
 			while (end_seqend==0 and count_vertex<QET_L_POLYLINE)
 			{
-				NewQuery.next();
+				readrecord=NewQuery.next();
 				QSqlRecord Record3=NewQuery.record();
 				Recordvalue2=Record3.value("Command").toString();
 
-				if (Record3.value("Command").toString()=="VERTEX" and Record3.value("Command_count").toInt()==0)
+				if (readrecord==true)
 				{
-					New_DXF_Polyline.QET_x[count_vertex]=Record3.value("dxf_10").toDouble();
-					New_DXF_Polyline.QET_y[count_vertex]=Record3.value("dxf_20").toDouble();
-					count_vertex++;
 
-				}
-				else
-				{
+					if (Record3.value("Command").toString()=="VERTEX" and Record3.value("Command_count").toInt()==0)
+					{
+						New_DXF_Polyline.QET_x[count_vertex]=Record3.value("dxf_10").toDouble();
+						New_DXF_Polyline.QET_y[count_vertex]=Record3.value("dxf_20").toDouble();
+						count_vertex++;
+
+					}
+					else
+					{
+						if (Record3.value("Command").toString()=="SEQEND" and Record3.value("Command_count").toInt()==0)
+						{
+							end_seqend=1;
+						}
+
+						//count_vertex++;
+					}
 					if (Record3.value("Command").toString()=="SEQEND" and Record3.value("Command_count").toInt()==0)
 					{
 						end_seqend=1;
 					}
-
-					//count_vertex++;
 				}
-				if (Record3.value("Command").toString()=="SEQEND" and Record3.value("Command_count").toInt()==0)
+				else
 				{
 					end_seqend=1;
+
 				}
 
 			}
@@ -546,6 +556,7 @@
 			end_lwpoly=0;
 			max_vertex=0;
 			count_vertex=0;
+			readrecord=1;
 
 			max_vertex=Record2.value("dxf_90").toInt();
 
@@ -562,26 +573,34 @@
 
 			while (end_lwpoly==0 and count_vertex<max_vertex-1)
 			{
-				NewQuery.next();
+				readrecord=NewQuery.next();
 				QSqlRecord Record3=NewQuery.record();
 				Recordvalue2=Record3.value("Command").toString();
 				comand_count2=Record3.value("Command_count").toInt();
 
-				if (Record3.value("Command").toString()=="LWPOLYLINE" and max_vertex<QET_L_POLYLINE)
+				if (readrecord==true)
 				{
-					New_DXF_LWPolyline.QET_x[count_vertex]=Record3.value("dxf_10").toDouble();
-					New_DXF_LWPolyline.QET_y[count_vertex]=Record3.value("dxf_20").toDouble();
-					count_vertex++;
+					if (Record3.value("Command").toString()=="LWPOLYLINE" and max_vertex<QET_L_POLYLINE)
+					{
+						New_DXF_LWPolyline.QET_x[count_vertex]=Record3.value("dxf_10").toDouble();
+						New_DXF_LWPolyline.QET_y[count_vertex]=Record3.value("dxf_20").toDouble();
+						count_vertex++;
 
+					}
+					else
+					{
+						if (count_vertex>max_vertex)
+						{
+							end_lwpoly=1;
+						}
+
+						//count_vertex++;
+					}
 				}
 				else
 				{
-					if (count_vertex>max_vertex)
-					{
-						end_lwpoly=1;
-					}
+					end_lwpoly=1;
 
-					//count_vertex++;
 				}
 
 				if (count_vertex>max_vertex)
@@ -725,6 +744,7 @@
 			end_lwpoly=0;
 			max_vertex=0;
 			count_vertex=0;
+			readrecord=1;
 
 			max_vertex=Record2.value("dxf_73").toInt();
 
@@ -748,26 +768,34 @@
 
 			while (end_lwpoly==0 and count_vertex<max_vertex)
 			{
-				NewQuery.next();
+				readrecord=NewQuery.next();
 				QSqlRecord Record3=NewQuery.record();
 				Recordvalue2=Record3.value("Command").toString();
 				comand_count2=Record3.value("Command_count").toInt();
 
-				if (Record3.value("Command").toString()=="SPLINE" and max_vertex<QET_L_POLYLINE)
+				if (readrecord==true)
 				{
-					New_DXF_LWPolyline.QET_x[count_vertex]=Record3.value("dxf_10").toDouble();
-					New_DXF_LWPolyline.QET_y[count_vertex]=Record3.value("dxf_20").toDouble();
-					count_vertex++;
+					if (Record3.value("Command").toString()=="SPLINE" and max_vertex<QET_L_POLYLINE)
+					{
+						New_DXF_LWPolyline.QET_x[count_vertex]=Record3.value("dxf_10").toDouble();
+						New_DXF_LWPolyline.QET_y[count_vertex]=Record3.value("dxf_20").toDouble();
+						count_vertex++;
 
+					}
+					else
+					{
+						if (count_vertex>max_vertex)
+						{
+							end_lwpoly=1;
+						}
+
+						//count_vertex++;
+					}
 				}
 				else
 				{
-					if (count_vertex>max_vertex)
-					{
-						end_lwpoly=1;
-					}
+					end_lwpoly=1;
 
-					//count_vertex++;
 				}
 
 				if (count_vertex>max_vertex)
@@ -853,6 +881,7 @@
 			end_lwpoly=0;
 			max_vertex=0;
 			count_vertex=0;
+			readrecord=1;
 
 			max_vertex=Record2.value("dxf_96").toInt()*Record2.value("dxf_91").toInt();
 
@@ -869,26 +898,34 @@
 
 			while (end_lwpoly==0 and count_vertex<max_vertex-1)
 			{
-				NewQuery.next();
+				readrecord=NewQuery.next();
 				QSqlRecord Record3=NewQuery.record();
 				Recordvalue2=Record3.value("Command").toString();
 				comand_count2=Record3.value("Command_count").toInt();
 
-				if (Record3.value("Command").toString()=="HATCH" and max_vertex<QET_L_POLYLINE)
+				if (readrecord==true)
 				{
-					New_DXF_LWPolyline.QET_x[count_vertex]=Record3.value("dxf_10").toDouble();
-					New_DXF_LWPolyline.QET_y[count_vertex]=Record3.value("dxf_20").toDouble();
-					count_vertex++;
+					if (Record3.value("Command").toString()=="HATCH" and max_vertex<QET_L_POLYLINE)
+					{
+						New_DXF_LWPolyline.QET_x[count_vertex]=Record3.value("dxf_10").toDouble();
+						New_DXF_LWPolyline.QET_y[count_vertex]=Record3.value("dxf_20").toDouble();
+						count_vertex++;
 
+					}
+					else
+					{
+						if (count_vertex>max_vertex)
+						{
+							end_lwpoly=1;
+						}
+
+						//count_vertex++;
+					}
 				}
 				else
 				{
-					if (count_vertex>max_vertex)
-					{
-						end_lwpoly=1;
-					}
 
-					//count_vertex++;
+					end_lwpoly=1;
 				}
 
 				if (count_vertex>max_vertex)

Modified: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.h	2017-05-21 06:30:33 UTC (rev 4967)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.h	2017-05-22 18:51:18 UTC (rev 4968)
@@ -34,6 +34,7 @@
 
 	int end_seqend;
 	int end_lwpoly;
+	int readrecord;
 
 
 	int32_t count_vertex;


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