[qet] qet/qet: [4816] Add new DXF converter files

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


Revision: 4816
Author:   scorpio810
Date:     2016-12-20 18:55:57 +0100 (Tue, 20 Dec 2016)
Log Message:
-----------
Add new DXF converter files

Added Paths:
-----------
    branches/DXFtoQET3_DB/DXFtoQET.pro
    branches/DXFtoQET3_DB/Introductie dxftoqet converter V3
    branches/DXFtoQET3_DB/data.cpp
    branches/DXFtoQET3_DB/data.h
    branches/DXFtoQET3_DB/data2.cpp
    branches/DXFtoQET3_DB/data2.h
    branches/DXFtoQET3_DB/db/
    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/main.cpp
    branches/DXFtoQET3_DB/src/
    branches/DXFtoQET3_DB/src/DXF_base/
    branches/DXFtoQET3_DB/src/DXF_control/
    branches/DXFtoQET3_DB/src/DXF_control/dxf_corner_to_elmt.cpp
    branches/DXFtoQET3_DB/src/DXF_control/dxf_corner_to_elmt.h
    branches/DXFtoQET3_DB/src/DXF_control/dxf_layer_control.cpp
    branches/DXFtoQET3_DB/src/DXF_control/dxf_layer_control.h
    branches/DXFtoQET3_DB/src/DXF_control/dxf_ltype_control.cpp
    branches/DXFtoQET3_DB/src/DXF_control/dxf_ltype_control.h
    branches/DXFtoQET3_DB/src/DXF_control/dxf_text_control.cpp
    branches/DXFtoQET3_DB/src/DXF_control/dxf_text_control.h
    branches/DXFtoQET3_DB/src/ELMT_base/
    branches/DXFtoQET3_DB/src/ELMT_base/baseelmt.cpp
    branches/DXFtoQET3_DB/src/ELMT_base/baseelmt.h
    branches/DXFtoQET3_DB/src/ELMT_base_types/
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_arc.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_arc.h
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_attrinute.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_attrinute.h
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_circle.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_circle.h
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_ellipse.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_ellipse.h
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_input.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_input.h
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_line.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_line.h
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_polyline.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_polyline.h
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_rectangel.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_rectangel.h
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_terminal.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_terminal.h
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_text.cpp
    branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_text.h
    branches/DXFtoQET3_DB/src/ELMT_steps/
    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
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_header_steps.cpp
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_header_steps.h
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_tables.cpp
    branches/DXFtoQET3_DB/src/ELMT_steps/elmt_tables.h
    branches/DXFtoQET3_DB/src/dxf_load.cpp
    branches/DXFtoQET3_DB/src/dxf_load.h
    branches/DXFtoQET3_DB/src/icon/
    branches/DXFtoQET3_DB/src/icon/document-open dxf-csv.png
    branches/DXFtoQET3_DB/src/icon/document-save-as elmt.png
    branches/DXFtoQET3_DB/src/icon/document-save-as qet.png

Added: branches/DXFtoQET3_DB/DXFtoQET.pro
===================================================================
--- branches/DXFtoQET3_DB/DXFtoQET.pro	                        (rev 0)
+++ branches/DXFtoQET3_DB/DXFtoQET.pro	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,67 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2016-04-30T12:13:04
+#
+#-------------------------------------------------
+
+QT       += core gui\
+         sql\
+
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+
+TARGET = DXFtoQET
+TEMPLATE = app
+
+
+SOURCES += main.cpp\
+        dxftoqet3db.cpp \
+    data.cpp \
+    src/dxf_load.cpp \
+    db/dbmanager.cpp \
+    data2.cpp \
+    src/ELMT_base_types/dxf_base_arc.cpp \
+    src/ELMT_base_types/dxf_base_circle.cpp \
+    src/ELMT_base_types/dxf_base_ellipse.cpp \
+    src/ELMT_base_types/dxf_base_input.cpp \
+    src/ELMT_base_types/dxf_base_line.cpp \
+    src/ELMT_base_types/dxf_base_polyline.cpp \
+    src/ELMT_base_types/dxf_base_rectangel.cpp \
+    src/ELMT_base_types/dxf_base_terminal.cpp \
+    src/ELMT_base_types/dxf_base_text.cpp \
+    src/ELMT_base/baseelmt.cpp \
+    src/DXF_control/dxf_layer_control.cpp \
+    src/DXF_control/dxf_ltype_control.cpp \
+    src/DXF_control/dxf_text_control.cpp \
+    src/ELMT_steps/elmt_header_steps.cpp \
+    src/ELMT_steps/elmt_tables.cpp \
+    src/ELMT_steps/elmt_entities.cpp \
+    src/DXF_control/dxf_corner_to_elmt.cpp \
+    src/ELMT_steps/elmt_blocks.cpp \
+    src/ELMT_steps/elmt_block_level2.cpp
+
+HEADERS  += dxftoqet3db.h \
+    data.h \
+    src/dxf_load.h \
+    db/dbmanager.h \
+    data2.h \
+    src/ELMT_base_types/dxf_base_arc.h \
+    src/ELMT_base_types/dxf_base_circle.h \
+    src/ELMT_base_types/dxf_base_ellipse.h \
+    src/ELMT_base_types/dxf_base_input.h \
+    src/ELMT_base_types/dxf_base_line.h \
+    src/ELMT_base_types/dxf_base_polyline.h \
+    src/ELMT_base_types/dxf_base_rectangel.h \
+    src/ELMT_base_types/dxf_base_terminal.h \
+    src/ELMT_base_types/dxf_base_text.h \
+    src/ELMT_base/baseelmt.h \
+    src/DXF_control/dxf_layer_control.h \
+    src/DXF_control/dxf_ltype_control.h \
+    src/DXF_control/dxf_text_control.h \
+    src/ELMT_steps/elmt_header_steps.h \
+    src/ELMT_steps/elmt_tables.h \
+    src/ELMT_steps/elmt_entities.h \
+    src/DXF_control/dxf_corner_to_elmt.h \
+    src/ELMT_steps/elmt_blocks.h \
+    src/ELMT_steps/elmt_block_level2.h
+
+FORMS    += dxftoqet3db.ui

Added: branches/DXFtoQET3_DB/Introductie dxftoqet converter V3
===================================================================
--- branches/DXFtoQET3_DB/Introductie dxftoqet converter V3	                        (rev 0)
+++ branches/DXFtoQET3_DB/Introductie dxftoqet converter V3	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,44 @@
+
+DXF to QET ELMT converter V3.0 use SQlite
+==============================================================================================================
+
+This converter converts only ASCII dxf files
+binary dxf files are not converted.
+
+when having problems with a dxf file, copy paste the log tab into a email
+with a description of the problem you have found
+
+if you have a drawing with block inside blocks, open this drawing with a cad program and 
+explode this blocks into one level blocks.
+
+==============================================================================================================
+
+A few steps to follow
+
+Click on "Open dxf file" to search the dxf file you want to convert
+
+next click on "Load dxf into DB", this starts splitting and loading the dxf code into the different db tables
+
+is this is don you dont need everityme to do the "load dxf into DB"
+
+you can then click on "Choose DB to proces"
+
+after "Load dxf into DB" or "Choose DB to proces" click on "Create QET elmt" to create a elmt output
+
+you can check this syntax under the tab "ELMT"
+
+Then click on "Save to ELMT file" to store the result into the QET user cymbols folder
+
+if this is not done into the correct folder, checkout the tab settings to change the destination path
+
+The time needed for loading into the DB depents on the amount of lines in the dxf file
+
+21:26:49=> Start loading dxf file into tables 
+total lines : 28935
+header items :255
+tables items :447
+blocks items :405
+entities items :397
+End loading into db 21:31:25
+
+the creation of the ELMT file is faster and depents on the amount of ENTITIES and BLOCKS in the dxf file.

Added: branches/DXFtoQET3_DB/data.cpp
===================================================================
--- branches/DXFtoQET3_DB/data.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/data.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,14 @@
+#include "data.h"
+
+struct DXF_base DXF_main_base[DXF_base_set];
+struct DXF_codes DXF_code_tables[DXF_codes_set];
+struct DXF_codes DXF_codes_tables_empty;
+struct DXF_var DXF_variable;
+struct DXF_Layers DXF_Layer_list[DXF_layers_set];
+struct DXF_Entities DXF_Entities_List;
+
+data::data(QWidget *parent) : QWidget(parent)
+{
+
+}
+

Added: branches/DXFtoQET3_DB/data.h
===================================================================
--- branches/DXFtoQET3_DB/data.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/data.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,770 @@
+#ifndef DATA_H
+#define DATA_H
+
+#include <QtCore>
+#include <QWidget>
+
+//#include "db/dbmanager.h"
+
+#define DXF_base_set 1
+#define DXF_item_split 50000 //dxf split tables
+#define DXF_codes_set 8000
+#define DXF_codeset_copies 5000
+#define QET_L_POLYLINE 100
+
+#define DXF_layers_set 500
+
+struct DXF_base
+{
+	QString dxf_openfile;
+	QString dxf_dir;
+	QString dxf_filepath; // dxf file path
+	QString dxf_text_all;
+	QString dxf_filetype;
+	QString dxf_savepath; // QET elements path
+
+	QString QDXF_line_color;
+	QString QDXF_circle_color;
+	QString QDXF_arc_color;
+	QString QDXF_ellipse_color;
+	QString QDXF_input_color;
+	QString QDXF_polyline_color;
+	QString QDXF_rectangel_color;
+	QString QDXF_terminal_color;
+	QString QDXF_text_color;
+	QString QDXF_lwpolyline_color;
+	QString QDXF_solid_color;
+
+	QString QDXF_entitie_line_color;
+	QString QDXF_entitie_circle_color;
+	QString QDXF_entitie_arc_color;
+	QString QDXF_entitie_ellipse_color;
+	QString QDXF_entitie_input_color;
+	QString QDXF_entitie_polyline_color;
+	QString QDXF_entitie_rectangel_color;
+	QString QDXF_entitie_terminal_color;
+	QString QDXF_entitie_text_color;
+	QString QDXF_entitie_lwpolyline_color;
+	QString QDXF_entitie_solid_color;
+
+	QString QDXF_block_line_color;
+	QString QDXF_block_circle_color;
+	QString QDXF_block_arc_color;
+	QString QDXF_block_ellipse_color;
+	QString QDXF_block_input_color;
+	QString QDXF_block_polyline_color;
+	QString QDXF_block_rectangel_color;
+	QString QDXF_block_terminal_color;
+	QString QDXF_block_text_color;
+	QString QDXF_block_lwpolyline_color;
+	QString QDXF_block_solid_color;
+
+
+
+	QStringList dxf_input;
+
+	int32_t dxf_line_count;
+	int32_t dxf_csv_line_count;
+
+	int DXF_file_loaded_into_table;
+};
+
+struct DXF_codes
+{
+	int64_t index_count;
+
+	QString Section; //section of dxf file
+	QString Command; //dxf instructie
+	QString ID_instruction; // unic id to select instruction
+	int Command_count; //
+
+
+	QString dxf_m1;
+	QString dxf_m2;
+	QString dxf_m3;
+	QString dxf_m4;
+	QString dxf_m5;
+
+	QString dxf_0; //entitie type
+
+	QString dxf_1;
+	QString dxf_2;
+	QString dxf_3;
+	QString dxf_4;
+	QString dxf_5;
+	QString dxf_6;
+	QString dxf_7;
+	QString dxf_8;
+	QString dxf_9;
+
+	QString dxf_10;
+	QString dxf_11;
+	QString dxf_12;
+	QString dxf_13;
+	QString dxf_14;
+	QString dxf_15;
+	QString dxf_16;
+	QString dxf_17;
+	QString dxf_18;
+	QString dxf_19;
+
+	QString dxf_20;
+	QString dxf_21;
+	QString dxf_22;
+	QString dxf_23;
+	QString dxf_24;
+	QString dxf_25;
+	QString dxf_26;
+	QString dxf_27;
+	QString dxf_28;
+	QString dxf_29;
+
+	QString dxf_30;
+	QString dxf_31;
+	QString dxf_32;
+	QString dxf_33;
+	QString dxf_34;
+	QString dxf_35;
+	QString dxf_36;
+	QString dxf_37;
+	QString dxf_38;
+	QString dxf_39;
+
+	QString dxf_40;
+	QString dxf_41;
+	QString dxf_42;
+	QString dxf_43;
+	QString dxf_44;
+	QString dxf_45;
+	QString dxf_46;
+	QString dxf_47;
+	QString dxf_48;
+	QString dxf_49;
+
+	QString dxf_50;
+	QString dxf_51;
+	QString dxf_52;
+	QString dxf_53;
+	QString dxf_54;
+	QString dxf_55;
+	QString dxf_56;
+	QString dxf_57;
+	QString dxf_58;
+	QString dxf_59;
+
+	QString dxf_60;
+	QString dxf_61;
+	QString dxf_62;
+	QString dxf_63;
+	QString dxf_64;
+	QString dxf_65;
+	QString dxf_66;
+	QString dxf_67;
+	QString dxf_68;
+	QString dxf_69;
+	QString dxf_70;
+	QString dxf_71;
+	QString dxf_72;
+	QString dxf_73;
+	QString dxf_74;
+	QString dxf_75;
+	QString dxf_76;
+	QString dxf_77;
+	QString dxf_78;
+	QString dxf_79;
+
+	//dxf_80;
+	//dxf_81;
+	//dxf_82;
+	//dxf_83;
+	//dxf_84;
+	//dxf_85;
+	//dxf_86;
+	//dxf_87;
+	//dxf_88;
+	//dxf_89;
+
+	QString dxf_90;
+	QString dxf_91;
+	QString dxf_92;
+	QString dxf_93;
+	QString dxf_94;
+	QString dxf_95;
+	QString dxf_96;
+	QString dxf_97;
+	QString dxf_98;
+	QString dxf_99;
+
+	QString dxf_100;
+	// dxf_101;
+	QString dxf_102;
+	// dxf_103;
+	// dxf_104;
+	QString dxf_105;
+	//dxf_106;
+	//dxf_107;
+	//dxf_108;
+	//dxf_109;
+
+
+	QString dxf_110;
+	QString dxf_111;
+	QString dxf_112;
+	QString dxf_113;
+	QString dxf_114;
+	QString dxf_115;
+	QString dxf_116;
+	QString dxf_117;
+	QString dxf_118;
+	QString dxf_119;
+
+	QString dxf_120;
+	QString dxf_121;
+	QString dxf_122;
+	QString dxf_123;
+	QString dxf_124;
+	QString dxf_125;
+	QString dxf_126;
+	QString dxf_127;
+	QString dxf_128;
+	QString dxf_129;
+
+	QString dxf_130;
+	QString dxf_131;
+	QString dxf_132;
+	QString dxf_133;
+	QString dxf_134;
+	QString dxf_135;
+	QString dxf_136;
+	QString dxf_137;
+	QString dxf_138;
+	QString dxf_139;
+
+	QString dxf_140;
+	QString dxf_141;
+	QString dxf_142;
+	QString dxf_143;
+	QString dxf_144;
+	QString dxf_145;
+	QString dxf_146;
+	QString dxf_147;
+	QString dxf_148;
+	QString dxf_149;
+
+	// dxf_150;
+	// dxf_151;
+	// dxf_152;
+	// dxf_153;
+	// dxf_154;
+	// dxf_155;
+	// dxf_156;
+	// dxf_157;
+	// dxf_158;
+	// dxf_159;
+
+	QString dxf_160;
+	QString dxf_161;
+	QString dxf_162;
+	QString dxf_163;
+	QString dxf_164;
+	QString dxf_165;
+	QString dxf_166;
+	QString dxf_167;
+	QString dxf_168;
+	QString dxf_169;
+
+	QString dxf_170;
+	QString dxf_171;
+	QString dxf_172;
+	QString dxf_173;
+	QString dxf_174;
+	QString dxf_175;
+	QString dxf_176;
+	QString dxf_177;
+	QString dxf_178;
+	QString dxf_179;
+
+	// dxf_180;
+	// dxf_181;
+	// dxf_182;
+	// dxf_183;
+	// dxf_184;
+	// dxf_185;
+	// dxf_186;
+	// dxf_187;
+	// dxf_188;
+	// dxf_189;
+	// dxf_190;
+	// dxf_191;
+	// dxf_192;
+	// dxf_193;
+	// dxf_194;
+	// dxf_195;
+	// dxf_196;
+	// dxf_197;
+	// dxf_198;
+	// dxf_199;
+	// dxf_200;
+	// dxf_201;
+	// dxf_202;
+	// dxf_203;
+	// dxf_204;
+	// dxf_205;
+	// dxf_206;
+	// dxf_207;
+	// dxf_208;
+	// dxf_209;
+
+	QString dxf_210;
+	QString dxf_211;
+	QString dxf_212;
+	QString dxf_213;
+	QString dxf_214;
+	QString dxf_215;
+	QString dxf_216;
+	QString dxf_217;
+	QString dxf_218;
+	QString dxf_219;
+	QString dxf_220;
+	QString dxf_221;
+	QString dxf_222;
+	QString dxf_223;
+	QString dxf_224;
+	QString dxf_225;
+	QString dxf_226;
+	QString dxf_227;
+	QString dxf_228;
+	QString dxf_229;
+	QString dxf_230;
+	QString dxf_231;
+	QString dxf_232;
+	QString dxf_233;
+	QString dxf_234;
+	QString dxf_235;
+	QString dxf_236;
+	QString dxf_237;
+	QString dxf_238;
+	QString dxf_239;
+
+	// dxf_240;
+	// dxf_241;
+	// dxf_242;
+	// dxf_243;
+	// dxf_244;
+	// dxf_245;
+	// dxf_246;
+	// dxf_247;
+	// dxf_248;
+	// dxf_249;
+	// dxf_250;
+	// dxf_251;
+	// dxf_252;
+	// dxf_253;
+	// dxf_254;
+	// dxf_255;
+	// dxf_256;
+	// dxf_257;
+	// dxf_258;
+	// dxf_259;
+	// dxf_260;
+	// dxf_261;
+	// dxf_262;
+	// dxf_263;
+	// dxf_264;
+	// dxf_265;
+	// dxf_266;
+	// dxf_267;
+	// dxf_268;
+	// dxf_269;
+
+	QString dxf_270;
+	QString dxf_271;
+	QString dxf_272;
+	QString dxf_273;
+	QString dxf_274;
+	QString dxf_275;
+	QString dxf_276;
+	QString dxf_277;
+	QString dxf_278;
+	QString dxf_279;
+
+	QString dxf_280;
+	QString dxf_281;
+	QString dxf_282;
+	QString dxf_283;
+	QString dxf_284;
+	QString dxf_285;
+	QString dxf_286;
+	QString dxf_287;
+	QString dxf_288;
+	QString dxf_289;
+
+	QString dxf_290;
+	QString dxf_291;
+	QString dxf_292;
+	QString dxf_293;
+	QString dxf_294;
+	QString dxf_295;
+	QString dxf_296;
+	QString dxf_297;
+	QString dxf_298;
+	QString dxf_299;
+
+
+	QString dxf_300;
+	QString dxf_301;
+	QString dxf_302;
+	QString dxf_303;
+	QString dxf_304;
+	QString dxf_305;
+	QString dxf_306;
+	QString dxf_307;
+	QString dxf_308;
+	QString dxf_309;
+
+	QString dxf_310;
+	QString dxf_311;
+	QString dxf_312;
+	QString dxf_313;
+	QString dxf_314;
+	QString dxf_315;
+	QString dxf_316;
+	QString dxf_317;
+	QString dxf_318;
+	QString dxf_319;
+
+	QString dxf_320;
+	QString dxf_321;
+	QString dxf_322;
+	QString dxf_323;
+	QString dxf_324;
+	QString dxf_325;
+	QString dxf_326;
+	QString dxf_327;
+	QString dxf_328;
+	QString dxf_329;
+
+	QString dxf_330;
+	QString dxf_331;
+	QString dxf_332;
+	QString dxf_333;
+	QString dxf_334;
+	QString dxf_335;
+	QString dxf_336;
+	QString dxf_337;
+	QString dxf_338;
+	QString dxf_339;
+	QString dxf_340;
+	QString dxf_341;
+	QString dxf_342;
+	QString dxf_343;
+	QString dxf_344;
+	QString dxf_345;
+	QString dxf_346;
+	QString dxf_347;
+	QString dxf_348;
+	QString dxf_349;
+	QString dxf_350;
+	QString dxf_351;
+	QString dxf_352;
+	QString dxf_353;
+	QString dxf_354;
+	QString dxf_355;
+	QString dxf_356;
+	QString dxf_357;
+	QString dxf_358;
+	QString dxf_359;
+	QString dxf_360;
+	QString dxf_361;
+	QString dxf_362;
+	QString dxf_363;
+	QString dxf_364;
+	QString dxf_365;
+	QString dxf_366;
+	QString dxf_367;
+	QString dxf_368;
+	QString dxf_369;
+
+	QString dxf_370;
+	QString dxf_371;
+	QString dxf_372;
+	QString dxf_373;
+	QString dxf_374;
+	QString dxf_375;
+	QString dxf_376;
+	QString dxf_377;
+	QString dxf_378;
+	QString dxf_379;
+
+	QString dxf_380;
+	QString dxf_381;
+	QString dxf_382;
+	QString dxf_383;
+	QString dxf_384;
+	QString dxf_385;
+	QString dxf_386;
+	QString dxf_387;
+	QString dxf_388;
+	QString dxf_389;
+
+	QString dxf_390;
+	QString dxf_391;
+	QString dxf_392;
+	QString dxf_393;
+	QString dxf_394;
+	QString dxf_395;
+	QString dxf_396;
+	QString dxf_397;
+	QString dxf_398;
+	QString dxf_399;
+
+	QString dxf_400;
+	QString dxf_401;
+	QString dxf_402;
+	QString dxf_403;
+	QString dxf_404;
+	QString dxf_405;
+	QString dxf_406;
+	QString dxf_407;
+	QString dxf_408;
+	QString dxf_409;
+
+	QString dxf_410;
+	QString dxf_411;
+	QString dxf_412;
+	QString dxf_413;
+	QString dxf_414;
+	QString dxf_415;
+	QString dxf_416;
+	QString dxf_417;
+	QString dxf_418;
+	QString dxf_419;
+
+	QString dxf_420;
+	QString dxf_421;
+	QString dxf_422;
+	QString dxf_423;
+	QString dxf_424;
+	QString dxf_425;
+	QString dxf_426;
+	QString dxf_427;
+	QString dxf_428;
+	QString dxf_429;
+
+
+	QString dxf_430;
+	QString dxf_431;
+	QString dxf_432;
+	QString dxf_433;
+	QString dxf_434;
+	QString dxf_435;
+	QString dxf_436;
+	QString dxf_437;
+	QString dxf_438;
+	QString dxf_439;
+
+	QString dxf_440;
+	QString dxf_441;
+	QString dxf_442;
+	QString dxf_443;
+	QString dxf_444;
+	QString dxf_445;
+	QString dxf_446;
+	QString dxf_447;
+	QString dxf_448;
+	QString dxf_449;
+
+	QString dxf_450;
+	QString dxf_451;
+	QString dxf_452;
+	QString dxf_453;
+	QString dxf_454;
+	QString dxf_455;
+	QString dxf_456;
+	QString dxf_457;
+	QString dxf_458;
+	QString dxf_459;
+
+	QString dxf_460;
+	QString dxf_461;
+	QString dxf_462;
+	QString dxf_463;
+	QString dxf_464;
+	QString dxf_465;
+	QString dxf_466;
+	QString dxf_467;
+	QString dxf_468;
+	QString dxf_469;
+
+
+	QString dxf_470;
+	QString dxf_471;
+	QString dxf_472;
+	QString dxf_473;
+	QString dxf_474;
+	QString dxf_475;
+	QString dxf_476;
+	QString dxf_477;
+	QString dxf_478;
+	QString dxf_479;
+
+	QString dxf_480;
+	QString dxf_481;
+	QString dxf_482;
+	QString dxf_483;
+	QString dxf_484;
+	QString dxf_485;
+	QString dxf_486;
+	QString dxf_487;
+	QString dxf_488;
+	QString dxf_489;
+
+	QString dxf_999;
+
+	QString dxf_1000;
+	QString dxf_1001;
+	QString dxf_1002;
+	QString dxf_1003;
+	QString dxf_1004;
+	QString dxf_1005;
+	QString dxf_1006;
+	QString dxf_1007;
+	QString dxf_1008;
+	QString dxf_1009;
+
+	QString dxf_1010;
+	QString dxf_1011;
+	QString dxf_1012;
+	QString dxf_1013;
+	QString dxf_1014;
+	QString dxf_1015;
+	QString dxf_1016;
+	QString dxf_1017;
+	QString dxf_1018;
+	QString dxf_1019;
+	QString dxf_1020;
+	QString dxf_1021;
+	QString dxf_1022;
+	QString dxf_1023;
+	QString dxf_1024;
+	QString dxf_1025;
+	QString dxf_1026;
+	QString dxf_1027;
+	QString dxf_1028;
+	QString dxf_1029;
+	QString dxf_1030;
+	QString dxf_1031;
+	QString dxf_1032;
+	QString dxf_1033;
+	QString dxf_1034;
+	QString dxf_1035;
+	QString dxf_1036;
+	QString dxf_1037;
+	QString dxf_1038;
+	QString dxf_1039;
+	QString dxf_1040;
+	QString dxf_1041;
+	QString dxf_1042;
+	QString dxf_1043;
+	QString dxf_1044;
+	QString dxf_1045;
+	QString dxf_1046;
+	QString dxf_1047;
+	QString dxf_1048;
+	QString dxf_1049;
+	QString dxf_1050;
+	QString dxf_1051;
+	QString dxf_1052;
+	QString dxf_1053;
+	QString dxf_1054;
+	QString dxf_1055;
+	QString dxf_1056;
+	QString dxf_1057;
+	QString dxf_1058;
+	QString dxf_1059;
+
+	QString dxf_1060;
+	QString dxf_1061;
+	QString dxf_1062;
+	QString dxf_1063;
+	QString dxf_1064;
+	QString dxf_1065;
+	QString dxf_1066;
+	QString dxf_1067;
+	QString dxf_1068;
+	QString dxf_1069;
+	QString dxf_1070;
+
+	QString dxf_1071;
+
+
+};
+
+struct DXF_var
+{
+	QString DXF_ACADVER;
+	QString DXF_ACADMAINTVER;
+	QString DXF_DWGCODEPAGE;
+	QString DXF_COMMENTS;
+	QString DXF_INSBASE_X;
+	QString DXF_INSBASE_Y;
+	QString DXF_EXTMIN_X;
+	QString DXF_EXTMIN_Y;
+	QString DXF_EXTMAX_X;
+	QString DXF_EXTMAX_Y;
+	QString DXF_LIMMIN_X;
+	QString DXF_LIMMIN_Y;
+	QString DXF_LIMMAX_X;
+	QString DXF_LIMMAX_Y;
+	QString DXF_ORTHOMODE;
+	QString DXF_REGENMODE;
+	QString DXF_FILLMODE;
+	QString DXF_QTEXTMODE;
+	QString DXF_MIRRTEXT;
+	QString DXF_LTSCALE;
+	QString DXF_ATTMODE;
+	QString DXF_TEXTSIZE;
+	QString DXF_TRACEWID;
+	QString DXF_TEXTSTYLE;
+	QString DXF_CLAYER;
+	QString DXF_CELTYPE;
+
+
+};
+
+struct DXF_Layers
+{
+	QString DXF_Layer_naam;
+	QString DXF_Layer_linetype;
+	QString DXF_Layer_color;
+
+};
+
+struct DXF_Entities
+{
+	QString DXF_Result;
+
+};
+
+struct dxf_file1
+{
+	QString ID;
+	QString Code;
+	QString Waarde;
+	QString	Sectie;
+};
+
+class data : public QWidget
+{
+	Q_OBJECT
+	public:
+	explicit data(QWidget *parent = 0);
+
+	signals:
+
+	public slots:
+};
+
+
+
+#endif // DATA_H

Added: branches/DXFtoQET3_DB/data2.cpp
===================================================================
--- branches/DXFtoQET3_DB/data2.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/data2.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,7 @@
+#include "data2.h"
+
+data2::data2(QWidget *parent) : QWidget(parent)
+{
+
+}
+

Added: branches/DXFtoQET3_DB/data2.h
===================================================================
--- branches/DXFtoQET3_DB/data2.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/data2.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,17 @@
+#ifndef DATA2_H
+#define DATA2_H
+
+#include <QWidget>
+
+class data2 : public QWidget
+{
+	Q_OBJECT
+	public:
+	explicit data2(QWidget *parent = 0);
+
+	signals:
+
+	public slots:
+};
+
+#endif // DATA2_H

Added: branches/DXFtoQET3_DB/db/dbmanager.cpp
===================================================================
--- branches/DXFtoQET3_DB/db/dbmanager.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/db/dbmanager.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,1364 @@
+#include "dbmanager.h"
+
+extern struct DXF_codes DXF_code_tables[DXF_codes_set];
+extern struct DXF_base DXF_main_base[DXF_base_set];
+
+dbManager::dbManager(QWidget *parent) : QWidget(parent)
+{
+
+}
+
+void dbManager::dbManager1(const QString &pathname)
+{
+	m_db=QSqlDatabase::addDatabase("QSQLITE");
+	m_db.setDatabaseName(pathname);
+
+
+
+	if (!m_db.open())
+	{
+		/*QMessageBox::warning(this, tr("Application"),
+				  tr("Error : connection with database fails"));*/
+	}
+	else
+	{
+		/*QMessageBox::warning(this, tr("Application"),
+				  tr("Connection with database ok"));*/
+	}
+
+
+
+}
+
+void dbManager::dbManager_close(const QString &pathname)
+{
+	if (m_db.isOpen())
+	{
+		m_db.close();
+
+
+	}
+}
+
+void dbManager::dbManager_create_tables(const QString &pathname)
+{
+
+	QsqlString="create table dxf_list (Index_count primary key, Code)";
+
+	m_db.exec(QsqlString);
+
+	QsqlString="create table dxf_file (Index_count primary key, Code, Waarde, Section )";
+
+	m_db.exec(QsqlString);
+
+	QsqlString="create table elmt_blocks (Index_count primary key,Block_Naam, Block_value)";
+
+	m_db.exec(QsqlString);
+
+	QsqlString="create table elmt_entities (Index_count primary key,Block_Naam, Block_value)";
+
+	m_db.exec(QsqlString);
+
+	QsqlString="create table dxf_header (Index_count primary key,Section";
+	QsqlString.append(", Command, ID_instruction, Command_count");
+	QsqlString.append(", dxf_m1, dxf_m2, dxf_m3, dxf_m4, dxf_m5");
+	QsqlString.append(", dxf_0, dxf_1, dxf_2, dxf_3, dxf_4, dxf_5, dxf_6, dxf_7, dxf_8, dxf_9");
+	QsqlString.append(", dxf_10, dxf_11, dxf_12, dxf_13, dxf_14, dxf_15, dxf_16, dxf_17, dxf_18, dxf_19");
+	QsqlString.append(", dxf_20, dxf_21, dxf_22, dxf_23, dxf_24, dxf_25, dxf_26, dxf_27, dxf_28, dxf_29");
+	QsqlString.append(", dxf_30, dxf_31, dxf_32, dxf_33, dxf_34, dxf_35, dxf_36, dxf_37, dxf_38, dxf_39");
+	QsqlString.append(", dxf_40, dxf_41, dxf_42, dxf_43, dxf_44, dxf_45, dxf_46, dxf_47, dxf_48, dxf_49");
+	QsqlString.append(", dxf_50, dxf_51, dxf_52, dxf_53, dxf_54, dxf_55, dxf_56, dxf_57, dxf_58, dxf_59");
+	QsqlString.append(", dxf_60, dxf_61, dxf_62, dxf_63, dxf_64, dxf_65, dxf_66, dxf_67, dxf_68, dxf_69");
+	QsqlString.append(", dxf_70, dxf_71, dxf_72, dxf_73, dxf_74, dxf_75, dxf_76, dxf_77, dxf_78, dxf_79");
+	QsqlString.append(", dxf_90, dxf_91, dxf_92, dxf_93, dxf_94, dxf_95, dxf_96, dxf_97, dxf_98, dxf_99");
+	QsqlString.append(", dxf_100, dxf_102, dxf_105");
+	QsqlString.append(", dxf_110, dxf_111, dxf_112, dxf_113, dxf_114, dxf_115, dxf_116, dxf_117, dxf_118, dxf_119");
+	QsqlString.append(", dxf_120, dxf_121, dxf_122, dxf_123, dxf_124, dxf_125, dxf_126, dxf_127, dxf_128, dxf_129");
+	QsqlString.append(", dxf_130, dxf_131, dxf_132, dxf_133, dxf_134, dxf_135, dxf_136, dxf_137, dxf_138, dxf_139");
+	QsqlString.append(", dxf_140, dxf_141, dxf_142, dxf_143, dxf_144, dxf_145, dxf_146, dxf_147, dxf_148, dxf_149");
+
+	QsqlString.append(", dxf_160, dxf_161, dxf_162, dxf_163, dxf_164, dxf_165, dxf_166, dxf_167, dxf_168, dxf_169");
+	QsqlString.append(", dxf_170, dxf_171, dxf_172, dxf_173, dxf_174, dxf_175, dxf_176, dxf_177, dxf_178, dxf_179");
+
+	QsqlString.append(", dxf_210, dxf_211, dxf_212, dxf_213, dxf_214, dxf_215, dxf_216, dxf_217, dxf_218, dxf_219");
+	QsqlString.append(", dxf_220, dxf_221, dxf_222, dxf_223, dxf_224, dxf_225, dxf_226, dxf_227, dxf_228, dxf_229");
+	QsqlString.append(", dxf_230, dxf_231, dxf_232, dxf_233, dxf_234, dxf_235, dxf_236, dxf_237, dxf_238, dxf_239");
+
+	QsqlString.append(", dxf_270, dxf_271, dxf_272, dxf_273, dxf_274, dxf_275, dxf_276, dxf_277, dxf_278, dxf_279");
+	QsqlString.append(", dxf_280, dxf_281, dxf_282, dxf_283, dxf_284, dxf_285, dxf_286, dxf_287, dxf_288, dxf_289");
+	QsqlString.append(", dxf_290, dxf_291, dxf_292, dxf_293, dxf_294, dxf_295, dxf_296, dxf_297, dxf_298, dxf_299");
+	QsqlString.append(", dxf_300, dxf_301, dxf_302, dxf_303, dxf_304, dxf_305, dxf_306, dxf_307, dxf_308, dxf_309");
+	QsqlString.append(", dxf_310, dxf_311, dxf_312, dxf_313, dxf_314, dxf_315, dxf_316, dxf_317, dxf_318, dxf_319");
+	QsqlString.append(", dxf_320, dxf_321, dxf_322, dxf_323, dxf_324, dxf_325, dxf_326, dxf_327, dxf_328, dxf_329");
+	QsqlString.append(", dxf_330, dxf_331, dxf_332, dxf_333, dxf_334, dxf_335, dxf_336, dxf_337, dxf_338, dxf_339");
+	QsqlString.append(", dxf_340, dxf_341, dxf_342, dxf_343, dxf_344, dxf_345, dxf_346, dxf_347, dxf_348, dxf_349");
+	QsqlString.append(", dxf_350, dxf_351, dxf_352, dxf_353, dxf_354, dxf_355, dxf_356, dxf_357, dxf_358, dxf_359");
+	QsqlString.append(", dxf_360, dxf_361, dxf_362, dxf_363, dxf_364, dxf_365, dxf_366, dxf_367, dxf_368, dxf_369");
+	QsqlString.append(", dxf_370, dxf_371, dxf_372, dxf_373, dxf_374, dxf_375, dxf_376, dxf_377, dxf_378, dxf_379");
+	QsqlString.append(", dxf_380, dxf_381, dxf_382, dxf_383, dxf_384, dxf_385, dxf_386, dxf_387, dxf_388, dxf_389");
+	QsqlString.append(", dxf_390, dxf_391, dxf_392, dxf_393, dxf_394, dxf_395, dxf_396, dxf_397, dxf_398, dxf_399");
+	QsqlString.append(", dxf_400, dxf_401, dxf_402, dxf_403, dxf_404, dxf_405, dxf_406, dxf_407, dxf_408, dxf_409");
+	QsqlString.append(", dxf_410, dxf_411, dxf_412, dxf_413, dxf_414, dxf_415, dxf_416, dxf_417, dxf_418, dxf_419");
+	QsqlString.append(", dxf_420, dxf_421, dxf_422, dxf_423, dxf_424, dxf_425, dxf_426, dxf_427, dxf_428, dxf_429");
+	QsqlString.append(", dxf_430, dxf_431, dxf_432, dxf_433, dxf_434, dxf_435, dxf_436, dxf_437, dxf_438, dxf_439");
+	QsqlString.append(", dxf_440, dxf_441, dxf_442, dxf_443, dxf_444, dxf_445, dxf_446, dxf_447, dxf_448, dxf_449");
+	QsqlString.append(", dxf_450, dxf_451, dxf_452, dxf_453, dxf_454, dxf_455, dxf_456, dxf_457, dxf_458, dxf_459");
+	QsqlString.append(", dxf_460, dxf_461, dxf_462, dxf_463, dxf_464, dxf_465, dxf_466, dxf_467, dxf_468, dxf_469");
+	QsqlString.append(", dxf_470, dxf_471, dxf_472, dxf_473, dxf_474, dxf_475, dxf_476, dxf_477, dxf_478, dxf_479");
+	QsqlString.append(", dxf_480, dxf_481, dxf_482, dxf_483, dxf_484, dxf_485, dxf_486, dxf_487, dxf_488, dxf_489");
+	QsqlString.append(", dxf_999");
+	QsqlString.append(", dxf_1000, dxf_1001, dxf_1002, dxf_1003, dxf_1004, dxf_1005, dxf_1006, dxf_1007, dxf_1008, dxf_1009");
+	QsqlString.append(", dxf_1010, dxf_1011, dxf_1012, dxf_1013, dxf_1014, dxf_1015, dxf_1016, dxf_1017, dxf_1018, dxf_1019");
+	QsqlString.append(", dxf_1020, dxf_1021, dxf_1022, dxf_1023, dxf_1024, dxf_1025, dxf_1026, dxf_1027, dxf_1028, dxf_1029");
+	QsqlString.append(", dxf_1030, dxf_1031, dxf_1032, dxf_1033, dxf_1034, dxf_1035, dxf_1036, dxf_1037, dxf_1038, dxf_1039");
+	QsqlString.append(", dxf_1040, dxf_1041, dxf_1042, dxf_1043, dxf_1044, dxf_1045, dxf_1046, dxf_1047, dxf_1048, dxf_1049");
+	QsqlString.append(", dxf_1050, dxf_1051, dxf_1052, dxf_1053, dxf_1054, dxf_1055, dxf_1056, dxf_1057, dxf_1058, dxf_1059");
+	QsqlString.append(", dxf_1060, dxf_1061, dxf_1062, dxf_1063, dxf_1064, dxf_1065, dxf_1066, dxf_1067, dxf_1068, dxf_1069");
+	QsqlString.append(", dxf_1070, dxf_1071");
+
+
+	QsqlString.append(")");
+
+	m_db.exec(QsqlString);
+
+
+	QsqlString="create table dxf_classes (Index_count primary key,Section";
+	QsqlString.append(", Command, ID_instruction, Command_count");
+	QsqlString.append(", dxf_m1, dxf_m2, dxf_m3, dxf_m4, dxf_m5");
+	QsqlString.append(", dxf_0, dxf_1, dxf_2, dxf_3, dxf_4, dxf_5, dxf_6, dxf_7, dxf_8, dxf_9");
+	QsqlString.append(", dxf_10, dxf_11, dxf_12, dxf_13, dxf_14, dxf_15, dxf_16, dxf_17, dxf_18, dxf_19");
+	QsqlString.append(", dxf_20, dxf_21, dxf_22, dxf_23, dxf_24, dxf_25, dxf_26, dxf_27, dxf_28, dxf_29");
+	QsqlString.append(", dxf_30, dxf_31, dxf_32, dxf_33, dxf_34, dxf_35, dxf_36, dxf_37, dxf_38, dxf_39");
+	QsqlString.append(", dxf_40, dxf_41, dxf_42, dxf_43, dxf_44, dxf_45, dxf_46, dxf_47, dxf_48, dxf_49");
+	QsqlString.append(", dxf_50, dxf_51, dxf_52, dxf_53, dxf_54, dxf_55, dxf_56, dxf_57, dxf_58, dxf_59");
+	QsqlString.append(", dxf_60, dxf_61, dxf_62, dxf_63, dxf_64, dxf_65, dxf_66, dxf_67, dxf_68, dxf_69");
+	QsqlString.append(", dxf_70, dxf_71, dxf_72, dxf_73, dxf_74, dxf_75, dxf_76, dxf_77, dxf_78, dxf_79");
+	QsqlString.append(", dxf_90, dxf_91, dxf_92, dxf_93, dxf_94, dxf_95, dxf_96, dxf_97, dxf_98, dxf_99");
+	QsqlString.append(", dxf_100, dxf_102, dxf_105");
+	QsqlString.append(", dxf_110, dxf_111, dxf_112, dxf_113, dxf_114, dxf_115, dxf_116, dxf_117, dxf_118, dxf_119");
+	QsqlString.append(", dxf_120, dxf_121, dxf_122, dxf_123, dxf_124, dxf_125, dxf_126, dxf_127, dxf_128, dxf_129");
+	QsqlString.append(", dxf_130, dxf_131, dxf_132, dxf_133, dxf_134, dxf_135, dxf_136, dxf_137, dxf_138, dxf_139");
+	QsqlString.append(", dxf_140, dxf_141, dxf_142, dxf_143, dxf_144, dxf_145, dxf_146, dxf_147, dxf_148, dxf_149");
+
+	QsqlString.append(", dxf_160, dxf_161, dxf_162, dxf_163, dxf_164, dxf_165, dxf_166, dxf_167, dxf_168, dxf_169");
+	QsqlString.append(", dxf_170, dxf_171, dxf_172, dxf_173, dxf_174, dxf_175, dxf_176, dxf_177, dxf_178, dxf_179");
+
+	QsqlString.append(", dxf_210, dxf_211, dxf_212, dxf_213, dxf_214, dxf_215, dxf_216, dxf_217, dxf_218, dxf_219");
+	QsqlString.append(", dxf_220, dxf_221, dxf_222, dxf_223, dxf_224, dxf_225, dxf_226, dxf_227, dxf_228, dxf_229");
+	QsqlString.append(", dxf_230, dxf_231, dxf_232, dxf_233, dxf_234, dxf_235, dxf_236, dxf_237, dxf_238, dxf_239");
+
+	QsqlString.append(", dxf_270, dxf_271, dxf_272, dxf_273, dxf_274, dxf_275, dxf_276, dxf_277, dxf_278, dxf_279");
+	QsqlString.append(", dxf_280, dxf_281, dxf_282, dxf_283, dxf_284, dxf_285, dxf_286, dxf_287, dxf_288, dxf_289");
+	QsqlString.append(", dxf_290, dxf_291, dxf_292, dxf_293, dxf_294, dxf_295, dxf_296, dxf_297, dxf_298, dxf_299");
+	QsqlString.append(", dxf_300, dxf_301, dxf_302, dxf_303, dxf_304, dxf_305, dxf_306, dxf_307, dxf_308, dxf_309");
+	QsqlString.append(", dxf_310, dxf_311, dxf_312, dxf_313, dxf_314, dxf_315, dxf_316, dxf_317, dxf_318, dxf_319");
+	QsqlString.append(", dxf_320, dxf_321, dxf_322, dxf_323, dxf_324, dxf_325, dxf_326, dxf_327, dxf_328, dxf_329");
+	QsqlString.append(", dxf_330, dxf_331, dxf_332, dxf_333, dxf_334, dxf_335, dxf_336, dxf_337, dxf_338, dxf_339");
+	QsqlString.append(", dxf_340, dxf_341, dxf_342, dxf_343, dxf_344, dxf_345, dxf_346, dxf_347, dxf_348, dxf_349");
+	QsqlString.append(", dxf_350, dxf_351, dxf_352, dxf_353, dxf_354, dxf_355, dxf_356, dxf_357, dxf_358, dxf_359");
+	QsqlString.append(", dxf_360, dxf_361, dxf_362, dxf_363, dxf_364, dxf_365, dxf_366, dxf_367, dxf_368, dxf_369");
+	QsqlString.append(", dxf_370, dxf_371, dxf_372, dxf_373, dxf_374, dxf_375, dxf_376, dxf_377, dxf_378, dxf_379");
+	QsqlString.append(", dxf_380, dxf_381, dxf_382, dxf_383, dxf_384, dxf_385, dxf_386, dxf_387, dxf_388, dxf_389");
+	QsqlString.append(", dxf_390, dxf_391, dxf_392, dxf_393, dxf_394, dxf_395, dxf_396, dxf_397, dxf_398, dxf_399");
+	QsqlString.append(", dxf_400, dxf_401, dxf_402, dxf_403, dxf_404, dxf_405, dxf_406, dxf_407, dxf_408, dxf_409");
+	QsqlString.append(", dxf_410, dxf_411, dxf_412, dxf_413, dxf_414, dxf_415, dxf_416, dxf_417, dxf_418, dxf_419");
+	QsqlString.append(", dxf_420, dxf_421, dxf_422, dxf_423, dxf_424, dxf_425, dxf_426, dxf_427, dxf_428, dxf_429");
+	QsqlString.append(", dxf_430, dxf_431, dxf_432, dxf_433, dxf_434, dxf_435, dxf_436, dxf_437, dxf_438, dxf_439");
+	QsqlString.append(", dxf_440, dxf_441, dxf_442, dxf_443, dxf_444, dxf_445, dxf_446, dxf_447, dxf_448, dxf_449");
+	QsqlString.append(", dxf_450, dxf_451, dxf_452, dxf_453, dxf_454, dxf_455, dxf_456, dxf_457, dxf_458, dxf_459");
+	QsqlString.append(", dxf_460, dxf_461, dxf_462, dxf_463, dxf_464, dxf_465, dxf_466, dxf_467, dxf_468, dxf_469");
+	QsqlString.append(", dxf_470, dxf_471, dxf_472, dxf_473, dxf_474, dxf_475, dxf_476, dxf_477, dxf_478, dxf_479");
+	QsqlString.append(", dxf_480, dxf_481, dxf_482, dxf_483, dxf_484, dxf_485, dxf_486, dxf_487, dxf_488, dxf_489");
+	QsqlString.append(", dxf_999");
+	QsqlString.append(", dxf_1000, dxf_1001, dxf_1002, dxf_1003, dxf_1004, dxf_1005, dxf_1006, dxf_1007, dxf_1008, dxf_1009");
+	QsqlString.append(", dxf_1010, dxf_1011, dxf_1012, dxf_1013, dxf_1014, dxf_1015, dxf_1016, dxf_1017, dxf_1018, dxf_1019");
+	QsqlString.append(", dxf_1020, dxf_1021, dxf_1022, dxf_1023, dxf_1024, dxf_1025, dxf_1026, dxf_1027, dxf_1028, dxf_1029");
+	QsqlString.append(", dxf_1030, dxf_1031, dxf_1032, dxf_1033, dxf_1034, dxf_1035, dxf_1036, dxf_1037, dxf_1038, dxf_1039");
+	QsqlString.append(", dxf_1040, dxf_1041, dxf_1042, dxf_1043, dxf_1044, dxf_1045, dxf_1046, dxf_1047, dxf_1048, dxf_1049");
+	QsqlString.append(", dxf_1050, dxf_1051, dxf_1052, dxf_1053, dxf_1054, dxf_1055, dxf_1056, dxf_1057, dxf_1058, dxf_1059");
+	QsqlString.append(", dxf_1060, dxf_1061, dxf_1062, dxf_1063, dxf_1064, dxf_1065, dxf_1066, dxf_1067, dxf_1068, dxf_1069");
+	QsqlString.append(", dxf_1070, dxf_1071");
+
+
+	QsqlString.append(")");
+
+	m_db.exec(QsqlString);
+
+	QsqlString="create table dxf_tables (Index_count primary key,Section";
+	QsqlString.append(", Command, ID_instruction, Command_count");
+	QsqlString.append(", dxf_m1, dxf_m2, dxf_m3, dxf_m4, dxf_m5");
+	QsqlString.append(", dxf_0, dxf_1, dxf_2, dxf_3, dxf_4, dxf_5, dxf_6, dxf_7, dxf_8, dxf_9");
+	QsqlString.append(", dxf_10, dxf_11, dxf_12, dxf_13, dxf_14, dxf_15, dxf_16, dxf_17, dxf_18, dxf_19");
+	QsqlString.append(", dxf_20, dxf_21, dxf_22, dxf_23, dxf_24, dxf_25, dxf_26, dxf_27, dxf_28, dxf_29");
+	QsqlString.append(", dxf_30, dxf_31, dxf_32, dxf_33, dxf_34, dxf_35, dxf_36, dxf_37, dxf_38, dxf_39");
+	QsqlString.append(", dxf_40, dxf_41, dxf_42, dxf_43, dxf_44, dxf_45, dxf_46, dxf_47, dxf_48, dxf_49");
+	QsqlString.append(", dxf_50, dxf_51, dxf_52, dxf_53, dxf_54, dxf_55, dxf_56, dxf_57, dxf_58, dxf_59");
+	QsqlString.append(", dxf_60, dxf_61, dxf_62, dxf_63, dxf_64, dxf_65, dxf_66, dxf_67, dxf_68, dxf_69");
+	QsqlString.append(", dxf_70, dxf_71, dxf_72, dxf_73, dxf_74, dxf_75, dxf_76, dxf_77, dxf_78, dxf_79");
+	QsqlString.append(", dxf_90, dxf_91, dxf_92, dxf_93, dxf_94, dxf_95, dxf_96, dxf_97, dxf_98, dxf_99");
+	QsqlString.append(", dxf_100, dxf_102, dxf_105");
+	QsqlString.append(", dxf_110, dxf_111, dxf_112, dxf_113, dxf_114, dxf_115, dxf_116, dxf_117, dxf_118, dxf_119");
+	QsqlString.append(", dxf_120, dxf_121, dxf_122, dxf_123, dxf_124, dxf_125, dxf_126, dxf_127, dxf_128, dxf_129");
+	QsqlString.append(", dxf_130, dxf_131, dxf_132, dxf_133, dxf_134, dxf_135, dxf_136, dxf_137, dxf_138, dxf_139");
+	QsqlString.append(", dxf_140, dxf_141, dxf_142, dxf_143, dxf_144, dxf_145, dxf_146, dxf_147, dxf_148, dxf_149");
+
+	QsqlString.append(", dxf_160, dxf_161, dxf_162, dxf_163, dxf_164, dxf_165, dxf_166, dxf_167, dxf_168, dxf_169");
+	QsqlString.append(", dxf_170, dxf_171, dxf_172, dxf_173, dxf_174, dxf_175, dxf_176, dxf_177, dxf_178, dxf_179");
+
+	QsqlString.append(", dxf_210, dxf_211, dxf_212, dxf_213, dxf_214, dxf_215, dxf_216, dxf_217, dxf_218, dxf_219");
+	QsqlString.append(", dxf_220, dxf_221, dxf_222, dxf_223, dxf_224, dxf_225, dxf_226, dxf_227, dxf_228, dxf_229");
+	QsqlString.append(", dxf_230, dxf_231, dxf_232, dxf_233, dxf_234, dxf_235, dxf_236, dxf_237, dxf_238, dxf_239");
+
+	QsqlString.append(", dxf_270, dxf_271, dxf_272, dxf_273, dxf_274, dxf_275, dxf_276, dxf_277, dxf_278, dxf_279");
+	QsqlString.append(", dxf_280, dxf_281, dxf_282, dxf_283, dxf_284, dxf_285, dxf_286, dxf_287, dxf_288, dxf_289");
+	QsqlString.append(", dxf_290, dxf_291, dxf_292, dxf_293, dxf_294, dxf_295, dxf_296, dxf_297, dxf_298, dxf_299");
+	QsqlString.append(", dxf_300, dxf_301, dxf_302, dxf_303, dxf_304, dxf_305, dxf_306, dxf_307, dxf_308, dxf_309");
+	QsqlString.append(", dxf_310, dxf_311, dxf_312, dxf_313, dxf_314, dxf_315, dxf_316, dxf_317, dxf_318, dxf_319");
+	QsqlString.append(", dxf_320, dxf_321, dxf_322, dxf_323, dxf_324, dxf_325, dxf_326, dxf_327, dxf_328, dxf_329");
+	QsqlString.append(", dxf_330, dxf_331, dxf_332, dxf_333, dxf_334, dxf_335, dxf_336, dxf_337, dxf_338, dxf_339");
+	QsqlString.append(", dxf_340, dxf_341, dxf_342, dxf_343, dxf_344, dxf_345, dxf_346, dxf_347, dxf_348, dxf_349");
+	QsqlString.append(", dxf_350, dxf_351, dxf_352, dxf_353, dxf_354, dxf_355, dxf_356, dxf_357, dxf_358, dxf_359");
+	QsqlString.append(", dxf_360, dxf_361, dxf_362, dxf_363, dxf_364, dxf_365, dxf_366, dxf_367, dxf_368, dxf_369");
+	QsqlString.append(", dxf_370, dxf_371, dxf_372, dxf_373, dxf_374, dxf_375, dxf_376, dxf_377, dxf_378, dxf_379");
+	QsqlString.append(", dxf_380, dxf_381, dxf_382, dxf_383, dxf_384, dxf_385, dxf_386, dxf_387, dxf_388, dxf_389");
+	QsqlString.append(", dxf_390, dxf_391, dxf_392, dxf_393, dxf_394, dxf_395, dxf_396, dxf_397, dxf_398, dxf_399");
+	QsqlString.append(", dxf_400, dxf_401, dxf_402, dxf_403, dxf_404, dxf_405, dxf_406, dxf_407, dxf_408, dxf_409");
+	QsqlString.append(", dxf_410, dxf_411, dxf_412, dxf_413, dxf_414, dxf_415, dxf_416, dxf_417, dxf_418, dxf_419");
+	QsqlString.append(", dxf_420, dxf_421, dxf_422, dxf_423, dxf_424, dxf_425, dxf_426, dxf_427, dxf_428, dxf_429");
+	QsqlString.append(", dxf_430, dxf_431, dxf_432, dxf_433, dxf_434, dxf_435, dxf_436, dxf_437, dxf_438, dxf_439");
+	QsqlString.append(", dxf_440, dxf_441, dxf_442, dxf_443, dxf_444, dxf_445, dxf_446, dxf_447, dxf_448, dxf_449");
+	QsqlString.append(", dxf_450, dxf_451, dxf_452, dxf_453, dxf_454, dxf_455, dxf_456, dxf_457, dxf_458, dxf_459");
+	QsqlString.append(", dxf_460, dxf_461, dxf_462, dxf_463, dxf_464, dxf_465, dxf_466, dxf_467, dxf_468, dxf_469");
+	QsqlString.append(", dxf_470, dxf_471, dxf_472, dxf_473, dxf_474, dxf_475, dxf_476, dxf_477, dxf_478, dxf_479");
+	QsqlString.append(", dxf_480, dxf_481, dxf_482, dxf_483, dxf_484, dxf_485, dxf_486, dxf_487, dxf_488, dxf_489");
+	QsqlString.append(", dxf_999");
+	QsqlString.append(", dxf_1000, dxf_1001, dxf_1002, dxf_1003, dxf_1004, dxf_1005, dxf_1006, dxf_1007, dxf_1008, dxf_1009");
+	QsqlString.append(", dxf_1010, dxf_1011, dxf_1012, dxf_1013, dxf_1014, dxf_1015, dxf_1016, dxf_1017, dxf_1018, dxf_1019");
+	QsqlString.append(", dxf_1020, dxf_1021, dxf_1022, dxf_1023, dxf_1024, dxf_1025, dxf_1026, dxf_1027, dxf_1028, dxf_1029");
+	QsqlString.append(", dxf_1030, dxf_1031, dxf_1032, dxf_1033, dxf_1034, dxf_1035, dxf_1036, dxf_1037, dxf_1038, dxf_1039");
+	QsqlString.append(", dxf_1040, dxf_1041, dxf_1042, dxf_1043, dxf_1044, dxf_1045, dxf_1046, dxf_1047, dxf_1048, dxf_1049");
+	QsqlString.append(", dxf_1050, dxf_1051, dxf_1052, dxf_1053, dxf_1054, dxf_1055, dxf_1056, dxf_1057, dxf_1058, dxf_1059");
+	QsqlString.append(", dxf_1060, dxf_1061, dxf_1062, dxf_1063, dxf_1064, dxf_1065, dxf_1066, dxf_1067, dxf_1068, dxf_1069");
+	QsqlString.append(", dxf_1070, dxf_1071");
+
+
+	QsqlString.append(")");
+
+	m_db.exec(QsqlString);
+
+	QsqlString="create table dxf_blocks (Index_count primary key,Section";
+	QsqlString.append(", Command, ID_instruction, Command_count");
+	QsqlString.append(", dxf_m1, dxf_m2, dxf_m3, dxf_m4, dxf_m5");
+	QsqlString.append(", dxf_0, dxf_1, dxf_2, dxf_3, dxf_4, dxf_5, dxf_6, dxf_7, dxf_8, dxf_9");
+	QsqlString.append(", dxf_10, dxf_11, dxf_12, dxf_13, dxf_14, dxf_15, dxf_16, dxf_17, dxf_18, dxf_19");
+	QsqlString.append(", dxf_20, dxf_21, dxf_22, dxf_23, dxf_24, dxf_25, dxf_26, dxf_27, dxf_28, dxf_29");
+	QsqlString.append(", dxf_30, dxf_31, dxf_32, dxf_33, dxf_34, dxf_35, dxf_36, dxf_37, dxf_38, dxf_39");
+	QsqlString.append(", dxf_40, dxf_41, dxf_42, dxf_43, dxf_44, dxf_45, dxf_46, dxf_47, dxf_48, dxf_49");
+	QsqlString.append(", dxf_50, dxf_51, dxf_52, dxf_53, dxf_54, dxf_55, dxf_56, dxf_57, dxf_58, dxf_59");
+	QsqlString.append(", dxf_60, dxf_61, dxf_62, dxf_63, dxf_64, dxf_65, dxf_66, dxf_67, dxf_68, dxf_69");
+	QsqlString.append(", dxf_70, dxf_71, dxf_72, dxf_73, dxf_74, dxf_75, dxf_76, dxf_77, dxf_78, dxf_79");
+	QsqlString.append(", dxf_90, dxf_91, dxf_92, dxf_93, dxf_94, dxf_95, dxf_96, dxf_97, dxf_98, dxf_99");
+	QsqlString.append(", dxf_100, dxf_102, dxf_105");
+	QsqlString.append(", dxf_110, dxf_111, dxf_112, dxf_113, dxf_114, dxf_115, dxf_116, dxf_117, dxf_118, dxf_119");
+	QsqlString.append(", dxf_120, dxf_121, dxf_122, dxf_123, dxf_124, dxf_125, dxf_126, dxf_127, dxf_128, dxf_129");
+	QsqlString.append(", dxf_130, dxf_131, dxf_132, dxf_133, dxf_134, dxf_135, dxf_136, dxf_137, dxf_138, dxf_139");
+	QsqlString.append(", dxf_140, dxf_141, dxf_142, dxf_143, dxf_144, dxf_145, dxf_146, dxf_147, dxf_148, dxf_149");
+
+	QsqlString.append(", dxf_160, dxf_161, dxf_162, dxf_163, dxf_164, dxf_165, dxf_166, dxf_167, dxf_168, dxf_169");
+	QsqlString.append(", dxf_170, dxf_171, dxf_172, dxf_173, dxf_174, dxf_175, dxf_176, dxf_177, dxf_178, dxf_179");
+
+	QsqlString.append(", dxf_210, dxf_211, dxf_212, dxf_213, dxf_214, dxf_215, dxf_216, dxf_217, dxf_218, dxf_219");
+	QsqlString.append(", dxf_220, dxf_221, dxf_222, dxf_223, dxf_224, dxf_225, dxf_226, dxf_227, dxf_228, dxf_229");
+	QsqlString.append(", dxf_230, dxf_231, dxf_232, dxf_233, dxf_234, dxf_235, dxf_236, dxf_237, dxf_238, dxf_239");
+
+	QsqlString.append(", dxf_270, dxf_271, dxf_272, dxf_273, dxf_274, dxf_275, dxf_276, dxf_277, dxf_278, dxf_279");
+	QsqlString.append(", dxf_280, dxf_281, dxf_282, dxf_283, dxf_284, dxf_285, dxf_286, dxf_287, dxf_288, dxf_289");
+	QsqlString.append(", dxf_290, dxf_291, dxf_292, dxf_293, dxf_294, dxf_295, dxf_296, dxf_297, dxf_298, dxf_299");
+	QsqlString.append(", dxf_300, dxf_301, dxf_302, dxf_303, dxf_304, dxf_305, dxf_306, dxf_307, dxf_308, dxf_309");
+	QsqlString.append(", dxf_310, dxf_311, dxf_312, dxf_313, dxf_314, dxf_315, dxf_316, dxf_317, dxf_318, dxf_319");
+	QsqlString.append(", dxf_320, dxf_321, dxf_322, dxf_323, dxf_324, dxf_325, dxf_326, dxf_327, dxf_328, dxf_329");
+	QsqlString.append(", dxf_330, dxf_331, dxf_332, dxf_333, dxf_334, dxf_335, dxf_336, dxf_337, dxf_338, dxf_339");
+	QsqlString.append(", dxf_340, dxf_341, dxf_342, dxf_343, dxf_344, dxf_345, dxf_346, dxf_347, dxf_348, dxf_349");
+	QsqlString.append(", dxf_350, dxf_351, dxf_352, dxf_353, dxf_354, dxf_355, dxf_356, dxf_357, dxf_358, dxf_359");
+	QsqlString.append(", dxf_360, dxf_361, dxf_362, dxf_363, dxf_364, dxf_365, dxf_366, dxf_367, dxf_368, dxf_369");
+	QsqlString.append(", dxf_370, dxf_371, dxf_372, dxf_373, dxf_374, dxf_375, dxf_376, dxf_377, dxf_378, dxf_379");
+	QsqlString.append(", dxf_380, dxf_381, dxf_382, dxf_383, dxf_384, dxf_385, dxf_386, dxf_387, dxf_388, dxf_389");
+	QsqlString.append(", dxf_390, dxf_391, dxf_392, dxf_393, dxf_394, dxf_395, dxf_396, dxf_397, dxf_398, dxf_399");
+	QsqlString.append(", dxf_400, dxf_401, dxf_402, dxf_403, dxf_404, dxf_405, dxf_406, dxf_407, dxf_408, dxf_409");
+	QsqlString.append(", dxf_410, dxf_411, dxf_412, dxf_413, dxf_414, dxf_415, dxf_416, dxf_417, dxf_418, dxf_419");
+	QsqlString.append(", dxf_420, dxf_421, dxf_422, dxf_423, dxf_424, dxf_425, dxf_426, dxf_427, dxf_428, dxf_429");
+	QsqlString.append(", dxf_430, dxf_431, dxf_432, dxf_433, dxf_434, dxf_435, dxf_436, dxf_437, dxf_438, dxf_439");
+	QsqlString.append(", dxf_440, dxf_441, dxf_442, dxf_443, dxf_444, dxf_445, dxf_446, dxf_447, dxf_448, dxf_449");
+	QsqlString.append(", dxf_450, dxf_451, dxf_452, dxf_453, dxf_454, dxf_455, dxf_456, dxf_457, dxf_458, dxf_459");
+	QsqlString.append(", dxf_460, dxf_461, dxf_462, dxf_463, dxf_464, dxf_465, dxf_466, dxf_467, dxf_468, dxf_469");
+	QsqlString.append(", dxf_470, dxf_471, dxf_472, dxf_473, dxf_474, dxf_475, dxf_476, dxf_477, dxf_478, dxf_479");
+	QsqlString.append(", dxf_480, dxf_481, dxf_482, dxf_483, dxf_484, dxf_485, dxf_486, dxf_487, dxf_488, dxf_489");
+	QsqlString.append(", dxf_999");
+	QsqlString.append(", dxf_1000, dxf_1001, dxf_1002, dxf_1003, dxf_1004, dxf_1005, dxf_1006, dxf_1007, dxf_1008, dxf_1009");
+	QsqlString.append(", dxf_1010, dxf_1011, dxf_1012, dxf_1013, dxf_1014, dxf_1015, dxf_1016, dxf_1017, dxf_1018, dxf_1019");
+	QsqlString.append(", dxf_1020, dxf_1021, dxf_1022, dxf_1023, dxf_1024, dxf_1025, dxf_1026, dxf_1027, dxf_1028, dxf_1029");
+	QsqlString.append(", dxf_1030, dxf_1031, dxf_1032, dxf_1033, dxf_1034, dxf_1035, dxf_1036, dxf_1037, dxf_1038, dxf_1039");
+	QsqlString.append(", dxf_1040, dxf_1041, dxf_1042, dxf_1043, dxf_1044, dxf_1045, dxf_1046, dxf_1047, dxf_1048, dxf_1049");
+	QsqlString.append(", dxf_1050, dxf_1051, dxf_1052, dxf_1053, dxf_1054, dxf_1055, dxf_1056, dxf_1057, dxf_1058, dxf_1059");
+	QsqlString.append(", dxf_1060, dxf_1061, dxf_1062, dxf_1063, dxf_1064, dxf_1065, dxf_1066, dxf_1067, dxf_1068, dxf_1069");
+	QsqlString.append(", dxf_1070, dxf_1071");
+
+
+	QsqlString.append(")");
+
+	m_db.exec(QsqlString);
+
+	QsqlString="create table dxf_entities (Index_count primary key,Section";
+	QsqlString.append(", Command, ID_instruction, Command_count");
+	QsqlString.append(", dxf_m1, dxf_m2, dxf_m3, dxf_m4, dxf_m5");
+	QsqlString.append(", dxf_0, dxf_1, dxf_2, dxf_3, dxf_4, dxf_5, dxf_6, dxf_7, dxf_8, dxf_9");
+	QsqlString.append(", dxf_10, dxf_11, dxf_12, dxf_13, dxf_14, dxf_15, dxf_16, dxf_17, dxf_18, dxf_19");
+	QsqlString.append(", dxf_20, dxf_21, dxf_22, dxf_23, dxf_24, dxf_25, dxf_26, dxf_27, dxf_28, dxf_29");
+	QsqlString.append(", dxf_30, dxf_31, dxf_32, dxf_33, dxf_34, dxf_35, dxf_36, dxf_37, dxf_38, dxf_39");
+	QsqlString.append(", dxf_40, dxf_41, dxf_42, dxf_43, dxf_44, dxf_45, dxf_46, dxf_47, dxf_48, dxf_49");
+	QsqlString.append(", dxf_50, dxf_51, dxf_52, dxf_53, dxf_54, dxf_55, dxf_56, dxf_57, dxf_58, dxf_59");
+	QsqlString.append(", dxf_60, dxf_61, dxf_62, dxf_63, dxf_64, dxf_65, dxf_66, dxf_67, dxf_68, dxf_69");
+	QsqlString.append(", dxf_70, dxf_71, dxf_72, dxf_73, dxf_74, dxf_75, dxf_76, dxf_77, dxf_78, dxf_79");
+	QsqlString.append(", dxf_90, dxf_91, dxf_92, dxf_93, dxf_94, dxf_95, dxf_96, dxf_97, dxf_98, dxf_99");
+	QsqlString.append(", dxf_100, dxf_102, dxf_105");
+	QsqlString.append(", dxf_110, dxf_111, dxf_112, dxf_113, dxf_114, dxf_115, dxf_116, dxf_117, dxf_118, dxf_119");
+	QsqlString.append(", dxf_120, dxf_121, dxf_122, dxf_123, dxf_124, dxf_125, dxf_126, dxf_127, dxf_128, dxf_129");
+	QsqlString.append(", dxf_130, dxf_131, dxf_132, dxf_133, dxf_134, dxf_135, dxf_136, dxf_137, dxf_138, dxf_139");
+	QsqlString.append(", dxf_140, dxf_141, dxf_142, dxf_143, dxf_144, dxf_145, dxf_146, dxf_147, dxf_148, dxf_149");
+
+	QsqlString.append(", dxf_160, dxf_161, dxf_162, dxf_163, dxf_164, dxf_165, dxf_166, dxf_167, dxf_168, dxf_169");
+	QsqlString.append(", dxf_170, dxf_171, dxf_172, dxf_173, dxf_174, dxf_175, dxf_176, dxf_177, dxf_178, dxf_179");
+
+	QsqlString.append(", dxf_210, dxf_211, dxf_212, dxf_213, dxf_214, dxf_215, dxf_216, dxf_217, dxf_218, dxf_219");
+	QsqlString.append(", dxf_220, dxf_221, dxf_222, dxf_223, dxf_224, dxf_225, dxf_226, dxf_227, dxf_228, dxf_229");
+	QsqlString.append(", dxf_230, dxf_231, dxf_232, dxf_233, dxf_234, dxf_235, dxf_236, dxf_237, dxf_238, dxf_239");
+
+	QsqlString.append(", dxf_270, dxf_271, dxf_272, dxf_273, dxf_274, dxf_275, dxf_276, dxf_277, dxf_278, dxf_279");
+	QsqlString.append(", dxf_280, dxf_281, dxf_282, dxf_283, dxf_284, dxf_285, dxf_286, dxf_287, dxf_288, dxf_289");
+	QsqlString.append(", dxf_290, dxf_291, dxf_292, dxf_293, dxf_294, dxf_295, dxf_296, dxf_297, dxf_298, dxf_299");
+	QsqlString.append(", dxf_300, dxf_301, dxf_302, dxf_303, dxf_304, dxf_305, dxf_306, dxf_307, dxf_308, dxf_309");
+	QsqlString.append(", dxf_310, dxf_311, dxf_312, dxf_313, dxf_314, dxf_315, dxf_316, dxf_317, dxf_318, dxf_319");
+	QsqlString.append(", dxf_320, dxf_321, dxf_322, dxf_323, dxf_324, dxf_325, dxf_326, dxf_327, dxf_328, dxf_329");
+	QsqlString.append(", dxf_330, dxf_331, dxf_332, dxf_333, dxf_334, dxf_335, dxf_336, dxf_337, dxf_338, dxf_339");
+	QsqlString.append(", dxf_340, dxf_341, dxf_342, dxf_343, dxf_344, dxf_345, dxf_346, dxf_347, dxf_348, dxf_349");
+	QsqlString.append(", dxf_350, dxf_351, dxf_352, dxf_353, dxf_354, dxf_355, dxf_356, dxf_357, dxf_358, dxf_359");
+	QsqlString.append(", dxf_360, dxf_361, dxf_362, dxf_363, dxf_364, dxf_365, dxf_366, dxf_367, dxf_368, dxf_369");
+	QsqlString.append(", dxf_370, dxf_371, dxf_372, dxf_373, dxf_374, dxf_375, dxf_376, dxf_377, dxf_378, dxf_379");
+	QsqlString.append(", dxf_380, dxf_381, dxf_382, dxf_383, dxf_384, dxf_385, dxf_386, dxf_387, dxf_388, dxf_389");
+	QsqlString.append(", dxf_390, dxf_391, dxf_392, dxf_393, dxf_394, dxf_395, dxf_396, dxf_397, dxf_398, dxf_399");
+	QsqlString.append(", dxf_400, dxf_401, dxf_402, dxf_403, dxf_404, dxf_405, dxf_406, dxf_407, dxf_408, dxf_409");
+	QsqlString.append(", dxf_410, dxf_411, dxf_412, dxf_413, dxf_414, dxf_415, dxf_416, dxf_417, dxf_418, dxf_419");
+	QsqlString.append(", dxf_420, dxf_421, dxf_422, dxf_423, dxf_424, dxf_425, dxf_426, dxf_427, dxf_428, dxf_429");
+	QsqlString.append(", dxf_430, dxf_431, dxf_432, dxf_433, dxf_434, dxf_435, dxf_436, dxf_437, dxf_438, dxf_439");
+	QsqlString.append(", dxf_440, dxf_441, dxf_442, dxf_443, dxf_444, dxf_445, dxf_446, dxf_447, dxf_448, dxf_449");
+	QsqlString.append(", dxf_450, dxf_451, dxf_452, dxf_453, dxf_454, dxf_455, dxf_456, dxf_457, dxf_458, dxf_459");
+	QsqlString.append(", dxf_460, dxf_461, dxf_462, dxf_463, dxf_464, dxf_465, dxf_466, dxf_467, dxf_468, dxf_469");
+	QsqlString.append(", dxf_470, dxf_471, dxf_472, dxf_473, dxf_474, dxf_475, dxf_476, dxf_477, dxf_478, dxf_479");
+	QsqlString.append(", dxf_480, dxf_481, dxf_482, dxf_483, dxf_484, dxf_485, dxf_486, dxf_487, dxf_488, dxf_489");
+	QsqlString.append(", dxf_999");
+	QsqlString.append(", dxf_1000, dxf_1001, dxf_1002, dxf_1003, dxf_1004, dxf_1005, dxf_1006, dxf_1007, dxf_1008, dxf_1009");
+	QsqlString.append(", dxf_1010, dxf_1011, dxf_1012, dxf_1013, dxf_1014, dxf_1015, dxf_1016, dxf_1017, dxf_1018, dxf_1019");
+	QsqlString.append(", dxf_1020, dxf_1021, dxf_1022, dxf_1023, dxf_1024, dxf_1025, dxf_1026, dxf_1027, dxf_1028, dxf_1029");
+	QsqlString.append(", dxf_1030, dxf_1031, dxf_1032, dxf_1033, dxf_1034, dxf_1035, dxf_1036, dxf_1037, dxf_1038, dxf_1039");
+	QsqlString.append(", dxf_1040, dxf_1041, dxf_1042, dxf_1043, dxf_1044, dxf_1045, dxf_1046, dxf_1047, dxf_1048, dxf_1049");
+	QsqlString.append(", dxf_1050, dxf_1051, dxf_1052, dxf_1053, dxf_1054, dxf_1055, dxf_1056, dxf_1057, dxf_1058, dxf_1059");
+	QsqlString.append(", dxf_1060, dxf_1061, dxf_1062, dxf_1063, dxf_1064, dxf_1065, dxf_1066, dxf_1067, dxf_1068, dxf_1069");
+	QsqlString.append(", dxf_1070, dxf_1071");
+
+
+	QsqlString.append(")");
+
+	m_db.exec(QsqlString);
+
+
+	QsqlString="create table dxf_objects (Index_count primary key,Section";
+	QsqlString.append(", Command, ID_instruction, Command_count");
+	QsqlString.append(", dxf_m1, dxf_m2, dxf_m3, dxf_m4, dxf_m5");
+	QsqlString.append(", dxf_0, dxf_1, dxf_2, dxf_3, dxf_4, dxf_5, dxf_6, dxf_7, dxf_8, dxf_9");
+	QsqlString.append(", dxf_10, dxf_11, dxf_12, dxf_13, dxf_14, dxf_15, dxf_16, dxf_17, dxf_18, dxf_19");
+	QsqlString.append(", dxf_20, dxf_21, dxf_22, dxf_23, dxf_24, dxf_25, dxf_26, dxf_27, dxf_28, dxf_29");
+	QsqlString.append(", dxf_30, dxf_31, dxf_32, dxf_33, dxf_34, dxf_35, dxf_36, dxf_37, dxf_38, dxf_39");
+	QsqlString.append(", dxf_40, dxf_41, dxf_42, dxf_43, dxf_44, dxf_45, dxf_46, dxf_47, dxf_48, dxf_49");
+	QsqlString.append(", dxf_50, dxf_51, dxf_52, dxf_53, dxf_54, dxf_55, dxf_56, dxf_57, dxf_58, dxf_59");
+	QsqlString.append(", dxf_60, dxf_61, dxf_62, dxf_63, dxf_64, dxf_65, dxf_66, dxf_67, dxf_68, dxf_69");
+	QsqlString.append(", dxf_70, dxf_71, dxf_72, dxf_73, dxf_74, dxf_75, dxf_76, dxf_77, dxf_78, dxf_79");
+	QsqlString.append(", dxf_90, dxf_91, dxf_92, dxf_93, dxf_94, dxf_95, dxf_96, dxf_97, dxf_98, dxf_99");
+	QsqlString.append(", dxf_100, dxf_102, dxf_105");
+	QsqlString.append(", dxf_110, dxf_111, dxf_112, dxf_113, dxf_114, dxf_115, dxf_116, dxf_117, dxf_118, dxf_119");
+	QsqlString.append(", dxf_120, dxf_121, dxf_122, dxf_123, dxf_124, dxf_125, dxf_126, dxf_127, dxf_128, dxf_129");
+	QsqlString.append(", dxf_130, dxf_131, dxf_132, dxf_133, dxf_134, dxf_135, dxf_136, dxf_137, dxf_138, dxf_139");
+	QsqlString.append(", dxf_140, dxf_141, dxf_142, dxf_143, dxf_144, dxf_145, dxf_146, dxf_147, dxf_148, dxf_149");
+
+	QsqlString.append(", dxf_160, dxf_161, dxf_162, dxf_163, dxf_164, dxf_165, dxf_166, dxf_167, dxf_168, dxf_169");
+	QsqlString.append(", dxf_170, dxf_171, dxf_172, dxf_173, dxf_174, dxf_175, dxf_176, dxf_177, dxf_178, dxf_179");
+
+	QsqlString.append(", dxf_210, dxf_211, dxf_212, dxf_213, dxf_214, dxf_215, dxf_216, dxf_217, dxf_218, dxf_219");
+	QsqlString.append(", dxf_220, dxf_221, dxf_222, dxf_223, dxf_224, dxf_225, dxf_226, dxf_227, dxf_228, dxf_229");
+	QsqlString.append(", dxf_230, dxf_231, dxf_232, dxf_233, dxf_234, dxf_235, dxf_236, dxf_237, dxf_238, dxf_239");
+
+	QsqlString.append(", dxf_270, dxf_271, dxf_272, dxf_273, dxf_274, dxf_275, dxf_276, dxf_277, dxf_278, dxf_279");
+	QsqlString.append(", dxf_280, dxf_281, dxf_282, dxf_283, dxf_284, dxf_285, dxf_286, dxf_287, dxf_288, dxf_289");
+	QsqlString.append(", dxf_290, dxf_291, dxf_292, dxf_293, dxf_294, dxf_295, dxf_296, dxf_297, dxf_298, dxf_299");
+	QsqlString.append(", dxf_300, dxf_301, dxf_302, dxf_303, dxf_304, dxf_305, dxf_306, dxf_307, dxf_308, dxf_309");
+	QsqlString.append(", dxf_310, dxf_311, dxf_312, dxf_313, dxf_314, dxf_315, dxf_316, dxf_317, dxf_318, dxf_319");
+	QsqlString.append(", dxf_320, dxf_321, dxf_322, dxf_323, dxf_324, dxf_325, dxf_326, dxf_327, dxf_328, dxf_329");
+	QsqlString.append(", dxf_330, dxf_331, dxf_332, dxf_333, dxf_334, dxf_335, dxf_336, dxf_337, dxf_338, dxf_339");
+	QsqlString.append(", dxf_340, dxf_341, dxf_342, dxf_343, dxf_344, dxf_345, dxf_346, dxf_347, dxf_348, dxf_349");
+	QsqlString.append(", dxf_350, dxf_351, dxf_352, dxf_353, dxf_354, dxf_355, dxf_356, dxf_357, dxf_358, dxf_359");
+	QsqlString.append(", dxf_360, dxf_361, dxf_362, dxf_363, dxf_364, dxf_365, dxf_366, dxf_367, dxf_368, dxf_369");
+	QsqlString.append(", dxf_370, dxf_371, dxf_372, dxf_373, dxf_374, dxf_375, dxf_376, dxf_377, dxf_378, dxf_379");
+	QsqlString.append(", dxf_380, dxf_381, dxf_382, dxf_383, dxf_384, dxf_385, dxf_386, dxf_387, dxf_388, dxf_389");
+	QsqlString.append(", dxf_390, dxf_391, dxf_392, dxf_393, dxf_394, dxf_395, dxf_396, dxf_397, dxf_398, dxf_399");
+	QsqlString.append(", dxf_400, dxf_401, dxf_402, dxf_403, dxf_404, dxf_405, dxf_406, dxf_407, dxf_408, dxf_409");
+	QsqlString.append(", dxf_410, dxf_411, dxf_412, dxf_413, dxf_414, dxf_415, dxf_416, dxf_417, dxf_418, dxf_419");
+	QsqlString.append(", dxf_420, dxf_421, dxf_422, dxf_423, dxf_424, dxf_425, dxf_426, dxf_427, dxf_428, dxf_429");
+	QsqlString.append(", dxf_430, dxf_431, dxf_432, dxf_433, dxf_434, dxf_435, dxf_436, dxf_437, dxf_438, dxf_439");
+	QsqlString.append(", dxf_440, dxf_441, dxf_442, dxf_443, dxf_444, dxf_445, dxf_446, dxf_447, dxf_448, dxf_449");
+	QsqlString.append(", dxf_450, dxf_451, dxf_452, dxf_453, dxf_454, dxf_455, dxf_456, dxf_457, dxf_458, dxf_459");
+	QsqlString.append(", dxf_460, dxf_461, dxf_462, dxf_463, dxf_464, dxf_465, dxf_466, dxf_467, dxf_468, dxf_469");
+	QsqlString.append(", dxf_470, dxf_471, dxf_472, dxf_473, dxf_474, dxf_475, dxf_476, dxf_477, dxf_478, dxf_479");
+	QsqlString.append(", dxf_480, dxf_481, dxf_482, dxf_483, dxf_484, dxf_485, dxf_486, dxf_487, dxf_488, dxf_489");
+	QsqlString.append(", dxf_999");
+	QsqlString.append(", dxf_1000, dxf_1001, dxf_1002, dxf_1003, dxf_1004, dxf_1005, dxf_1006, dxf_1007, dxf_1008, dxf_1009");
+	QsqlString.append(", dxf_1010, dxf_1011, dxf_1012, dxf_1013, dxf_1014, dxf_1015, dxf_1016, dxf_1017, dxf_1018, dxf_1019");
+	QsqlString.append(", dxf_1020, dxf_1021, dxf_1022, dxf_1023, dxf_1024, dxf_1025, dxf_1026, dxf_1027, dxf_1028, dxf_1029");
+	QsqlString.append(", dxf_1030, dxf_1031, dxf_1032, dxf_1033, dxf_1034, dxf_1035, dxf_1036, dxf_1037, dxf_1038, dxf_1039");
+	QsqlString.append(", dxf_1040, dxf_1041, dxf_1042, dxf_1043, dxf_1044, dxf_1045, dxf_1046, dxf_1047, dxf_1048, dxf_1049");
+	QsqlString.append(", dxf_1050, dxf_1051, dxf_1052, dxf_1053, dxf_1054, dxf_1055, dxf_1056, dxf_1057, dxf_1058, dxf_1059");
+	QsqlString.append(", dxf_1060, dxf_1061, dxf_1062, dxf_1063, dxf_1064, dxf_1065, dxf_1066, dxf_1067, dxf_1068, dxf_1069");
+	QsqlString.append(", dxf_1070, dxf_1071");
+
+
+	QsqlString.append(")");
+
+	m_db.exec(QsqlString);
+
+	QsqlString="create table dxf_thumbnailimage (Index_count primary key,Section";
+	QsqlString.append(", Command, ID_instruction, Command_count");
+	QsqlString.append(", dxf_m1, dxf_m2, dxf_m3, dxf_m4, dxf_m5");
+	QsqlString.append(", dxf_0, dxf_1, dxf_2, dxf_3, dxf_4, dxf_5, dxf_6, dxf_7, dxf_8, dxf_9");
+	QsqlString.append(", dxf_10, dxf_11, dxf_12, dxf_13, dxf_14, dxf_15, dxf_16, dxf_17, dxf_18, dxf_19");
+	QsqlString.append(", dxf_20, dxf_21, dxf_22, dxf_23, dxf_24, dxf_25, dxf_26, dxf_27, dxf_28, dxf_29");
+	QsqlString.append(", dxf_30, dxf_31, dxf_32, dxf_33, dxf_34, dxf_35, dxf_36, dxf_37, dxf_38, dxf_39");
+	QsqlString.append(", dxf_40, dxf_41, dxf_42, dxf_43, dxf_44, dxf_45, dxf_46, dxf_47, dxf_48, dxf_49");
+	QsqlString.append(", dxf_50, dxf_51, dxf_52, dxf_53, dxf_54, dxf_55, dxf_56, dxf_57, dxf_58, dxf_59");
+	QsqlString.append(", dxf_60, dxf_61, dxf_62, dxf_63, dxf_64, dxf_65, dxf_66, dxf_67, dxf_68, dxf_69");
+	QsqlString.append(", dxf_70, dxf_71, dxf_72, dxf_73, dxf_74, dxf_75, dxf_76, dxf_77, dxf_78, dxf_79");
+	QsqlString.append(", dxf_90, dxf_91, dxf_92, dxf_93, dxf_94, dxf_95, dxf_96, dxf_97, dxf_98, dxf_99");
+	QsqlString.append(", dxf_100, dxf_102, dxf_105");
+	QsqlString.append(", dxf_110, dxf_111, dxf_112, dxf_113, dxf_114, dxf_115, dxf_116, dxf_117, dxf_118, dxf_119");
+	QsqlString.append(", dxf_120, dxf_121, dxf_122, dxf_123, dxf_124, dxf_125, dxf_126, dxf_127, dxf_128, dxf_129");
+	QsqlString.append(", dxf_130, dxf_131, dxf_132, dxf_133, dxf_134, dxf_135, dxf_136, dxf_137, dxf_138, dxf_139");
+	QsqlString.append(", dxf_140, dxf_141, dxf_142, dxf_143, dxf_144, dxf_145, dxf_146, dxf_147, dxf_148, dxf_149");
+
+	QsqlString.append(", dxf_160, dxf_161, dxf_162, dxf_163, dxf_164, dxf_165, dxf_166, dxf_167, dxf_168, dxf_169");
+	QsqlString.append(", dxf_170, dxf_171, dxf_172, dxf_173, dxf_174, dxf_175, dxf_176, dxf_177, dxf_178, dxf_179");
+
+	QsqlString.append(", dxf_210, dxf_211, dxf_212, dxf_213, dxf_214, dxf_215, dxf_216, dxf_217, dxf_218, dxf_219");
+	QsqlString.append(", dxf_220, dxf_221, dxf_222, dxf_223, dxf_224, dxf_225, dxf_226, dxf_227, dxf_228, dxf_229");
+	QsqlString.append(", dxf_230, dxf_231, dxf_232, dxf_233, dxf_234, dxf_235, dxf_236, dxf_237, dxf_238, dxf_239");
+
+	QsqlString.append(", dxf_270, dxf_271, dxf_272, dxf_273, dxf_274, dxf_275, dxf_276, dxf_277, dxf_278, dxf_279");
+	QsqlString.append(", dxf_280, dxf_281, dxf_282, dxf_283, dxf_284, dxf_285, dxf_286, dxf_287, dxf_288, dxf_289");
+	QsqlString.append(", dxf_290, dxf_291, dxf_292, dxf_293, dxf_294, dxf_295, dxf_296, dxf_297, dxf_298, dxf_299");
+	QsqlString.append(", dxf_300, dxf_301, dxf_302, dxf_303, dxf_304, dxf_305, dxf_306, dxf_307, dxf_308, dxf_309");
+	QsqlString.append(", dxf_310, dxf_311, dxf_312, dxf_313, dxf_314, dxf_315, dxf_316, dxf_317, dxf_318, dxf_319");
+	QsqlString.append(", dxf_320, dxf_321, dxf_322, dxf_323, dxf_324, dxf_325, dxf_326, dxf_327, dxf_328, dxf_329");
+	QsqlString.append(", dxf_330, dxf_331, dxf_332, dxf_333, dxf_334, dxf_335, dxf_336, dxf_337, dxf_338, dxf_339");
+	QsqlString.append(", dxf_340, dxf_341, dxf_342, dxf_343, dxf_344, dxf_345, dxf_346, dxf_347, dxf_348, dxf_349");
+	QsqlString.append(", dxf_350, dxf_351, dxf_352, dxf_353, dxf_354, dxf_355, dxf_356, dxf_357, dxf_358, dxf_359");
+	QsqlString.append(", dxf_360, dxf_361, dxf_362, dxf_363, dxf_364, dxf_365, dxf_366, dxf_367, dxf_368, dxf_369");
+	QsqlString.append(", dxf_370, dxf_371, dxf_372, dxf_373, dxf_374, dxf_375, dxf_376, dxf_377, dxf_378, dxf_379");
+	QsqlString.append(", dxf_380, dxf_381, dxf_382, dxf_383, dxf_384, dxf_385, dxf_386, dxf_387, dxf_388, dxf_389");
+	QsqlString.append(", dxf_390, dxf_391, dxf_392, dxf_393, dxf_394, dxf_395, dxf_396, dxf_397, dxf_398, dxf_399");
+	QsqlString.append(", dxf_400, dxf_401, dxf_402, dxf_403, dxf_404, dxf_405, dxf_406, dxf_407, dxf_408, dxf_409");
+	QsqlString.append(", dxf_410, dxf_411, dxf_412, dxf_413, dxf_414, dxf_415, dxf_416, dxf_417, dxf_418, dxf_419");
+	QsqlString.append(", dxf_420, dxf_421, dxf_422, dxf_423, dxf_424, dxf_425, dxf_426, dxf_427, dxf_428, dxf_429");
+	QsqlString.append(", dxf_430, dxf_431, dxf_432, dxf_433, dxf_434, dxf_435, dxf_436, dxf_437, dxf_438, dxf_439");
+	QsqlString.append(", dxf_440, dxf_441, dxf_442, dxf_443, dxf_444, dxf_445, dxf_446, dxf_447, dxf_448, dxf_449");
+	QsqlString.append(", dxf_450, dxf_451, dxf_452, dxf_453, dxf_454, dxf_455, dxf_456, dxf_457, dxf_458, dxf_459");
+	QsqlString.append(", dxf_460, dxf_461, dxf_462, dxf_463, dxf_464, dxf_465, dxf_466, dxf_467, dxf_468, dxf_469");
+	QsqlString.append(", dxf_470, dxf_471, dxf_472, dxf_473, dxf_474, dxf_475, dxf_476, dxf_477, dxf_478, dxf_479");
+	QsqlString.append(", dxf_480, dxf_481, dxf_482, dxf_483, dxf_484, dxf_485, dxf_486, dxf_487, dxf_488, dxf_489");
+	QsqlString.append(", dxf_999");
+	QsqlString.append(", dxf_1000, dxf_1001, dxf_1002, dxf_1003, dxf_1004, dxf_1005, dxf_1006, dxf_1007, dxf_1008, dxf_1009");
+	QsqlString.append(", dxf_1010, dxf_1011, dxf_1012, dxf_1013, dxf_1014, dxf_1015, dxf_1016, dxf_1017, dxf_1018, dxf_1019");
+	QsqlString.append(", dxf_1020, dxf_1021, dxf_1022, dxf_1023, dxf_1024, dxf_1025, dxf_1026, dxf_1027, dxf_1028, dxf_1029");
+	QsqlString.append(", dxf_1030, dxf_1031, dxf_1032, dxf_1033, dxf_1034, dxf_1035, dxf_1036, dxf_1037, dxf_1038, dxf_1039");
+	QsqlString.append(", dxf_1040, dxf_1041, dxf_1042, dxf_1043, dxf_1044, dxf_1045, dxf_1046, dxf_1047, dxf_1048, dxf_1049");
+	QsqlString.append(", dxf_1050, dxf_1051, dxf_1052, dxf_1053, dxf_1054, dxf_1055, dxf_1056, dxf_1057, dxf_1058, dxf_1059");
+	QsqlString.append(", dxf_1060, dxf_1061, dxf_1062, dxf_1063, dxf_1064, dxf_1065, dxf_1066, dxf_1067, dxf_1068, dxf_1069");
+	QsqlString.append(", dxf_1070, dxf_1071");
+
+
+	QsqlString.append(")");
+
+	m_db.exec(QsqlString);
+
+	return;
+}
+
+int dbManager::dbManager_added_records(const QString &pathname, int64_t *Max_lines, int64_t *Record_count, QString dxf_type)
+{
+	m_db.transaction();
+	QSqlQuery Query1;
+
+	x1=0;
+	//x10=0;
+
+	QsqlString="INSERT INTO ";
+	QsqlString.append(dxf_type);
+	QsqlString.append(" (Index_count, Section");
+	QsqlString.append(", Command, ID_instruction, Command_count");
+	QsqlString.append(", dxf_m1, dxf_m2, dxf_m3, dxf_m4, dxf_m5");
+	QsqlString.append(", dxf_0, dxf_1, dxf_2, dxf_3, dxf_4, dxf_5, dxf_6, dxf_7, dxf_8, dxf_9");
+	QsqlString.append(", dxf_10, dxf_11, dxf_12, dxf_13, dxf_14, dxf_15, dxf_16, dxf_17, dxf_18, dxf_19");
+	QsqlString.append(", dxf_20, dxf_21, dxf_22, dxf_23, dxf_24, dxf_25, dxf_26, dxf_27, dxf_28, dxf_29");
+	QsqlString.append(", dxf_30, dxf_31, dxf_32, dxf_33, dxf_34, dxf_35, dxf_36, dxf_37, dxf_38, dxf_39");
+	QsqlString.append(", dxf_40, dxf_41, dxf_42, dxf_43, dxf_44, dxf_45, dxf_46, dxf_47, dxf_48, dxf_49");
+	QsqlString.append(", dxf_50, dxf_51, dxf_52, dxf_53, dxf_54, dxf_55, dxf_56, dxf_57, dxf_58, dxf_59");
+	QsqlString.append(", dxf_60, dxf_61, dxf_62, dxf_63, dxf_64, dxf_65, dxf_66, dxf_67, dxf_68, dxf_69");
+	QsqlString.append(", dxf_70, dxf_71, dxf_72, dxf_73, dxf_74, dxf_75, dxf_76, dxf_77, dxf_78, dxf_79");
+	QsqlString.append(", dxf_90, dxf_91, dxf_92, dxf_93, dxf_94, dxf_95, dxf_96, dxf_97, dxf_98, dxf_99");
+	QsqlString.append(", dxf_100, dxf_102, dxf_105");
+	QsqlString.append(", dxf_110, dxf_111, dxf_112, dxf_113, dxf_114, dxf_115, dxf_116, dxf_117, dxf_118, dxf_119");
+	QsqlString.append(", dxf_120, dxf_121, dxf_122, dxf_123, dxf_124, dxf_125, dxf_126, dxf_127, dxf_128, dxf_129");
+	QsqlString.append(", dxf_130, dxf_131, dxf_132, dxf_133, dxf_134, dxf_135, dxf_136, dxf_137, dxf_138, dxf_139");
+	QsqlString.append(", dxf_140, dxf_141, dxf_142, dxf_143, dxf_144, dxf_145, dxf_146, dxf_147, dxf_148, dxf_149");
+
+	QsqlString.append(", dxf_160, dxf_161, dxf_162, dxf_163, dxf_164, dxf_165, dxf_166, dxf_167, dxf_168, dxf_169");
+	QsqlString.append(", dxf_170, dxf_171, dxf_172, dxf_173, dxf_174, dxf_175, dxf_176, dxf_177, dxf_178, dxf_179");
+
+	QsqlString.append(", dxf_210, dxf_211, dxf_212, dxf_213, dxf_214, dxf_215, dxf_216, dxf_217, dxf_218, dxf_219");
+	QsqlString.append(", dxf_220, dxf_221, dxf_222, dxf_223, dxf_224, dxf_225, dxf_226, dxf_227, dxf_228, dxf_229");
+	QsqlString.append(", dxf_230, dxf_231, dxf_232, dxf_233, dxf_234, dxf_235, dxf_236, dxf_237, dxf_238, dxf_239");
+
+	QsqlString.append(", dxf_270, dxf_271, dxf_272, dxf_273, dxf_274, dxf_275, dxf_276, dxf_277, dxf_278, dxf_279");
+	QsqlString.append(", dxf_280, dxf_281, dxf_282, dxf_283, dxf_284, dxf_285, dxf_286, dxf_287, dxf_288, dxf_289");
+	QsqlString.append(", dxf_290, dxf_291, dxf_292, dxf_293, dxf_294, dxf_295, dxf_296, dxf_297, dxf_298, dxf_299");
+	QsqlString.append(", dxf_300, dxf_301, dxf_302, dxf_303, dxf_304, dxf_305, dxf_306, dxf_307, dxf_308, dxf_309");
+	QsqlString.append(", dxf_310, dxf_311, dxf_312, dxf_313, dxf_314, dxf_315, dxf_316, dxf_317, dxf_318, dxf_319");
+	QsqlString.append(", dxf_320, dxf_321, dxf_322, dxf_323, dxf_324, dxf_325, dxf_326, dxf_327, dxf_328, dxf_329");
+	QsqlString.append(", dxf_330, dxf_331, dxf_332, dxf_333, dxf_334, dxf_335, dxf_336, dxf_337, dxf_338, dxf_339");
+	QsqlString.append(", dxf_340, dxf_341, dxf_342, dxf_343, dxf_344, dxf_345, dxf_346, dxf_347, dxf_348, dxf_349");
+	QsqlString.append(", dxf_350, dxf_351, dxf_352, dxf_353, dxf_354, dxf_355, dxf_356, dxf_357, dxf_358, dxf_359");
+	QsqlString.append(", dxf_360, dxf_361, dxf_362, dxf_363, dxf_364, dxf_365, dxf_366, dxf_367, dxf_368, dxf_369");
+	QsqlString.append(", dxf_370, dxf_371, dxf_372, dxf_373, dxf_374, dxf_375, dxf_376, dxf_377, dxf_378, dxf_379");
+	QsqlString.append(", dxf_380, dxf_381, dxf_382, dxf_383, dxf_384, dxf_385, dxf_386, dxf_387, dxf_388, dxf_389");
+	QsqlString.append(", dxf_390, dxf_391, dxf_392, dxf_393, dxf_394, dxf_395, dxf_396, dxf_397, dxf_398, dxf_399");
+	QsqlString.append(", dxf_400, dxf_401, dxf_402, dxf_403, dxf_404, dxf_405, dxf_406, dxf_407, dxf_408, dxf_409");
+	QsqlString.append(", dxf_410, dxf_411, dxf_412, dxf_413, dxf_414, dxf_415, dxf_416, dxf_417, dxf_418, dxf_419");
+	QsqlString.append(", dxf_420, dxf_421, dxf_422, dxf_423, dxf_424, dxf_425, dxf_426, dxf_427, dxf_428, dxf_429");
+	QsqlString.append(", dxf_430, dxf_431, dxf_432, dxf_433, dxf_434, dxf_435, dxf_436, dxf_437, dxf_438, dxf_439");
+	QsqlString.append(", dxf_440, dxf_441, dxf_442, dxf_443, dxf_444, dxf_445, dxf_446, dxf_447, dxf_448, dxf_449");
+	QsqlString.append(", dxf_450, dxf_451, dxf_452, dxf_453, dxf_454, dxf_455, dxf_456, dxf_457, dxf_458, dxf_459");
+	QsqlString.append(", dxf_460, dxf_461, dxf_462, dxf_463, dxf_464, dxf_465, dxf_466, dxf_467, dxf_468, dxf_469");
+	QsqlString.append(", dxf_470, dxf_471, dxf_472, dxf_473, dxf_474, dxf_475, dxf_476, dxf_477, dxf_478, dxf_479");
+	QsqlString.append(", dxf_480, dxf_481, dxf_482, dxf_483, dxf_484, dxf_485, dxf_486, dxf_487, dxf_488, dxf_489");
+	QsqlString.append(", dxf_999");
+	QsqlString.append(", dxf_1000, dxf_1001, dxf_1002, dxf_1003, dxf_1004, dxf_1005, dxf_1006, dxf_1007, dxf_1008, dxf_1009");
+	QsqlString.append(", dxf_1010, dxf_1011, dxf_1012, dxf_1013, dxf_1014, dxf_1015, dxf_1016, dxf_1017, dxf_1018, dxf_1019");
+	QsqlString.append(", dxf_1020, dxf_1021, dxf_1022, dxf_1023, dxf_1024, dxf_1025, dxf_1026, dxf_1027, dxf_1028, dxf_1029");
+	QsqlString.append(", dxf_1030, dxf_1031, dxf_1032, dxf_1033, dxf_1034, dxf_1035, dxf_1036, dxf_1037, dxf_1038, dxf_1039");
+	QsqlString.append(", dxf_1040, dxf_1041, dxf_1042, dxf_1043, dxf_1044, dxf_1045, dxf_1046, dxf_1047, dxf_1048, dxf_1049");
+	QsqlString.append(", dxf_1050, dxf_1051, dxf_1052, dxf_1053, dxf_1054, dxf_1055, dxf_1056, dxf_1057, dxf_1058, dxf_1059");
+	QsqlString.append(", dxf_1060, dxf_1061, dxf_1062, dxf_1063, dxf_1064, dxf_1065, dxf_1066, dxf_1067, dxf_1068, dxf_1069");
+	QsqlString.append(", dxf_1070, dxf_1071");
+	QsqlString.append(")");
+	QsqlString.append(" VALUES (:Index_count, :Section");
+	QsqlString.append(", :Command, :ID_instruction, :Command_count");
+	QsqlString.append(", :dxf_m1, :dxf_m2, :dxf_m3, :dxf_m4, :dxf_m5");
+	QsqlString.append(", :dxf_0, :dxf_1, :dxf_2, :dxf_3, :dxf_4, :dxf_5, :dxf_6, :dxf_7, :dxf_8, :dxf_9");//dxf_0
+	QsqlString.append(", :dxf_10, :dxf_11, :dxf_12, :dxf_13, :dxf_14, :dxf_15, :dxf_16, :dxf_17, :dxf_18, :dxf_19");
+	QsqlString.append(", :dxf_20, :dxf_21, :dxf_22, :dxf_23, :dxf_24, :dxf_25, :dxf_26, :dxf_27, :dxf_28, :dxf_29");
+	QsqlString.append(", :dxf_30, :dxf_31, :dxf_32, :dxf_33, :dxf_34, :dxf_35, :dxf_36, :dxf_37, :dxf_38, :dxf_39");
+	QsqlString.append(", :dxf_40, :dxf_41, :dxf_42, :dxf_43, :dxf_44, :dxf_45, :dxf_46, :dxf_47, :dxf_48, :dxf_49");
+	QsqlString.append(", :dxf_50, :dxf_51, :dxf_52, :dxf_53, :dxf_54, :dxf_55, :dxf_56, :dxf_57, :dxf_58, :dxf_59");
+	QsqlString.append(", :dxf_60, :dxf_61, :dxf_62, :dxf_63, :dxf_64, :dxf_65, :dxf_66, :dxf_67, :dxf_68, :dxf_69");
+	QsqlString.append(", :dxf_70, :dxf_71, :dxf_72, :dxf_73, :dxf_74, :dxf_75, :dxf_76, :dxf_77, :dxf_78, :dxf_79");
+	QsqlString.append(", :dxf_90, :dxf_91, :dxf_92, :dxf_93, :dxf_94, :dxf_95, :dxf_96, :dxf_97, :dxf_98, :dxf_99");
+	QsqlString.append(", :dxf_100, :dxf_102, :dxf_105");
+	QsqlString.append(", :dxf_110, :dxf_111, :dxf_112, :dxf_113, :dxf_114, :dxf_115, :dxf_116, :dxf_117, :dxf_118, :dxf_119");
+	QsqlString.append(", :dxf_120, :dxf_121, :dxf_122, :dxf_123, :dxf_124, :dxf_125, :dxf_126, :dxf_127, :dxf_128, :dxf_129");
+	QsqlString.append(", :dxf_130, :dxf_131, :dxf_132, :dxf_133, :dxf_134, :dxf_135, :dxf_136, :dxf_137, :dxf_138, :dxf_139");
+	QsqlString.append(", :dxf_140, :dxf_141, :dxf_142, :dxf_143, :dxf_144, :dxf_145, :dxf_146, :dxf_147, :dxf_148, :dxf_149");
+
+	QsqlString.append(", :dxf_160, :dxf_161, :dxf_162, :dxf_163, :dxf_164, :dxf_165, :dxf_166, :dxf_167, :dxf_168, :dxf_169");
+	QsqlString.append(", :dxf_170, :dxf_171, :dxf_172, :dxf_173, :dxf_174, :dxf_175, :dxf_176, :dxf_177, :dxf_178, :dxf_179");
+
+
+	QsqlString.append(", :dxf_210, :dxf_211, :dxf_212, :dxf_213, :dxf_214, :dxf_215, :dxf_216, :dxf_217, :dxf_218, :dxf_219");
+	QsqlString.append(", :dxf_220, :dxf_221, :dxf_222, :dxf_223, :dxf_224, :dxf_225, :dxf_226, :dxf_227, :dxf_228, :dxf_229");
+	QsqlString.append(", :dxf_230, :dxf_231, :dxf_232, :dxf_233, :dxf_234, :dxf_235, :dxf_236, :dxf_237, :dxf_238, :dxf_239");
+
+	QsqlString.append(", :dxf_270, :dxf_271, :dxf_272, :dxf_273, :dxf_274, :dxf_275, :dxf_276, :dxf_277, :dxf_278, :dxf_279");
+	QsqlString.append(", :dxf_280, :dxf_281, :dxf_282, :dxf_283, :dxf_284, :dxf_285, :dxf_286, :dxf_287, :dxf_288, :dxf_289");
+	QsqlString.append(", :dxf_290, :dxf_291, :dxf_292, :dxf_293, :dxf_294, :dxf_295, :dxf_296, :dxf_297, :dxf_298, :dxf_299");
+	QsqlString.append(", :dxf_300, :dxf_301, :dxf_302, :dxf_303, :dxf_304, :dxf_305, :dxf_306, :dxf_307, :dxf_308, :dxf_309");
+	QsqlString.append(", :dxf_310, :dxf_311, :dxf_312, :dxf_313, :dxf_314, :dxf_315, :dxf_316, :dxf_317, :dxf_318, :dxf_319");
+	QsqlString.append(", :dxf_320, :dxf_321, :dxf_322, :dxf_323, :dxf_324, :dxf_325, :dxf_326, :dxf_327, :dxf_328, :dxf_329");
+	QsqlString.append(", :dxf_330, :dxf_331, :dxf_332, :dxf_333, :dxf_334, :dxf_335, :dxf_336, :dxf_337, :dxf_338, :dxf_339");
+	QsqlString.append(", :dxf_340, :dxf_341, :dxf_342, :dxf_343, :dxf_344, :dxf_345, :dxf_346, :dxf_347, :dxf_348, :dxf_349");
+	QsqlString.append(", :dxf_350, :dxf_351, :dxf_352, :dxf_353, :dxf_354, :dxf_355, :dxf_356, :dxf_357, :dxf_358, :dxf_359");
+	QsqlString.append(", :dxf_360, :dxf_361, :dxf_362, :dxf_363, :dxf_364, :dxf_365, :dxf_366, :dxf_367, :dxf_368, :dxf_369");
+	QsqlString.append(", :dxf_370, :dxf_371, :dxf_372, :dxf_373, :dxf_374, :dxf_375, :dxf_376, :dxf_377, :dxf_378, :dxf_379");
+	QsqlString.append(", :dxf_380, :dxf_381, :dxf_382, :dxf_383, :dxf_384, :dxf_385, :dxf_386, :dxf_387, :dxf_388, :dxf_389");
+	QsqlString.append(", :dxf_390, :dxf_391, :dxf_392, :dxf_393, :dxf_394, :dxf_395, :dxf_396, :dxf_397, :dxf_398, :dxf_399");
+	QsqlString.append(", :dxf_400, :dxf_401, :dxf_402, :dxf_403, :dxf_404, :dxf_405, :dxf_406, :dxf_407, :dxf_408, :dxf_409");
+	QsqlString.append(", :dxf_410, :dxf_411, :dxf_412, :dxf_413, :dxf_414, :dxf_415, :dxf_416, :dxf_417, :dxf_418, :dxf_419");
+	QsqlString.append(", :dxf_420, :dxf_421, :dxf_422, :dxf_423, :dxf_424, :dxf_425, :dxf_426, :dxf_427, :dxf_428, :dxf_429");
+	QsqlString.append(", :dxf_430, :dxf_431, :dxf_432, :dxf_433, :dxf_434, :dxf_435, :dxf_436, :dxf_437, :dxf_438, :dxf_439");
+	QsqlString.append(", :dxf_440, :dxf_441, :dxf_442, :dxf_443, :dxf_444, :dxf_445, :dxf_446, :dxf_447, :dxf_448, :dxf_449");
+	QsqlString.append(", :dxf_450, :dxf_451, :dxf_452, :dxf_453, :dxf_454, :dxf_455, :dxf_456, :dxf_457, :dxf_458, :dxf_459");
+	QsqlString.append(", :dxf_460, :dxf_461, :dxf_462, :dxf_463, :dxf_464, :dxf_465, :dxf_466, :dxf_467, :dxf_468, :dxf_469");
+	QsqlString.append(", :dxf_470, :dxf_471, :dxf_472, :dxf_473, :dxf_474, :dxf_475, :dxf_476, :dxf_477, :dxf_478, :dxf_479");
+	QsqlString.append(", :dxf_480, :dxf_481, :dxf_482, :dxf_483, :dxf_484, :dxf_485, :dxf_486, :dxf_487, :dxf_488, :dxf_489");
+	QsqlString.append(", :dxf_999");
+	QsqlString.append(", :dxf_1000, :dxf_1001, :dxf_1002, :dxf_1003, :dxf_1004, :dxf_1005, :dxf_1006, :dxf_1007, :dxf_1008, :dxf_1009");
+	QsqlString.append(", :dxf_1010, :dxf_1011, :dxf_1012, :dxf_1013, :dxf_1014, :dxf_1015, :dxf_1016, :dxf_1017, :dxf_1018, :dxf_1019");
+	QsqlString.append(", :dxf_1020, :dxf_1021, :dxf_1022, :dxf_1023, :dxf_1024, :dxf_1025, :dxf_1026, :dxf_1027, :dxf_1028, :dxf_1029");
+	QsqlString.append(", :dxf_1030, :dxf_1031, :dxf_1032, :dxf_1033, :dxf_1034, :dxf_1035, :dxf_1036, :dxf_1037, :dxf_1038, :dxf_1039");
+	QsqlString.append(", :dxf_1040, :dxf_1041, :dxf_1042, :dxf_1043, :dxf_1044, :dxf_1045, :dxf_1046, :dxf_1047, :dxf_1048, :dxf_1049");
+	QsqlString.append(", :dxf_1050, :dxf_1051, :dxf_1052, :dxf_1053, :dxf_1054, :dxf_1055, :dxf_1056, :dxf_1057, :dxf_1058, :dxf_1059");
+	QsqlString.append(", :dxf_1060, :dxf_1061, :dxf_1062, :dxf_1063, :dxf_1064, :dxf_1065, :dxf_1066, :dxf_1067, :dxf_1068, :dxf_1069");
+	QsqlString.append(", :dxf_1070, :dxf_1071");
+
+	QsqlString.append(")");
+
+
+	Query1.prepare(QsqlString);
+
+	Command_Count=-1;
+	Max_count_lines=*Max_lines;
+	Record_count_lines=*Record_count;
+	x1=0;
+
+	while ((x1<Max_count_lines) and (x1<DXF_codes_set))
+	{
+		//DXF_code_tables[x1].ID_instruction=1;
+		//Record_count_lines++;
+		//x10++;
+		if(Command_Count>=Max_count_lines)
+		{
+			Command_Count=-1;
+		}
+
+		Command_Count++;
+		//Record_count_lines++;
+		x2=0;
+
+		//while (x10<Max_count_lines)
+		//{
+
+		//Record_count_lines++;
+
+			//RecordNr=(QString::number(Record_count_lines));
+			//Query1.bindValue(":Index_count",RecordNr);
+			Query1.bindValue(":Index_count",Record_count_lines);
+			Query1.bindValue(":Section",DXF_code_tables[0].Section);
+			Query1.bindValue(":Command",DXF_code_tables[0].Command);
+
+
+			Record_count_lines++;
+
+			/*if (DXF_code_tables[0].dxf_5!="")
+			{
+				Query1.bindValue(":ID_instruction",DXF_code_tables[0].dxf_5);
+
+			}
+			else
+			{
+				Query1.bindValue(":ID_instruction",DXF_code_tables[0].ID_instruction);
+			}*/
+
+			Query1.bindValue(":ID_instruction",DXF_code_tables[0].ID_instruction);
+
+			Query1.bindValue(":Command_count",QString::number(Command_Count));
+			Query1.bindValue(":dxf_m1",DXF_code_tables[x1].dxf_m1);
+			Query1.bindValue(":dxf_m2",DXF_code_tables[x1].dxf_m2);
+			Query1.bindValue(":dxf_m3",DXF_code_tables[x1].dxf_m3);
+			Query1.bindValue(":dxf_m4",DXF_code_tables[x1].dxf_m4);
+			Query1.bindValue(":dxf_m1",DXF_code_tables[x1].dxf_m5);
+
+			Query1.bindValue(":dxf_0",DXF_code_tables[x1].dxf_0);
+			Query1.bindValue(":dxf_1",DXF_code_tables[x1].dxf_1);
+			Query1.bindValue(":dxf_2",DXF_code_tables[x1].dxf_2);
+			Query1.bindValue(":dxf_3",DXF_code_tables[x1].dxf_3);
+			Query1.bindValue(":dxf_4",DXF_code_tables[x1].dxf_4);
+			Query1.bindValue(":dxf_5",DXF_code_tables[0].dxf_5);
+			Query1.bindValue(":dxf_6",DXF_code_tables[x1].dxf_6);
+			Query1.bindValue(":dxf_7",DXF_code_tables[x1].dxf_7);
+			Query1.bindValue(":dxf_8",DXF_code_tables[x1].dxf_8);
+			Query1.bindValue(":dxf_9",DXF_code_tables[x1].dxf_9);
+			Query1.bindValue(":dxf_10",DXF_code_tables[x1].dxf_10);
+			Query1.bindValue(":dxf_10",DXF_code_tables[x1].dxf_10);
+			Query1.bindValue(":dxf_11",DXF_code_tables[x1].dxf_11);
+			Query1.bindValue(":dxf_12",DXF_code_tables[x1].dxf_12);
+			Query1.bindValue(":dxf_13",DXF_code_tables[x1].dxf_13);
+			Query1.bindValue(":dxf_14",DXF_code_tables[x1].dxf_14);
+			Query1.bindValue(":dxf_15",DXF_code_tables[x1].dxf_15);
+			Query1.bindValue(":dxf_16",DXF_code_tables[x1].dxf_16);
+			Query1.bindValue(":dxf_17",DXF_code_tables[x1].dxf_17);
+			Query1.bindValue(":dxf_18",DXF_code_tables[x1].dxf_18);
+			Query1.bindValue(":dxf_19",DXF_code_tables[x1].dxf_19);
+			Query1.bindValue(":dxf_20",DXF_code_tables[x1].dxf_20);
+			Query1.bindValue(":dxf_21",DXF_code_tables[x1].dxf_21);
+			Query1.bindValue(":dxf_22",DXF_code_tables[x1].dxf_22);
+			Query1.bindValue(":dxf_23",DXF_code_tables[x1].dxf_23);
+			Query1.bindValue(":dxf_24",DXF_code_tables[x1].dxf_24);
+			Query1.bindValue(":dxf_25",DXF_code_tables[x1].dxf_25);
+			Query1.bindValue(":dxf_26",DXF_code_tables[x1].dxf_26);
+			Query1.bindValue(":dxf_27",DXF_code_tables[x1].dxf_27);
+			Query1.bindValue(":dxf_28",DXF_code_tables[x1].dxf_28);
+			Query1.bindValue(":dxf_29",DXF_code_tables[x1].dxf_29);
+			Query1.bindValue(":dxf_30",DXF_code_tables[x1].dxf_30);
+			Query1.bindValue(":dxf_31",DXF_code_tables[x1].dxf_31);
+			Query1.bindValue(":dxf_32",DXF_code_tables[x1].dxf_32);
+			Query1.bindValue(":dxf_33",DXF_code_tables[x1].dxf_33);
+			Query1.bindValue(":dxf_34",DXF_code_tables[x1].dxf_34);
+			Query1.bindValue(":dxf_35",DXF_code_tables[x1].dxf_35);
+			Query1.bindValue(":dxf_36",DXF_code_tables[x1].dxf_36);
+			Query1.bindValue(":dxf_37",DXF_code_tables[x1].dxf_37);
+			Query1.bindValue(":dxf_38",DXF_code_tables[x1].dxf_38);
+			Query1.bindValue(":dxf_39",DXF_code_tables[x1].dxf_39);
+			Query1.bindValue(":dxf_40",DXF_code_tables[x1].dxf_40);
+			Query1.bindValue(":dxf_41",DXF_code_tables[x1].dxf_41);
+			Query1.bindValue(":dxf_42",DXF_code_tables[x1].dxf_42);
+			Query1.bindValue(":dxf_43",DXF_code_tables[x1].dxf_43);
+			Query1.bindValue(":dxf_44",DXF_code_tables[x1].dxf_44);
+			Query1.bindValue(":dxf_45",DXF_code_tables[x1].dxf_45);
+			Query1.bindValue(":dxf_46",DXF_code_tables[x1].dxf_46);
+			Query1.bindValue(":dxf_47",DXF_code_tables[x1].dxf_47);
+			Query1.bindValue(":dxf_48",DXF_code_tables[x1].dxf_48);
+			Query1.bindValue(":dxf_49",DXF_code_tables[x1].dxf_49);
+			Query1.bindValue(":dxf_50",DXF_code_tables[x1].dxf_50);
+			Query1.bindValue(":dxf_51",DXF_code_tables[x1].dxf_51);
+			Query1.bindValue(":dxf_52",DXF_code_tables[x1].dxf_52);
+			Query1.bindValue(":dxf_53",DXF_code_tables[x1].dxf_53);
+			Query1.bindValue(":dxf_54",DXF_code_tables[x1].dxf_54);
+			Query1.bindValue(":dxf_55",DXF_code_tables[x1].dxf_55);
+			Query1.bindValue(":dxf_56",DXF_code_tables[x1].dxf_56);
+			Query1.bindValue(":dxf_57",DXF_code_tables[x1].dxf_57);
+			Query1.bindValue(":dxf_58",DXF_code_tables[x1].dxf_58);
+			Query1.bindValue(":dxf_59",DXF_code_tables[x1].dxf_59);
+			Query1.bindValue(":dxf_60",DXF_code_tables[x1].dxf_60);
+			Query1.bindValue(":dxf_61",DXF_code_tables[x1].dxf_61);
+			Query1.bindValue(":dxf_62",DXF_code_tables[x1].dxf_62);
+			Query1.bindValue(":dxf_63",DXF_code_tables[x1].dxf_63);
+			Query1.bindValue(":dxf_64",DXF_code_tables[x1].dxf_64);
+			Query1.bindValue(":dxf_65",DXF_code_tables[x1].dxf_65);
+			Query1.bindValue(":dxf_66",DXF_code_tables[x1].dxf_66);
+			Query1.bindValue(":dxf_67",DXF_code_tables[x1].dxf_67);
+			Query1.bindValue(":dxf_68",DXF_code_tables[x1].dxf_68);
+			Query1.bindValue(":dxf_69",DXF_code_tables[x1].dxf_69);
+			Query1.bindValue(":dxf_70",DXF_code_tables[x1].dxf_70);
+			Query1.bindValue(":dxf_71",DXF_code_tables[x1].dxf_71);
+			Query1.bindValue(":dxf_72",DXF_code_tables[x1].dxf_72);
+			Query1.bindValue(":dxf_73",DXF_code_tables[x1].dxf_73);
+			Query1.bindValue(":dxf_74",DXF_code_tables[x1].dxf_74);
+			Query1.bindValue(":dxf_75",DXF_code_tables[x1].dxf_75);
+			Query1.bindValue(":dxf_76",DXF_code_tables[x1].dxf_76);
+			Query1.bindValue(":dxf_77",DXF_code_tables[x1].dxf_77);
+			Query1.bindValue(":dxf_78",DXF_code_tables[x1].dxf_78);
+			Query1.bindValue(":dxf_79",DXF_code_tables[x1].dxf_79);
+
+
+			Query1.bindValue(":dxf_90",DXF_code_tables[x1].dxf_90);
+			Query1.bindValue(":dxf_91",DXF_code_tables[x1].dxf_91);
+			Query1.bindValue(":dxf_92",DXF_code_tables[x1].dxf_92);
+			Query1.bindValue(":dxf_93",DXF_code_tables[x1].dxf_93);
+			Query1.bindValue(":dxf_94",DXF_code_tables[x1].dxf_94);
+			Query1.bindValue(":dxf_95",DXF_code_tables[x1].dxf_95);
+			Query1.bindValue(":dxf_96",DXF_code_tables[x1].dxf_96);
+			Query1.bindValue(":dxf_97",DXF_code_tables[x1].dxf_97);
+			Query1.bindValue(":dxf_98",DXF_code_tables[x1].dxf_98);
+			Query1.bindValue(":dxf_99",DXF_code_tables[x1].dxf_99);
+			Query1.bindValue(":dxf_100",DXF_code_tables[x1].dxf_100);
+
+			Query1.bindValue(":dxf_102",DXF_code_tables[x1].dxf_102);
+
+
+			Query1.bindValue(":dxf_105",DXF_code_tables[x1].dxf_105);
+
+
+			Query1.bindValue(":dxf_110",DXF_code_tables[x1].dxf_110);
+			Query1.bindValue(":dxf_111",DXF_code_tables[x1].dxf_111);
+			Query1.bindValue(":dxf_112",DXF_code_tables[x1].dxf_112);
+			Query1.bindValue(":dxf_113",DXF_code_tables[x1].dxf_113);
+			Query1.bindValue(":dxf_114",DXF_code_tables[x1].dxf_114);
+			Query1.bindValue(":dxf_115",DXF_code_tables[x1].dxf_115);
+			Query1.bindValue(":dxf_116",DXF_code_tables[x1].dxf_116);
+			Query1.bindValue(":dxf_117",DXF_code_tables[x1].dxf_117);
+			Query1.bindValue(":dxf_118",DXF_code_tables[x1].dxf_118);
+			Query1.bindValue(":dxf_119",DXF_code_tables[x1].dxf_119);
+			Query1.bindValue(":dxf_120",DXF_code_tables[x1].dxf_120);
+			Query1.bindValue(":dxf_121",DXF_code_tables[x1].dxf_121);
+			Query1.bindValue(":dxf_122",DXF_code_tables[x1].dxf_122);
+			Query1.bindValue(":dxf_123",DXF_code_tables[x1].dxf_123);
+			Query1.bindValue(":dxf_124",DXF_code_tables[x1].dxf_124);
+			Query1.bindValue(":dxf_125",DXF_code_tables[x1].dxf_125);
+			Query1.bindValue(":dxf_126",DXF_code_tables[x1].dxf_126);
+			Query1.bindValue(":dxf_127",DXF_code_tables[x1].dxf_127);
+			Query1.bindValue(":dxf_128",DXF_code_tables[x1].dxf_128);
+			Query1.bindValue(":dxf_129",DXF_code_tables[x1].dxf_129);
+			Query1.bindValue(":dxf_130",DXF_code_tables[x1].dxf_130);
+			Query1.bindValue(":dxf_131",DXF_code_tables[x1].dxf_131);
+			Query1.bindValue(":dxf_132",DXF_code_tables[x1].dxf_132);
+			Query1.bindValue(":dxf_133",DXF_code_tables[x1].dxf_133);
+			Query1.bindValue(":dxf_134",DXF_code_tables[x1].dxf_134);
+			Query1.bindValue(":dxf_135",DXF_code_tables[x1].dxf_135);
+			Query1.bindValue(":dxf_136",DXF_code_tables[x1].dxf_136);
+			Query1.bindValue(":dxf_137",DXF_code_tables[x1].dxf_137);
+			Query1.bindValue(":dxf_138",DXF_code_tables[x1].dxf_138);
+			Query1.bindValue(":dxf_139",DXF_code_tables[x1].dxf_139);
+			Query1.bindValue(":dxf_140",DXF_code_tables[x1].dxf_140);
+			Query1.bindValue(":dxf_141",DXF_code_tables[x1].dxf_141);
+			Query1.bindValue(":dxf_142",DXF_code_tables[x1].dxf_142);
+			Query1.bindValue(":dxf_143",DXF_code_tables[x1].dxf_143);
+			Query1.bindValue(":dxf_144",DXF_code_tables[x1].dxf_144);
+			Query1.bindValue(":dxf_145",DXF_code_tables[x1].dxf_145);
+			Query1.bindValue(":dxf_146",DXF_code_tables[x1].dxf_146);
+			Query1.bindValue(":dxf_147",DXF_code_tables[x1].dxf_147);
+			Query1.bindValue(":dxf_148",DXF_code_tables[x1].dxf_148);
+			Query1.bindValue(":dxf_149",DXF_code_tables[x1].dxf_149);
+
+
+			Query1.bindValue(":dxf_160",DXF_code_tables[x1].dxf_160);
+			Query1.bindValue(":dxf_161",DXF_code_tables[x1].dxf_161);
+			Query1.bindValue(":dxf_162",DXF_code_tables[x1].dxf_162);
+			Query1.bindValue(":dxf_163",DXF_code_tables[x1].dxf_163);
+			Query1.bindValue(":dxf_164",DXF_code_tables[x1].dxf_164);
+			Query1.bindValue(":dxf_165",DXF_code_tables[x1].dxf_165);
+			Query1.bindValue(":dxf_166",DXF_code_tables[x1].dxf_166);
+			Query1.bindValue(":dxf_167",DXF_code_tables[x1].dxf_167);
+			Query1.bindValue(":dxf_168",DXF_code_tables[x1].dxf_168);
+			Query1.bindValue(":dxf_169",DXF_code_tables[x1].dxf_169);
+			Query1.bindValue(":dxf_170",DXF_code_tables[x1].dxf_170);
+			Query1.bindValue(":dxf_171",DXF_code_tables[x1].dxf_171);
+			Query1.bindValue(":dxf_172",DXF_code_tables[x1].dxf_172);
+			Query1.bindValue(":dxf_173",DXF_code_tables[x1].dxf_173);
+			Query1.bindValue(":dxf_174",DXF_code_tables[x1].dxf_174);
+			Query1.bindValue(":dxf_175",DXF_code_tables[x1].dxf_175);
+			Query1.bindValue(":dxf_176",DXF_code_tables[x1].dxf_176);
+			Query1.bindValue(":dxf_177",DXF_code_tables[x1].dxf_177);
+			Query1.bindValue(":dxf_178",DXF_code_tables[x1].dxf_178);
+			Query1.bindValue(":dxf_179",DXF_code_tables[x1].dxf_179);
+
+
+			Query1.bindValue(":dxf_210",DXF_code_tables[x1].dxf_210);
+			Query1.bindValue(":dxf_211",DXF_code_tables[x1].dxf_211);
+			Query1.bindValue(":dxf_212",DXF_code_tables[x1].dxf_212);
+			Query1.bindValue(":dxf_213",DXF_code_tables[x1].dxf_213);
+			Query1.bindValue(":dxf_214",DXF_code_tables[x1].dxf_214);
+			Query1.bindValue(":dxf_215",DXF_code_tables[x1].dxf_215);
+			Query1.bindValue(":dxf_216",DXF_code_tables[x1].dxf_216);
+			Query1.bindValue(":dxf_217",DXF_code_tables[x1].dxf_217);
+			Query1.bindValue(":dxf_218",DXF_code_tables[x1].dxf_218);
+			Query1.bindValue(":dxf_219",DXF_code_tables[x1].dxf_219);
+			Query1.bindValue(":dxf_220",DXF_code_tables[x1].dxf_220);
+			Query1.bindValue(":dxf_221",DXF_code_tables[x1].dxf_221);
+			Query1.bindValue(":dxf_222",DXF_code_tables[x1].dxf_222);
+			Query1.bindValue(":dxf_223",DXF_code_tables[x1].dxf_223);
+			Query1.bindValue(":dxf_224",DXF_code_tables[x1].dxf_224);
+			Query1.bindValue(":dxf_225",DXF_code_tables[x1].dxf_225);
+			Query1.bindValue(":dxf_226",DXF_code_tables[x1].dxf_226);
+			Query1.bindValue(":dxf_227",DXF_code_tables[x1].dxf_227);
+			Query1.bindValue(":dxf_228",DXF_code_tables[x1].dxf_228);
+			Query1.bindValue(":dxf_229",DXF_code_tables[x1].dxf_229);
+			Query1.bindValue(":dxf_230",DXF_code_tables[x1].dxf_230);
+			Query1.bindValue(":dxf_231",DXF_code_tables[x1].dxf_231);
+			Query1.bindValue(":dxf_232",DXF_code_tables[x1].dxf_232);
+			Query1.bindValue(":dxf_233",DXF_code_tables[x1].dxf_233);
+			Query1.bindValue(":dxf_234",DXF_code_tables[x1].dxf_234);
+			Query1.bindValue(":dxf_235",DXF_code_tables[x1].dxf_235);
+			Query1.bindValue(":dxf_236",DXF_code_tables[x1].dxf_236);
+			Query1.bindValue(":dxf_237",DXF_code_tables[x1].dxf_237);
+			Query1.bindValue(":dxf_238",DXF_code_tables[x1].dxf_238);
+			Query1.bindValue(":dxf_239",DXF_code_tables[x1].dxf_239);
+
+
+			Query1.bindValue(":dxf_270",DXF_code_tables[x1].dxf_270);
+			Query1.bindValue(":dxf_271",DXF_code_tables[x1].dxf_271);
+			Query1.bindValue(":dxf_272",DXF_code_tables[x1].dxf_272);
+			Query1.bindValue(":dxf_273",DXF_code_tables[x1].dxf_273);
+			Query1.bindValue(":dxf_274",DXF_code_tables[x1].dxf_274);
+			Query1.bindValue(":dxf_275",DXF_code_tables[x1].dxf_275);
+			Query1.bindValue(":dxf_276",DXF_code_tables[x1].dxf_276);
+			Query1.bindValue(":dxf_277",DXF_code_tables[x1].dxf_277);
+			Query1.bindValue(":dxf_278",DXF_code_tables[x1].dxf_278);
+			Query1.bindValue(":dxf_279",DXF_code_tables[x1].dxf_279);
+			Query1.bindValue(":dxf_280",DXF_code_tables[x1].dxf_280);
+			Query1.bindValue(":dxf_281",DXF_code_tables[x1].dxf_281);
+			Query1.bindValue(":dxf_282",DXF_code_tables[x1].dxf_282);
+			Query1.bindValue(":dxf_283",DXF_code_tables[x1].dxf_283);
+			Query1.bindValue(":dxf_284",DXF_code_tables[x1].dxf_284);
+			Query1.bindValue(":dxf_285",DXF_code_tables[x1].dxf_285);
+			Query1.bindValue(":dxf_286",DXF_code_tables[x1].dxf_286);
+			Query1.bindValue(":dxf_287",DXF_code_tables[x1].dxf_287);
+			Query1.bindValue(":dxf_288",DXF_code_tables[x1].dxf_288);
+			Query1.bindValue(":dxf_289",DXF_code_tables[x1].dxf_289);
+			Query1.bindValue(":dxf_290",DXF_code_tables[x1].dxf_290);
+			Query1.bindValue(":dxf_291",DXF_code_tables[x1].dxf_291);
+			Query1.bindValue(":dxf_292",DXF_code_tables[x1].dxf_292);
+			Query1.bindValue(":dxf_293",DXF_code_tables[x1].dxf_293);
+			Query1.bindValue(":dxf_294",DXF_code_tables[x1].dxf_294);
+			Query1.bindValue(":dxf_295",DXF_code_tables[x1].dxf_295);
+			Query1.bindValue(":dxf_296",DXF_code_tables[x1].dxf_296);
+			Query1.bindValue(":dxf_297",DXF_code_tables[x1].dxf_297);
+			Query1.bindValue(":dxf_298",DXF_code_tables[x1].dxf_298);
+			Query1.bindValue(":dxf_299",DXF_code_tables[x1].dxf_299);
+			Query1.bindValue(":dxf_300",DXF_code_tables[x1].dxf_300);
+			Query1.bindValue(":dxf_301",DXF_code_tables[x1].dxf_301);
+			Query1.bindValue(":dxf_302",DXF_code_tables[x1].dxf_302);
+			Query1.bindValue(":dxf_303",DXF_code_tables[x1].dxf_303);
+			Query1.bindValue(":dxf_304",DXF_code_tables[x1].dxf_304);
+			Query1.bindValue(":dxf_305",DXF_code_tables[x1].dxf_305);
+			Query1.bindValue(":dxf_306",DXF_code_tables[x1].dxf_306);
+			Query1.bindValue(":dxf_307",DXF_code_tables[x1].dxf_307);
+			Query1.bindValue(":dxf_308",DXF_code_tables[x1].dxf_308);
+			Query1.bindValue(":dxf_309",DXF_code_tables[x1].dxf_309);
+			Query1.bindValue(":dxf_310",DXF_code_tables[x1].dxf_310);
+			Query1.bindValue(":dxf_311",DXF_code_tables[x1].dxf_311);
+			Query1.bindValue(":dxf_312",DXF_code_tables[x1].dxf_312);
+			Query1.bindValue(":dxf_313",DXF_code_tables[x1].dxf_313);
+			Query1.bindValue(":dxf_314",DXF_code_tables[x1].dxf_314);
+			Query1.bindValue(":dxf_315",DXF_code_tables[x1].dxf_315);
+			Query1.bindValue(":dxf_316",DXF_code_tables[x1].dxf_316);
+			Query1.bindValue(":dxf_317",DXF_code_tables[x1].dxf_317);
+			Query1.bindValue(":dxf_318",DXF_code_tables[x1].dxf_318);
+			Query1.bindValue(":dxf_319",DXF_code_tables[x1].dxf_319);
+			Query1.bindValue(":dxf_320",DXF_code_tables[x1].dxf_320);
+			Query1.bindValue(":dxf_321",DXF_code_tables[x1].dxf_321);
+			Query1.bindValue(":dxf_322",DXF_code_tables[x1].dxf_322);
+			Query1.bindValue(":dxf_323",DXF_code_tables[x1].dxf_323);
+			Query1.bindValue(":dxf_324",DXF_code_tables[x1].dxf_324);
+			Query1.bindValue(":dxf_325",DXF_code_tables[x1].dxf_325);
+			Query1.bindValue(":dxf_326",DXF_code_tables[x1].dxf_326);
+			Query1.bindValue(":dxf_327",DXF_code_tables[x1].dxf_327);
+			Query1.bindValue(":dxf_328",DXF_code_tables[x1].dxf_328);
+			Query1.bindValue(":dxf_329",DXF_code_tables[x1].dxf_329);
+			Query1.bindValue(":dxf_330",DXF_code_tables[x1].dxf_330);
+			Query1.bindValue(":dxf_331",DXF_code_tables[x1].dxf_331);
+			Query1.bindValue(":dxf_332",DXF_code_tables[x1].dxf_332);
+			Query1.bindValue(":dxf_333",DXF_code_tables[x1].dxf_333);
+			Query1.bindValue(":dxf_334",DXF_code_tables[x1].dxf_334);
+			Query1.bindValue(":dxf_335",DXF_code_tables[x1].dxf_335);
+			Query1.bindValue(":dxf_336",DXF_code_tables[x1].dxf_336);
+			Query1.bindValue(":dxf_337",DXF_code_tables[x1].dxf_337);
+			Query1.bindValue(":dxf_338",DXF_code_tables[x1].dxf_338);
+			Query1.bindValue(":dxf_339",DXF_code_tables[x1].dxf_339);
+			Query1.bindValue(":dxf_340",DXF_code_tables[x1].dxf_340);
+			Query1.bindValue(":dxf_341",DXF_code_tables[x1].dxf_341);
+			Query1.bindValue(":dxf_342",DXF_code_tables[x1].dxf_342);
+			Query1.bindValue(":dxf_343",DXF_code_tables[x1].dxf_343);
+			Query1.bindValue(":dxf_344",DXF_code_tables[x1].dxf_344);
+			Query1.bindValue(":dxf_345",DXF_code_tables[x1].dxf_345);
+			Query1.bindValue(":dxf_346",DXF_code_tables[x1].dxf_346);
+			Query1.bindValue(":dxf_347",DXF_code_tables[x1].dxf_347);
+			Query1.bindValue(":dxf_348",DXF_code_tables[x1].dxf_348);
+			Query1.bindValue(":dxf_349",DXF_code_tables[x1].dxf_349);
+			Query1.bindValue(":dxf_350",DXF_code_tables[x1].dxf_350);
+			Query1.bindValue(":dxf_351",DXF_code_tables[x1].dxf_351);
+			Query1.bindValue(":dxf_352",DXF_code_tables[x1].dxf_352);
+			Query1.bindValue(":dxf_353",DXF_code_tables[x1].dxf_353);
+			Query1.bindValue(":dxf_354",DXF_code_tables[x1].dxf_354);
+			Query1.bindValue(":dxf_355",DXF_code_tables[x1].dxf_355);
+			Query1.bindValue(":dxf_356",DXF_code_tables[x1].dxf_356);
+			Query1.bindValue(":dxf_357",DXF_code_tables[x1].dxf_357);
+			Query1.bindValue(":dxf_358",DXF_code_tables[x1].dxf_358);
+			Query1.bindValue(":dxf_359",DXF_code_tables[x1].dxf_359);
+			Query1.bindValue(":dxf_360",DXF_code_tables[x1].dxf_360);
+			Query1.bindValue(":dxf_361",DXF_code_tables[x1].dxf_361);
+			Query1.bindValue(":dxf_362",DXF_code_tables[x1].dxf_362);
+			Query1.bindValue(":dxf_363",DXF_code_tables[x1].dxf_363);
+			Query1.bindValue(":dxf_364",DXF_code_tables[x1].dxf_364);
+			Query1.bindValue(":dxf_365",DXF_code_tables[x1].dxf_365);
+			Query1.bindValue(":dxf_366",DXF_code_tables[x1].dxf_366);
+			Query1.bindValue(":dxf_367",DXF_code_tables[x1].dxf_367);
+			Query1.bindValue(":dxf_368",DXF_code_tables[x1].dxf_368);
+			Query1.bindValue(":dxf_369",DXF_code_tables[x1].dxf_369);
+			Query1.bindValue(":dxf_370",DXF_code_tables[x1].dxf_370);
+			Query1.bindValue(":dxf_371",DXF_code_tables[x1].dxf_371);
+			Query1.bindValue(":dxf_372",DXF_code_tables[x1].dxf_372);
+			Query1.bindValue(":dxf_373",DXF_code_tables[x1].dxf_373);
+			Query1.bindValue(":dxf_374",DXF_code_tables[x1].dxf_374);
+			Query1.bindValue(":dxf_375",DXF_code_tables[x1].dxf_375);
+			Query1.bindValue(":dxf_376",DXF_code_tables[x1].dxf_376);
+			Query1.bindValue(":dxf_377",DXF_code_tables[x1].dxf_377);
+			Query1.bindValue(":dxf_378",DXF_code_tables[x1].dxf_378);
+			Query1.bindValue(":dxf_379",DXF_code_tables[x1].dxf_379);
+			Query1.bindValue(":dxf_380",DXF_code_tables[x1].dxf_380);
+			Query1.bindValue(":dxf_381",DXF_code_tables[x1].dxf_381);
+			Query1.bindValue(":dxf_382",DXF_code_tables[x1].dxf_382);
+			Query1.bindValue(":dxf_383",DXF_code_tables[x1].dxf_383);
+			Query1.bindValue(":dxf_384",DXF_code_tables[x1].dxf_384);
+			Query1.bindValue(":dxf_385",DXF_code_tables[x1].dxf_385);
+			Query1.bindValue(":dxf_386",DXF_code_tables[x1].dxf_386);
+			Query1.bindValue(":dxf_387",DXF_code_tables[x1].dxf_387);
+			Query1.bindValue(":dxf_388",DXF_code_tables[x1].dxf_388);
+			Query1.bindValue(":dxf_389",DXF_code_tables[x1].dxf_389);
+			Query1.bindValue(":dxf_390",DXF_code_tables[x1].dxf_390);
+			Query1.bindValue(":dxf_391",DXF_code_tables[x1].dxf_391);
+			Query1.bindValue(":dxf_392",DXF_code_tables[x1].dxf_392);
+			Query1.bindValue(":dxf_393",DXF_code_tables[x1].dxf_393);
+			Query1.bindValue(":dxf_394",DXF_code_tables[x1].dxf_394);
+			Query1.bindValue(":dxf_395",DXF_code_tables[x1].dxf_395);
+			Query1.bindValue(":dxf_396",DXF_code_tables[x1].dxf_396);
+			Query1.bindValue(":dxf_397",DXF_code_tables[x1].dxf_397);
+			Query1.bindValue(":dxf_398",DXF_code_tables[x1].dxf_398);
+			Query1.bindValue(":dxf_399",DXF_code_tables[x1].dxf_399);
+			Query1.bindValue(":dxf_400",DXF_code_tables[x1].dxf_400);
+			Query1.bindValue(":dxf_401",DXF_code_tables[x1].dxf_401);
+			Query1.bindValue(":dxf_402",DXF_code_tables[x1].dxf_402);
+			Query1.bindValue(":dxf_403",DXF_code_tables[x1].dxf_403);
+			Query1.bindValue(":dxf_404",DXF_code_tables[x1].dxf_404);
+			Query1.bindValue(":dxf_405",DXF_code_tables[x1].dxf_405);
+			Query1.bindValue(":dxf_406",DXF_code_tables[x1].dxf_406);
+			Query1.bindValue(":dxf_407",DXF_code_tables[x1].dxf_407);
+			Query1.bindValue(":dxf_408",DXF_code_tables[x1].dxf_408);
+			Query1.bindValue(":dxf_409",DXF_code_tables[x1].dxf_409);
+			Query1.bindValue(":dxf_410",DXF_code_tables[x1].dxf_410);
+			Query1.bindValue(":dxf_411",DXF_code_tables[x1].dxf_411);
+			Query1.bindValue(":dxf_412",DXF_code_tables[x1].dxf_412);
+			Query1.bindValue(":dxf_413",DXF_code_tables[x1].dxf_413);
+			Query1.bindValue(":dxf_414",DXF_code_tables[x1].dxf_414);
+			Query1.bindValue(":dxf_415",DXF_code_tables[x1].dxf_415);
+			Query1.bindValue(":dxf_416",DXF_code_tables[x1].dxf_416);
+			Query1.bindValue(":dxf_417",DXF_code_tables[x1].dxf_417);
+			Query1.bindValue(":dxf_418",DXF_code_tables[x1].dxf_418);
+			Query1.bindValue(":dxf_419",DXF_code_tables[x1].dxf_419);
+			Query1.bindValue(":dxf_420",DXF_code_tables[x1].dxf_420);
+			Query1.bindValue(":dxf_421",DXF_code_tables[x1].dxf_421);
+			Query1.bindValue(":dxf_422",DXF_code_tables[x1].dxf_422);
+			Query1.bindValue(":dxf_423",DXF_code_tables[x1].dxf_423);
+			Query1.bindValue(":dxf_424",DXF_code_tables[x1].dxf_424);
+			Query1.bindValue(":dxf_425",DXF_code_tables[x1].dxf_425);
+			Query1.bindValue(":dxf_426",DXF_code_tables[x1].dxf_426);
+			Query1.bindValue(":dxf_427",DXF_code_tables[x1].dxf_427);
+			Query1.bindValue(":dxf_428",DXF_code_tables[x1].dxf_428);
+			Query1.bindValue(":dxf_429",DXF_code_tables[x1].dxf_429);
+			Query1.bindValue(":dxf_430",DXF_code_tables[x1].dxf_430);
+			Query1.bindValue(":dxf_431",DXF_code_tables[x1].dxf_431);
+			Query1.bindValue(":dxf_432",DXF_code_tables[x1].dxf_432);
+			Query1.bindValue(":dxf_433",DXF_code_tables[x1].dxf_433);
+			Query1.bindValue(":dxf_434",DXF_code_tables[x1].dxf_434);
+			Query1.bindValue(":dxf_435",DXF_code_tables[x1].dxf_435);
+			Query1.bindValue(":dxf_436",DXF_code_tables[x1].dxf_436);
+			Query1.bindValue(":dxf_437",DXF_code_tables[x1].dxf_437);
+			Query1.bindValue(":dxf_438",DXF_code_tables[x1].dxf_438);
+			Query1.bindValue(":dxf_439",DXF_code_tables[x1].dxf_439);
+			Query1.bindValue(":dxf_440",DXF_code_tables[x1].dxf_440);
+			Query1.bindValue(":dxf_441",DXF_code_tables[x1].dxf_441);
+			Query1.bindValue(":dxf_442",DXF_code_tables[x1].dxf_442);
+			Query1.bindValue(":dxf_443",DXF_code_tables[x1].dxf_443);
+			Query1.bindValue(":dxf_444",DXF_code_tables[x1].dxf_444);
+			Query1.bindValue(":dxf_445",DXF_code_tables[x1].dxf_445);
+			Query1.bindValue(":dxf_446",DXF_code_tables[x1].dxf_446);
+			Query1.bindValue(":dxf_447",DXF_code_tables[x1].dxf_447);
+			Query1.bindValue(":dxf_448",DXF_code_tables[x1].dxf_448);
+			Query1.bindValue(":dxf_449",DXF_code_tables[x1].dxf_449);
+			Query1.bindValue(":dxf_450",DXF_code_tables[x1].dxf_450);
+			Query1.bindValue(":dxf_451",DXF_code_tables[x1].dxf_451);
+			Query1.bindValue(":dxf_452",DXF_code_tables[x1].dxf_452);
+			Query1.bindValue(":dxf_453",DXF_code_tables[x1].dxf_453);
+			Query1.bindValue(":dxf_454",DXF_code_tables[x1].dxf_454);
+			Query1.bindValue(":dxf_455",DXF_code_tables[x1].dxf_455);
+			Query1.bindValue(":dxf_456",DXF_code_tables[x1].dxf_456);
+			Query1.bindValue(":dxf_457",DXF_code_tables[x1].dxf_457);
+			Query1.bindValue(":dxf_458",DXF_code_tables[x1].dxf_458);
+			Query1.bindValue(":dxf_459",DXF_code_tables[x1].dxf_459);
+
+
+			Query1.bindValue(":dxf_460",DXF_code_tables[x1].dxf_460);
+			Query1.bindValue(":dxf_461",DXF_code_tables[x1].dxf_461);
+			Query1.bindValue(":dxf_462",DXF_code_tables[x1].dxf_462);
+			Query1.bindValue(":dxf_463",DXF_code_tables[x1].dxf_463);
+			Query1.bindValue(":dxf_464",DXF_code_tables[x1].dxf_464);
+			Query1.bindValue(":dxf_465",DXF_code_tables[x1].dxf_465);
+			Query1.bindValue(":dxf_466",DXF_code_tables[x1].dxf_466);
+			Query1.bindValue(":dxf_467",DXF_code_tables[x1].dxf_467);
+			Query1.bindValue(":dxf_468",DXF_code_tables[x1].dxf_468);
+			Query1.bindValue(":dxf_469",DXF_code_tables[x1].dxf_469);
+			Query1.bindValue(":dxf_470",DXF_code_tables[x1].dxf_470);
+			Query1.bindValue(":dxf_471",DXF_code_tables[x1].dxf_471);
+			Query1.bindValue(":dxf_472",DXF_code_tables[x1].dxf_472);
+			Query1.bindValue(":dxf_473",DXF_code_tables[x1].dxf_473);
+			Query1.bindValue(":dxf_474",DXF_code_tables[x1].dxf_474);
+			Query1.bindValue(":dxf_475",DXF_code_tables[x1].dxf_475);
+			Query1.bindValue(":dxf_476",DXF_code_tables[x1].dxf_476);
+			Query1.bindValue(":dxf_477",DXF_code_tables[x1].dxf_477);
+			Query1.bindValue(":dxf_478",DXF_code_tables[x1].dxf_478);
+			Query1.bindValue(":dxf_479",DXF_code_tables[x1].dxf_479);
+			Query1.bindValue(":dxf_480",DXF_code_tables[x1].dxf_480);
+			Query1.bindValue(":dxf_481",DXF_code_tables[x1].dxf_481);
+			Query1.bindValue(":dxf_482",DXF_code_tables[x1].dxf_482);
+			Query1.bindValue(":dxf_483",DXF_code_tables[x1].dxf_483);
+			Query1.bindValue(":dxf_484",DXF_code_tables[x1].dxf_484);
+			Query1.bindValue(":dxf_485",DXF_code_tables[x1].dxf_485);
+			Query1.bindValue(":dxf_486",DXF_code_tables[x1].dxf_486);
+			Query1.bindValue(":dxf_487",DXF_code_tables[x1].dxf_487);
+			Query1.bindValue(":dxf_488",DXF_code_tables[x1].dxf_488);
+			Query1.bindValue(":dxf_489",DXF_code_tables[x1].dxf_489);
+
+
+			Query1.bindValue(":dxf_999",DXF_code_tables[x1].dxf_999);
+
+
+			Query1.bindValue(":dxf_1000",DXF_code_tables[x1].dxf_1000);
+			Query1.bindValue(":dxf_1001",DXF_code_tables[x1].dxf_1001);
+			Query1.bindValue(":dxf_1002",DXF_code_tables[x1].dxf_1002);
+			Query1.bindValue(":dxf_1003",DXF_code_tables[x1].dxf_1003);
+			Query1.bindValue(":dxf_1004",DXF_code_tables[x1].dxf_1004);
+			Query1.bindValue(":dxf_1005",DXF_code_tables[x1].dxf_1005);
+			Query1.bindValue(":dxf_1006",DXF_code_tables[x1].dxf_1006);
+			Query1.bindValue(":dxf_1007",DXF_code_tables[x1].dxf_1007);
+			Query1.bindValue(":dxf_1008",DXF_code_tables[x1].dxf_1008);
+			Query1.bindValue(":dxf_1009",DXF_code_tables[x1].dxf_1009);
+			Query1.bindValue(":dxf_1010",DXF_code_tables[x1].dxf_1010);
+			Query1.bindValue(":dxf_1011",DXF_code_tables[x1].dxf_1011);
+			Query1.bindValue(":dxf_1012",DXF_code_tables[x1].dxf_1012);
+			Query1.bindValue(":dxf_1013",DXF_code_tables[x1].dxf_1013);
+			Query1.bindValue(":dxf_1014",DXF_code_tables[x1].dxf_1014);
+			Query1.bindValue(":dxf_1015",DXF_code_tables[x1].dxf_1015);
+			Query1.bindValue(":dxf_1016",DXF_code_tables[x1].dxf_1016);
+			Query1.bindValue(":dxf_1017",DXF_code_tables[x1].dxf_1017);
+			Query1.bindValue(":dxf_1018",DXF_code_tables[x1].dxf_1018);
+			Query1.bindValue(":dxf_1019",DXF_code_tables[x1].dxf_1019);
+			Query1.bindValue(":dxf_1020",DXF_code_tables[x1].dxf_1020);
+			Query1.bindValue(":dxf_1021",DXF_code_tables[x1].dxf_1021);
+			Query1.bindValue(":dxf_1022",DXF_code_tables[x1].dxf_1022);
+			Query1.bindValue(":dxf_1023",DXF_code_tables[x1].dxf_1023);
+			Query1.bindValue(":dxf_1024",DXF_code_tables[x1].dxf_1024);
+			Query1.bindValue(":dxf_1025",DXF_code_tables[x1].dxf_1025);
+			Query1.bindValue(":dxf_1026",DXF_code_tables[x1].dxf_1026);
+			Query1.bindValue(":dxf_1027",DXF_code_tables[x1].dxf_1027);
+			Query1.bindValue(":dxf_1028",DXF_code_tables[x1].dxf_1028);
+			Query1.bindValue(":dxf_1029",DXF_code_tables[x1].dxf_1029);
+			Query1.bindValue(":dxf_1030",DXF_code_tables[x1].dxf_1030);
+			Query1.bindValue(":dxf_1031",DXF_code_tables[x1].dxf_1031);
+			Query1.bindValue(":dxf_1032",DXF_code_tables[x1].dxf_1032);
+			Query1.bindValue(":dxf_1033",DXF_code_tables[x1].dxf_1033);
+			Query1.bindValue(":dxf_1034",DXF_code_tables[x1].dxf_1034);
+			Query1.bindValue(":dxf_1035",DXF_code_tables[x1].dxf_1035);
+			Query1.bindValue(":dxf_1036",DXF_code_tables[x1].dxf_1036);
+			Query1.bindValue(":dxf_1037",DXF_code_tables[x1].dxf_1037);
+			Query1.bindValue(":dxf_1038",DXF_code_tables[x1].dxf_1038);
+			Query1.bindValue(":dxf_1039",DXF_code_tables[x1].dxf_1039);
+			Query1.bindValue(":dxf_1040",DXF_code_tables[x1].dxf_1040);
+			Query1.bindValue(":dxf_1041",DXF_code_tables[x1].dxf_1041);
+			Query1.bindValue(":dxf_1042",DXF_code_tables[x1].dxf_1042);
+			Query1.bindValue(":dxf_1043",DXF_code_tables[x1].dxf_1043);
+			Query1.bindValue(":dxf_1044",DXF_code_tables[x1].dxf_1044);
+			Query1.bindValue(":dxf_1045",DXF_code_tables[x1].dxf_1045);
+			Query1.bindValue(":dxf_1046",DXF_code_tables[x1].dxf_1046);
+			Query1.bindValue(":dxf_1047",DXF_code_tables[x1].dxf_1047);
+			Query1.bindValue(":dxf_1048",DXF_code_tables[x1].dxf_1048);
+			Query1.bindValue(":dxf_1049",DXF_code_tables[x1].dxf_1049);
+			Query1.bindValue(":dxf_1050",DXF_code_tables[x1].dxf_1050);
+			Query1.bindValue(":dxf_1051",DXF_code_tables[x1].dxf_1051);
+			Query1.bindValue(":dxf_1052",DXF_code_tables[x1].dxf_1052);
+			Query1.bindValue(":dxf_1053",DXF_code_tables[x1].dxf_1053);
+			Query1.bindValue(":dxf_1054",DXF_code_tables[x1].dxf_1054);
+			Query1.bindValue(":dxf_1055",DXF_code_tables[x1].dxf_1055);
+			Query1.bindValue(":dxf_1056",DXF_code_tables[x1].dxf_1056);
+			Query1.bindValue(":dxf_1057",DXF_code_tables[x1].dxf_1057);
+			Query1.bindValue(":dxf_1058",DXF_code_tables[x1].dxf_1058);
+			Query1.bindValue(":dxf_1059",DXF_code_tables[x1].dxf_1059);
+			Query1.bindValue(":dxf_1060",DXF_code_tables[x1].dxf_1060);
+			Query1.bindValue(":dxf_1061",DXF_code_tables[x1].dxf_1061);
+			Query1.bindValue(":dxf_1062",DXF_code_tables[x1].dxf_1062);
+			Query1.bindValue(":dxf_1063",DXF_code_tables[x1].dxf_1063);
+			Query1.bindValue(":dxf_1064",DXF_code_tables[x1].dxf_1064);
+			Query1.bindValue(":dxf_1065",DXF_code_tables[x1].dxf_1065);
+			Query1.bindValue(":dxf_1066",DXF_code_tables[x1].dxf_1066);
+			Query1.bindValue(":dxf_1067",DXF_code_tables[x1].dxf_1067);
+			Query1.bindValue(":dxf_1068",DXF_code_tables[x1].dxf_1068);
+			Query1.bindValue(":dxf_1069",DXF_code_tables[x1].dxf_1069);
+			Query1.bindValue(":dxf_1070",DXF_code_tables[x1].dxf_1070);
+			Query1.bindValue(":dxf_1071",DXF_code_tables[x1].dxf_1071);
+
+			//x10++;
+			x2=Query1.exec();
+
+		//x2=Query1.exec();
+		x1++;
+
+	}
+
+
+	//m_db.exec(QsqlString);
+
+	m_db.commit();
+	return Record_count_lines;
+}
+
+void dbManager::dbManager_load_dxf(const QString &pathname)
+{
+	//m_db.database().transaction();
+	m_db.transaction();
+
+	QSqlTableModel dxf_tabel1;
+	dxf_tabel1.setTable("dxf_file");
+	dxf_tabel1.select();
+
+	QTableView dxf_table_view;
+	dxf_table_view.setModel(&dxf_tabel1);
+
+
+	QSqlRecord dxf_lines=dxf_tabel1.record();
+
+	dxf_line_count=0;
+	count_input=0;
+	dxf_line_count_max=DXF_main_base[0].dxf_input.count();
+
+	dxf_list1.clear();
+	dxf_list2.clear();
+	dxf_list3.clear();
+	dxf_list4.clear();
+
+	//dxf_tabel1.database().transaction();
+
+	while (dxf_line_count<dxf_line_count_max-1)
+	{
+		if ((QString(DXF_main_base[0].dxf_input[dxf_line_count]).toInt()==0) and (DXF_main_base[0].dxf_input[dxf_line_count+1]=="SECTION"))
+		{
+			dxf_section=DXF_main_base[0].dxf_input[dxf_line_count+3];
+		}
+
+
+		dxf_lines.setValue("Index_count", QString::number(count_input));
+		//dxf_list1.append(QString::number(count_input));
+
+		dxf_lines.setValue("Code",DXF_main_base[0].dxf_input[dxf_line_count]);
+		//dxf_list2.append(DXF_main_base[0].dxf_input[dxf_line_count]);
+
+		dxf_lines.setValue("Waarde",DXF_main_base[0].dxf_input[dxf_line_count+1]);
+		//dxf_list3.append(DXF_main_base[0].dxf_input[dxf_line_count+1]);
+
+		dxf_lines.setValue("Section",dxf_section);
+		//dxf_list4.append(dxf_section);
+
+
+
+		dxf_line_count++;
+
+		dxf_line_count++;
+
+
+		count_input++;
+
+		//dxf_table_view<-dxf_lines;
+
+
+
+		dxf_tabel1.insertRecord(-1,dxf_lines);
+		//dxf_tabel1.submit();
+
+	}
+	//dxf_tabel1.submitAll();
+
+	//m_db.database().commit();
+	m_db.database().commit();
+
+
+}
+
+void dbManager::dbManager_create_elmt_entitie (const QString &pathname, int64_t Index_count_1,QString Block_naam_1, QString Block_value_1)
+{
+
+	QSqlQuery Query_entitie;
+
+	Qsql_entitie = "INSERT INTO table_elmt_entities (Index_count, Block_Naam, Block_value";
+	Qsql_entitie.append(")");
+	Qsql_entitie.append(" VALUES (:Index_count, :Block_Naam, :Block_value");
+	Qsql_entitie.append(")");
+
+	Query_entitie.prepare(Qsql_entitie);
+
+	Query_entitie.bindValue(":Index_count",Index_count_1);
+	Query_entitie.bindValue("Block_Naam",Block_naam_1);
+	Query_entitie.bindValue(":Block_value",Block_value_1);
+
+	//Query_entitie.prepare(Qsql_entitie);
+
+	Query_entitie.exec();
+
+
+}
+
+void dbManager::dbManager_create_elmt_block (const QString &pathname, int64_t Index_count_2,QString Block_naam_2, QString Block_value_2)
+{
+	QSqlQuery Query_block;
+
+	Qsql_Block = "INSERT INTO table_elmt_entities (Index_count, Block_Naam, Block_value";
+	Qsql_Block.append(")");
+	Qsql_Block.append(" VALUES (:Index_count, :Block_Naam, :Block_value");
+	Qsql_Block.append(")");
+
+	Query_block.prepare(Qsql_Block);
+
+	Query_block.bindValue(":Index_count",Index_count_2);
+	Query_block.bindValue("Block_Naam",Block_naam_2);
+	Query_block.bindValue(":Block_value",Block_value_2);
+
+	//Query_block.prepare(Qsql_Block);
+
+	Query_block.exec();
+}
+
+
+void dbManager::dbManager_load_dxf_list(const QString &pathname)
+{
+	QSqlQuery Query_List;
+
+	Qsql_List="INSERT INTO table_list (Index_count primary key, Code) ";
+	Qsql_List.append("VALUES (:Indec_count, :Code)");
+
+	Query_List.prepare(Qsql_List);
+
+	dxf_line_count_max=DXF_main_base[0].dxf_input.count();
+	count_input=0;
+
+	dxf_list1.clear();
+
+	while (count_input<dxf_line_count_max-1)
+	{
+
+		dxf_list1.append(count_input);
+		dxf_list1.append(DXF_main_base[0].dxf_input[count_input]);
+		count_input++;
+
+
+
+
+	}
+
+	Query_List.addBindValue(dxf_list1);
+	Query_List.exec();
+
+}
+
+QString dbManager::db_split_header(const QString &pathname)
+{
+	/*m_db.transaction();
+
+	QSqlTableModel dxf_tabel1;
+	dxf_tabel1.setTable("dxf_file");
+	dxf_tabel1.setFilter(Section='HEADER');
+	dxf_tabel1.select();
+
+	QSqlRecord dxf_file_lines=dxf_tabel1.record();
+
+
+	QSqlTableModel dxf_header1;
+	dxf_header1.setTable("dxf_header");
+	dxf_header1.select();
+
+	dxf_header1.clear();
+
+	QSqlRecord dxf_header_lines=dxfheader1.record();
+
+
+
+	m_db.commit();*/
+}

Added: branches/DXFtoQET3_DB/db/dbmanager.h
===================================================================
--- branches/DXFtoQET3_DB/db/dbmanager.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/db/dbmanager.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,94 @@
+#ifndef DBMANAGER_H
+#define DBMANAGER_H
+
+#include <QWidget>
+#include <QObject>
+
+#include <QSql>
+#include <QSqlDatabase>
+#include <QSqlQuery>
+#include <QMessageBox>
+
+#include <QtWidgets>
+#include <QTableView>
+#include <QTextStream>
+#include <QFileDialog>
+#include <QFile>
+#include <QModelIndex>
+#include <QSettings>
+#include <QDateTime>
+#include <QPlainTextEdit>
+#include <QSqlTableModel>
+#include <QSqlRecord>
+
+#include "data.h"
+
+
+
+class dbManager : public QWidget
+{
+	Q_OBJECT
+	public:
+	explicit dbManager(QWidget *parent = 0 );
+
+	int x1;
+	int x2;
+	int x10;
+
+	int Command_Count;
+	int Max_count_lines;
+	int Record_count_lines;
+
+	int32_t dxf_line_count;
+	int32_t dxf_line_count_max;
+	int32_t count_input;
+
+	QString QsqlString;
+	QString QsqlString2;
+	QString Qsqlstring3;
+	QString dxf_section;
+
+	QString Qsql_Block;
+	QString Qsql_entitie;
+	QString Qsql_List;
+
+	QString Waarde1;
+	QString Waarde2;
+
+
+
+	QString RecordNr;
+
+	QVariantList dxf_list1;
+	QVariantList dxf_list2;
+	QVariantList dxf_list3;
+	QVariantList dxf_list4;
+	void dbManager1(const QString &pathname);
+
+	void dbManager_close(const QString &pathname);
+
+	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);
+
+	void dbManager_load_dxf(const QString &pathname);
+
+	void dbManager_load_dxf_list(const QString &pathname);
+
+	void dbManager_create_elmt_entitie(const QString &pathname, int64_t Index_count_1,QString Block_naam_1, QString Block_value_1);
+
+	void dbManager_create_elmt_block(const QString &pathname, int64_t Index_count_2, QString Block_naam_2, QString Block_value_2);
+
+	QString db_split_header(const QString &pathname);
+
+	signals:
+
+
+
+	public slots:
+
+	private:
+		QSqlDatabase m_db;
+};
+
+#endif // DBMANAGER_H

Added: branches/DXFtoQET3_DB/dxftoqet3db.cpp
===================================================================
--- branches/DXFtoQET3_DB/dxftoqet3db.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/dxftoqet3db.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,5479 @@
+#include "dxftoqet3db.h"
+#include "ui_dxftoqet3db.h"
+
+extern struct DXF_base DXF_main_base[DXF_base_set];
+extern struct DXF_codes DXF_code_tables[DXF_codes_set];
+
+extern struct DXF_codes DXF_codes_tables_empty;
+//static const struct x EmptyStruct[DXF_codes_set][DXF_codeset_copies];
+
+extern struct DXF_var DXF_variable;
+extern struct DXF_Layers DXF_Layer_list[DXF_layers_set];
+extern struct DXF_Entities DXF_Entities_List;
+
+DXFtoQET3DB::DXFtoQET3DB(QWidget *parent) :
+	QWidget(parent),
+	ui(new Ui::DXFtoQET3DB)
+{
+
+	ui->setupUi(this);
+
+	QCoreApplication::setOrganizationName("rds");
+	QCoreApplication::setApplicationName("DXFtoQET3_DB");
+
+	QSettings settings;
+
+	//data ActifData;
+
+	if (!settings.contains("dxf_path"))
+	{
+		settings.setValue("dxf_path","..");
+	}
+	if (!settings.contains("qet_element_path"))
+	{
+		settings.setValue("qet_element_path","..");
+	}
+
+	settings.sync();
+
+
+
+	DXF_main_base[0].dxf_filepath = settings.value("dxf_path").toString();
+
+
+	DXF_main_base[0].dxf_savepath = settings.value("qet_element_path").toString();
+
+	ui->dxf_file_path_save->setText(DXF_main_base[0].dxf_filepath);
+
+	ui->QET_user_symbole_path_save->setText(DXF_main_base[0].dxf_savepath);
+	ui->MainTab->repaint();
+
+
+}
+
+DXFtoQET3DB::~DXFtoQET3DB()
+{
+	delete ui;
+}
+
+void DXFtoQET3DB::changeEvent(QEvent *e)
+{
+	QWidget::changeEvent(e);
+	switch (e->type()) {
+		case QEvent::LanguageChange:
+			ui->retranslateUi(this);
+			break;
+		default:
+			break;
+	}
+}
+
+
+void DXFtoQET3DB::on_OpenFile_clicked()
+{
+	ui->MainTab->setCurrentIndex(0);
+	ui->MainTab->repaint();
+
+	ui->dxf_log->activateWindow();
+	ui->dxf_file_path_save->setText(DXF_main_base[0].dxf_savepath);
+	ui->QET_user_symbole_path_save->setText(DXF_main_base[0].dxf_filepath);
+
+	main_sw1=0;
+	main_sw2=0;
+	main_sw3=0;
+
+	DXF_main_base[0].DXF_file_loaded_into_table=-1;
+
+	// open file dialog
+
+	ui->dxf_log->clear();
+
+	ui->dxf_log->insertPlainText(QTime::currentTime().toString());
+	ui->dxf_log->insertPlainText(" -> Open file \n");
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	QFileDialog dialog(this);
+	dialog.setNameFilter(tr("DXF files (*.dxf *.DXF *.csv *.CSV)"));
+	dialog.setFileMode(QFileDialog::ExistingFile);
+	dialog.setViewMode(QFileDialog::Detail);
+
+
+	if (dialog.exec() == QDialog::Accepted)
+	{
+		DXF_main_base[0].dxf_filepath = dialog.selectedFiles().first();
+
+
+		DXF_main_base[0].dxf_dir = dialog.directory().absolutePath();
+		DXF_main_base[0].dxf_openfile=DXF_main_base[0].dxf_filepath.split("/").last();
+		//DXF_main_base[0].dxf_savepath=Config_QET_User_Symbols;//"../.qet/elements"; //DXF_main_base[0].dxf_dir;
+
+		ui->dxf_file_path_save->setText(DXF_main_base[0].dxf_savepath);
+
+		FileType=DXF_main_base[0].dxf_openfile.split(".").last();
+		FileName=DXF_main_base[0].dxf_openfile.split(".").first().toLower();
+
+		Filename2=FileName.remove(QRegExp("[+-/#_=<>]"));
+
+		DXF_main_base[0].dxf_openfile=Filename2.toLower();
+		DXF_main_base[0].dxf_filetype=FileType;
+
+		ui->dxf_log->insertPlainText(DXF_main_base[0].dxf_openfile);
+		ui->dxf_log->insertPlainText("\n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+
+		//DXF_main_base[0].DXF_ELMT_Name_text_en=FileName;
+		//DXF_main_base[0].DXF_ELMT_Name_text_fr=FileName;
+
+		//ui->elmt_lang_en->setText(FileName);
+		//ui->elmt_lang_fr->setText(FileName);
+
+		QFile file(DXF_main_base[0].dxf_filepath);
+		if (!file.open(QFile::ReadOnly | QFile::Text))
+		{
+			QMessageBox::warning(this, tr("Application"),
+					  tr("Cannot read file %1:\n%2.").arg(DXF_main_base[0].dxf_filepath).arg("binary or other non standard dxf file"));
+
+		}
+
+		ui->dxf_file_path->setPlaceholderText(DXF_main_base[0].dxf_dir);
+		ui->dxf_open_file->setPlaceholderText(DXF_main_base[0].dxf_openfile);
+
+		status1="read file ";
+		status1.append(FileName);
+		status1.append(" into program \n");
+
+		ui->dxf_log->insertPlainText(status1);
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+
+		QTextStream in(&file);
+		DXF_main_base[0].dxf_text_all = in.readAll();
+
+		file.close();
+
+		ui->dxf_file_loaded->setPlainText(DXF_main_base[0].dxf_text_all);
+		ui->dxf_file_loaded->show();
+
+		dxf_line_count1=DXF_main_base[0].dxf_text_all.count();
+
+		ui->dxf_line_count1->setText(QString::number(dxf_line_count1,'f',0));
+
+		ui->dxf_log->insertPlainText("check file for correct type of file \n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+
+		dxf_load dxf_lf(this);
+
+		dxf_lf.dxf_header_split();
+
+		dxf_line_count2=DXF_main_base[0].dxf_input.count();
+
+		main_sw1=dxf_lf.dxf_check_file();
+
+		if (FileType=="csv" or FileType=="CSV")
+		{
+			main_sw2=1;
+			main_sw3=0;
+
+			ui->dxf_log->insertPlainText("file of type CSV \n");
+
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+
+			//dxf_lf.dxf_csv_split();
+
+			//int32_t dxf_line_count2=DXF_main_base[0].dxf_csv_line_count;
+			//ui->dxf_line_count2->setText(QString::number(dxf_line_count2,'f',0));
+		}
+		else
+		{
+			main_sw2=0;
+		}
+
+		if (FileType=="dxf" or FileType=="DXF")
+		{
+
+			main_sw3=1;
+			main_sw2=0;
+
+			ui->dxf_log->insertPlainText("file of type DXF \n");
+
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+		}
+		else
+		{
+			main_sw3=0;
+		}
+
+		if (main_sw1==1 and main_sw2==0)
+		{
+			ui->dxf_log->insertPlainText("file of type ASCII DXF \n");
+
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+		}
+
+		if (main_sw1==0 and main_sw2==0)
+		{
+
+			ui->dxf_log->insertPlainText("file of type BINARY DXF \n");
+
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+		}
+
+
+
+	}
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	return;
+}
+
+void DXFtoQET3DB::on_savepath_2_clicked()
+{
+
+	QSettings settings;
+
+	Config_QET_User_Symbols = QFileDialog::getExistingDirectory(this, tr("Open Directory"),DXF_main_base[0].dxf_dir ,QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
+
+	ui->QET_user_symbole_path_save->setText(Config_QET_User_Symbols);
+
+	if (!settings.contains("qet_element_path"))
+	{
+		settings.setValue("qet_element_path",Config_QET_User_Symbols);
+	}
+	else
+	{
+		settings.setValue("qet_element_path",Config_QET_User_Symbols);
+	}
+
+	settings.sync();
+
+	DXF_main_base[0].dxf_savepath=Config_QET_User_Symbols;
+}
+
+void DXFtoQET3DB::on_Load_dxf_into_tables_clicked()
+{
+	ui->MainTab->setCurrentIndex(0);
+	ui->MainTab->repaint();
+
+	Filename_db=DXF_main_base[0].dxf_savepath + "/" +FileName;
+	Filename_db.append(".db3");
+
+	on_Delete_DB_clicked();
+
+	ui->dxf_log->activateWindow();
+	ui->dxf_log->insertPlainText(QTime::currentTime().toString());
+	ui->dxf_log->insertPlainText("=> Start loading dxf file into tables \n");
+
+	ui->dxf_log->insertPlainText("Creating DB : ");
+	ui->dxf_log->insertPlainText(FileName);
+	ui->dxf_log->insertPlainText(" \n");
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	//dbManager mydb;
+
+	//Filename_db=FileName;
+	//Filename_db.append(".db3");
+
+	ui->dxf_log->insertPlainText("created : ");
+	ui->dxf_log->insertPlainText("Filename_db");
+	ui->dxf_log->insertPlainText("\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	mydb.dbManager1(Filename_db);
+
+	ui->dxf_log->insertPlainText("creating tables \n");
+	ui->dxf_log->insertPlainText("============================================================================\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	mydb.dbManager_create_tables(FileName);
+
+
+	//mydb.dbManager_load_dxf(FileName);
+	//mydb.dbManager_load_dxf_list(FileName);
+
+	/*ui->dxf_log->insertPlainText("load dxf file into database \n");
+	ui->dxf_log->insertPlainText("============================================================================\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();*/
+
+	dxf_split_count1=DXF_main_base[0].dxf_input.count();
+
+	counter1=0;
+
+	ui->dxf_log->insertPlainText("total characters : ");
+	ui->dxf_log->insertPlainText(QString::number(dxf_line_count1));
+	ui->dxf_log->insertPlainText("\n");
+
+	ui->dxf_log->insertPlainText("total lines : ");
+	ui->dxf_log->insertPlainText(QString::number(dxf_line_count2));
+	ui->dxf_log->insertPlainText("\n");
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+
+
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	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");
+
+	ui->dxf_log->insertPlainText("index header : ");
+	ui->dxf_log->insertPlainText(QString::number(index_header));
+	ui->dxf_log->insertPlainText("\n");
+
+	ui->dxf_log->insertPlainText("index classes : ");
+	ui->dxf_log->insertPlainText(QString::number(index_classes));
+	ui->dxf_log->insertPlainText("\n");
+
+	ui->dxf_log->insertPlainText("index tables : ");
+	ui->dxf_log->insertPlainText(QString::number(index_tables));
+	ui->dxf_log->insertPlainText("\n");
+
+	ui->dxf_log->insertPlainText("index blocks : ");
+	ui->dxf_log->insertPlainText(QString::number(index_blocks));
+	ui->dxf_log->insertPlainText("\n");
+
+	ui->dxf_log->insertPlainText("index entities : ");
+	ui->dxf_log->insertPlainText(QString::number(index_entities));
+	ui->dxf_log->insertPlainText("\n");
+
+	ui->dxf_log->insertPlainText("index objects : ");
+	ui->dxf_log->insertPlainText(QString::number(index_objects));
+	ui->dxf_log->insertPlainText("\n");
+
+	ui->dxf_log->insertPlainText("index thumbnailimage : ");
+	ui->dxf_log->insertPlainText(QString::number(index_thumbnailimage));
+	ui->dxf_log->insertPlainText("\n");
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	section_lengts();
+	copy_list();
+
+	if (index_header!=-1)
+	{
+		split_header();
+
+	}
+	else
+	{
+		ui->dxf_log->insertPlainText("no HEADER list to split ");
+
+		ui->dxf_log->insertPlainText("\n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+	}
+
+	if (index_classes!=-1)
+	{
+		//split_classes();
+	}
+	else
+	{
+		ui->dxf_log->insertPlainText("no CLASSES list to split ");
+
+		ui->dxf_log->insertPlainText("\n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+	}
+
+	if (index_tables!=-1)
+	{
+		split_tables();
+	}
+	else
+	{
+		ui->dxf_log->insertPlainText("no TABLES list to split ");
+
+		ui->dxf_log->insertPlainText("\n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+	}
+
+
+	if (index_blocks!=-1)
+	{
+		split_blocks();
+	}
+	else
+	{
+		ui->dxf_log->insertPlainText("no BLOCKS list to split ");
+
+		ui->dxf_log->insertPlainText("\n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+	}
+
+
+	if (index_entities!=-1)
+	{
+		split_entities();
+	}
+	else
+	{
+		ui->dxf_log->insertPlainText("no ENTITIES list to split ");
+
+		ui->dxf_log->insertPlainText("\n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+	}
+
+	if (index_objects!=-1)
+	{
+		//split_objects();
+		//ui->dxf_log->insertPlainText("OBJECTS split disabled ");
+
+		//ui->dxf_log->insertPlainText("\n");
+
+		//ui->dxf_log->moveCursor(QTextCursor::End);
+		//ui->dxf_log->repaint();
+	}
+	else
+	{
+		ui->dxf_log->insertPlainText("no OBJECTS list to split ");
+
+		ui->dxf_log->insertPlainText("\n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+	}
+
+	if (index_thumbnailimage!=-1)
+	{
+		//split_thumbnailimage();
+		ui->dxf_log->insertPlainText("THUMBNAILIMAGE split disabled ");
+
+		ui->dxf_log->insertPlainText("\n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+	}
+	else
+	{
+		ui->dxf_log->insertPlainText("no THUMBNAILIMAGE list to split ");
+
+		ui->dxf_log->insertPlainText("\n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+	}
+
+	mydb.dbManager_close(FileName);
+
+	ui->dxf_log->insertPlainText("End loading into db ");
+	ui->dxf_log->insertPlainText(QTime::currentTime().toString());
+	ui->dxf_log->insertPlainText("\n");
+
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	return;
+}
+
+void DXFtoQET3DB::on_Delete_DB_clicked()
+{
+
+	ui->dxf_log->insertPlainText("deleting ");
+	ui->dxf_log->insertPlainText(Filename_db);
+	ui->dxf_log->insertPlainText("\n");
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+
+	QFile::remove(Filename_db);
+}
+
+void DXFtoQET3DB::section_lengts()
+{
+	ui->dxf_log->insertPlainText("calculating section lengths \n");
+	ui->dxf_log->insertPlainText("\n");
+
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	if (index_header==-1)
+	{
+		ui->dxf_log->insertPlainText("no section HEADER found \n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+	}
+	else
+	{
+		if ((index_classes-index_header)<index_header)
+		{
+			if ((index_tables-index_header)<index_header)
+			{
+				if((index_blocks-index_header)<index_header)
+				{
+					if((index_entities-index_header)<index_header)
+					{
+						if((index_objects-index_header)<index_header)
+						{
+							if((index_thumbnailimage-index_header)<index_header)
+							{
+								lenght_header=dxf_line_count2-index_header;
+								ui->dxf_log->insertPlainText("header lenght : ");
+								ui->dxf_log->insertPlainText(QString::number(dxf_line_count2));
+								ui->dxf_log->insertPlainText(" - ");
+								ui->dxf_log->insertPlainText(QString::number(index_header));
+								ui->dxf_log->insertPlainText(" = ");
+								ui->dxf_log->insertPlainText(QString::number(lenght_header));
+								ui->dxf_log->insertPlainText("\n");
+
+								ui->dxf_log->moveCursor(QTextCursor::End);
+								ui->dxf_log->repaint();
+							}
+							else
+							{
+								lenght_header=index_thumbnailimage-index_header;
+								ui->dxf_log->insertPlainText("header lenght : ");
+								ui->dxf_log->insertPlainText(QString::number(index_thumbnailimage));
+								ui->dxf_log->insertPlainText(" - ");
+								ui->dxf_log->insertPlainText(QString::number(index_header));
+								ui->dxf_log->insertPlainText(" = ");
+								ui->dxf_log->insertPlainText(QString::number(lenght_header));
+								ui->dxf_log->insertPlainText("\n");
+
+								ui->dxf_log->moveCursor(QTextCursor::End);
+								ui->dxf_log->repaint();
+							}
+						}
+						else
+						{
+							lenght_header=index_objects-index_header;
+							ui->dxf_log->insertPlainText("header lenght : ");
+							ui->dxf_log->insertPlainText(QString::number(index_objects));
+							ui->dxf_log->insertPlainText(" - ");
+							ui->dxf_log->insertPlainText(QString::number(index_header));
+							ui->dxf_log->insertPlainText(" = ");
+							ui->dxf_log->insertPlainText(QString::number(lenght_header));
+							ui->dxf_log->insertPlainText("\n");
+
+							ui->dxf_log->moveCursor(QTextCursor::End);
+							ui->dxf_log->repaint();
+
+						}
+					}
+					else
+					{
+						lenght_header=index_entities-index_header;
+						ui->dxf_log->insertPlainText("header lenght : ");
+						ui->dxf_log->insertPlainText(QString::number(index_entities));
+						ui->dxf_log->insertPlainText(" - ");
+						ui->dxf_log->insertPlainText(QString::number(index_header));
+						ui->dxf_log->insertPlainText(" = ");
+						ui->dxf_log->insertPlainText(QString::number(lenght_header));
+						ui->dxf_log->insertPlainText("\n");
+
+						ui->dxf_log->moveCursor(QTextCursor::End);
+						ui->dxf_log->repaint();
+
+					}
+				}
+				else
+				{
+					lenght_header=index_blocks-index_header;
+					ui->dxf_log->insertPlainText("header lenght : ");
+					ui->dxf_log->insertPlainText(QString::number(index_blocks));
+					ui->dxf_log->insertPlainText(" - ");
+					ui->dxf_log->insertPlainText(QString::number(index_header));
+					ui->dxf_log->insertPlainText(" = ");
+					ui->dxf_log->insertPlainText(QString::number(lenght_header));
+					ui->dxf_log->insertPlainText("\n");
+
+					ui->dxf_log->moveCursor(QTextCursor::End);
+					ui->dxf_log->repaint();
+
+				}
+
+			}
+			else
+			{
+				lenght_header=index_tables-index_header;
+				ui->dxf_log->insertPlainText("header lenght : ");
+				ui->dxf_log->insertPlainText(QString::number(index_tables));
+				ui->dxf_log->insertPlainText(" - ");
+				ui->dxf_log->insertPlainText(QString::number(index_header));
+				ui->dxf_log->insertPlainText(" = ");
+				ui->dxf_log->insertPlainText(QString::number(lenght_header));
+				ui->dxf_log->insertPlainText("\n");
+
+				ui->dxf_log->moveCursor(QTextCursor::End);
+				ui->dxf_log->repaint();
+			}
+		}
+		else
+		{
+			lenght_header=index_classes-index_header;
+			ui->dxf_log->insertPlainText("header lenght : ");
+			ui->dxf_log->insertPlainText(QString::number(index_classes));
+			ui->dxf_log->insertPlainText(" - ");
+			ui->dxf_log->insertPlainText(QString::number(index_header));
+			ui->dxf_log->insertPlainText(" = ");
+			ui->dxf_log->insertPlainText(QString::number(lenght_header));
+			ui->dxf_log->insertPlainText("\n");
+
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+		}
+	}
+
+	if (index_classes==-1)
+	{
+		ui->dxf_log->insertPlainText("no section CLASSES found \n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+	}
+	else
+	{
+
+			if ((index_tables-index_classes)<index_classes)
+			{
+				if((index_blocks-index_classes)<index_classes)
+				{
+					if((index_entities-index_classes)<index_classes)
+					{
+						if((index_objects-index_classes)<index_classes)
+						{
+							if((index_thumbnailimage-index_classes)<index_classes)
+							{
+								lenght_classes=dxf_line_count2-index_classes;
+								ui->dxf_log->insertPlainText("classes lenght : ");
+								ui->dxf_log->insertPlainText(QString::number(dxf_line_count2));
+								ui->dxf_log->insertPlainText(" - ");
+								ui->dxf_log->insertPlainText(QString::number(index_classes));
+								ui->dxf_log->insertPlainText(" = ");
+								ui->dxf_log->insertPlainText(QString::number(lenght_classes));
+								ui->dxf_log->insertPlainText("\n");
+
+								ui->dxf_log->moveCursor(QTextCursor::End);
+								ui->dxf_log->repaint();
+							}
+							else
+							{
+								lenght_classes=index_thumbnailimage-index_classes;
+								ui->dxf_log->insertPlainText("classes lenght : ");
+								ui->dxf_log->insertPlainText(QString::number(index_thumbnailimage));
+								ui->dxf_log->insertPlainText(" - ");
+								ui->dxf_log->insertPlainText(QString::number(index_classes));
+								ui->dxf_log->insertPlainText(" = ");
+								ui->dxf_log->insertPlainText(QString::number(lenght_classes));
+								ui->dxf_log->insertPlainText("\n");
+
+								ui->dxf_log->moveCursor(QTextCursor::End);
+								ui->dxf_log->repaint();
+							}
+						}
+						else
+						{
+							lenght_classes=index_objects-index_classes;
+							ui->dxf_log->insertPlainText("classes lenght : ");
+							ui->dxf_log->insertPlainText(QString::number(index_objects));
+							ui->dxf_log->insertPlainText(" - ");
+							ui->dxf_log->insertPlainText(QString::number(index_classes));
+							ui->dxf_log->insertPlainText(" = ");
+							ui->dxf_log->insertPlainText(QString::number(lenght_classes));
+							ui->dxf_log->insertPlainText("\n");
+
+							ui->dxf_log->moveCursor(QTextCursor::End);
+							ui->dxf_log->repaint();
+
+						}
+					}
+					else
+					{
+						lenght_classes=index_entities-index_classes;
+						ui->dxf_log->insertPlainText("classes lenght : ");
+						ui->dxf_log->insertPlainText(QString::number(index_entities));
+						ui->dxf_log->insertPlainText(" - ");
+						ui->dxf_log->insertPlainText(QString::number(index_classes));
+						ui->dxf_log->insertPlainText(" = ");
+						ui->dxf_log->insertPlainText(QString::number(lenght_classes));
+						ui->dxf_log->insertPlainText("\n");
+
+						ui->dxf_log->moveCursor(QTextCursor::End);
+						ui->dxf_log->repaint();
+
+					}
+				}
+				else
+				{
+					lenght_classes=index_blocks-index_classes;
+					ui->dxf_log->insertPlainText("classes lenght : ");
+					ui->dxf_log->insertPlainText(QString::number(index_blocks));
+					ui->dxf_log->insertPlainText(" - ");
+					ui->dxf_log->insertPlainText(QString::number(index_classes));
+					ui->dxf_log->insertPlainText(" = ");
+					ui->dxf_log->insertPlainText(QString::number(lenght_classes));
+					ui->dxf_log->insertPlainText("\n");
+
+					ui->dxf_log->moveCursor(QTextCursor::End);
+					ui->dxf_log->repaint();
+
+				}
+
+			}
+			else
+			{
+				lenght_header=index_tables-index_header;
+				ui->dxf_log->insertPlainText("header lenght : ");
+				ui->dxf_log->insertPlainText(QString::number(index_tables));
+				ui->dxf_log->insertPlainText(" - ");
+				ui->dxf_log->insertPlainText(QString::number(index_header));
+				ui->dxf_log->insertPlainText(" = ");
+				ui->dxf_log->insertPlainText(QString::number(lenght_header));
+				ui->dxf_log->insertPlainText("\n");
+
+				ui->dxf_log->moveCursor(QTextCursor::End);
+				ui->dxf_log->repaint();
+			}
+
+
+	}
+
+	if (index_tables==-1)
+	{
+		ui->dxf_log->insertPlainText("no section TABLES found \n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+	}
+	else
+	{
+
+		if((index_blocks-index_tables)<index_tables)
+		{
+			if((index_entities-index_tables)<index_tables)
+			{
+				if((index_objects-index_tables)<index_tables)
+				{
+					if((index_thumbnailimage-index_tables)<index_tables)
+					{
+						lenght_tables=dxf_line_count2-index_tables;
+						ui->dxf_log->insertPlainText("tables lenght : ");
+						ui->dxf_log->insertPlainText(QString::number(dxf_line_count2));
+						ui->dxf_log->insertPlainText(" - ");
+						ui->dxf_log->insertPlainText(QString::number(index_tables));
+						ui->dxf_log->insertPlainText(" = ");
+						ui->dxf_log->insertPlainText(QString::number(lenght_tables));
+
+						ui->dxf_log->moveCursor(QTextCursor::End);
+						ui->dxf_log->repaint();
+					}
+					else
+					{
+						lenght_tables=index_thumbnailimage-index_tables;
+						ui->dxf_log->insertPlainText("tables lenght : ");
+						ui->dxf_log->insertPlainText(QString::number(index_thumbnailimage));
+						ui->dxf_log->insertPlainText(" - ");
+						ui->dxf_log->insertPlainText(QString::number(index_tables));
+						ui->dxf_log->insertPlainText(" = ");
+						ui->dxf_log->insertPlainText(QString::number(lenght_tables));
+						ui->dxf_log->insertPlainText("\n");
+
+						ui->dxf_log->moveCursor(QTextCursor::End);
+						ui->dxf_log->repaint();
+					}
+				}
+				else
+				{
+					lenght_tables=index_objects-index_tables;
+					ui->dxf_log->insertPlainText("tables lenght : ");
+					ui->dxf_log->insertPlainText(QString::number(index_objects));
+					ui->dxf_log->insertPlainText(" - ");
+					ui->dxf_log->insertPlainText(QString::number(index_tables));
+					ui->dxf_log->insertPlainText(" = ");
+					ui->dxf_log->insertPlainText(QString::number(lenght_tables));
+					ui->dxf_log->insertPlainText("\n");
+
+					ui->dxf_log->moveCursor(QTextCursor::End);
+					ui->dxf_log->repaint();
+
+				}
+			}
+			else
+			{
+				lenght_tables=index_entities-index_tables;
+				ui->dxf_log->insertPlainText("tables lenght : ");
+				ui->dxf_log->insertPlainText(QString::number(index_entities));
+				ui->dxf_log->insertPlainText(" - ");
+				ui->dxf_log->insertPlainText(QString::number(index_tables));
+				ui->dxf_log->insertPlainText(" = ");
+				ui->dxf_log->insertPlainText(QString::number(lenght_tables));
+				ui->dxf_log->insertPlainText("\n");
+
+				ui->dxf_log->moveCursor(QTextCursor::End);
+				ui->dxf_log->repaint();
+
+			}
+		}
+		else
+		{
+			lenght_tables=index_blocks-index_tables;
+			ui->dxf_log->insertPlainText("tables lenght : ");
+			ui->dxf_log->insertPlainText(QString::number(index_blocks));
+			ui->dxf_log->insertPlainText(" - ");
+			ui->dxf_log->insertPlainText(QString::number(index_tables));
+			ui->dxf_log->insertPlainText(" = ");
+			ui->dxf_log->insertPlainText(QString::number(lenght_tables));
+			ui->dxf_log->insertPlainText("\n");
+
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+
+		}
+
+	}
+
+	if (index_blocks==-1)
+	{
+		ui->dxf_log->insertPlainText("no section BLOCKS found \n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+	}
+	else
+	{
+
+		if((index_entities-index_blocks)<index_blocks)
+		{
+			if((index_objects-index_blocks)<index_blocks)
+			{
+				if((index_thumbnailimage-index_blocks)<index_blocks)
+				{
+					lenght_blocks=dxf_line_count2-index_blocks;
+					ui->dxf_log->insertPlainText("blocks lenght : ");
+					ui->dxf_log->insertPlainText(QString::number(dxf_line_count2));
+					ui->dxf_log->insertPlainText(" - ");
+					ui->dxf_log->insertPlainText(QString::number(index_blocks));
+					ui->dxf_log->insertPlainText(" = ");
+					ui->dxf_log->insertPlainText(QString::number(lenght_blocks));
+					ui->dxf_log->insertPlainText("\n");
+
+					ui->dxf_log->moveCursor(QTextCursor::End);
+					ui->dxf_log->repaint();
+				}
+				else
+				{
+					lenght_blocks=index_thumbnailimage-index_blocks;
+					ui->dxf_log->insertPlainText("blocks lenght : ");
+					ui->dxf_log->insertPlainText(QString::number(index_thumbnailimage));
+					ui->dxf_log->insertPlainText(" - ");
+					ui->dxf_log->insertPlainText(QString::number(index_blocks));
+					ui->dxf_log->insertPlainText(" = ");
+					ui->dxf_log->insertPlainText(QString::number(lenght_blocks));
+					ui->dxf_log->insertPlainText("\n");
+
+					ui->dxf_log->moveCursor(QTextCursor::End);
+					ui->dxf_log->repaint();
+				}
+			}
+			else
+			{
+				lenght_blocks=index_objects-index_blocks;
+				ui->dxf_log->insertPlainText("blocks lenght : ");
+				ui->dxf_log->insertPlainText(QString::number(index_objects));
+				ui->dxf_log->insertPlainText(" - ");
+				ui->dxf_log->insertPlainText(QString::number(index_blocks));
+				ui->dxf_log->insertPlainText(" = ");
+				ui->dxf_log->insertPlainText(QString::number(lenght_blocks));
+				ui->dxf_log->insertPlainText("\n");
+
+				ui->dxf_log->moveCursor(QTextCursor::End);
+				ui->dxf_log->repaint();
+
+			}
+		}
+		else
+		{
+			lenght_blocks=index_entities-index_blocks;
+			ui->dxf_log->insertPlainText("blocks lenght : ");
+			ui->dxf_log->insertPlainText(QString::number(index_entities));
+			ui->dxf_log->insertPlainText(" - ");
+			ui->dxf_log->insertPlainText(QString::number(index_blocks));
+			ui->dxf_log->insertPlainText(" = ");
+			ui->dxf_log->insertPlainText(QString::number(lenght_blocks));
+			ui->dxf_log->insertPlainText("\n");
+
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+
+		}
+
+	}
+
+
+	if (index_entities==-1)
+	{
+		ui->dxf_log->insertPlainText("no section ENTITIES found \n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+	}
+	else
+	{
+
+
+		if((index_objects-index_entities)<index_entities)
+		{
+			if((index_thumbnailimage-index_entities)<index_entities)
+			{
+				lenght_entities=dxf_line_count2-index_entities;
+				ui->dxf_log->insertPlainText("entities lenght : ");
+				ui->dxf_log->insertPlainText(QString::number(dxf_line_count2));
+				ui->dxf_log->insertPlainText(" - ");
+				ui->dxf_log->insertPlainText(QString::number(index_entities));
+				ui->dxf_log->insertPlainText(" = ");
+				ui->dxf_log->insertPlainText(QString::number(lenght_entities));
+				ui->dxf_log->insertPlainText("\n");
+
+				ui->dxf_log->moveCursor(QTextCursor::End);
+				ui->dxf_log->repaint();
+			}
+			else
+			{
+				lenght_entities=index_thumbnailimage-index_entities;
+				ui->dxf_log->insertPlainText("entities lenght : ");
+				ui->dxf_log->insertPlainText(QString::number(index_thumbnailimage));
+				ui->dxf_log->insertPlainText(" - ");
+				ui->dxf_log->insertPlainText(QString::number(index_entities));
+				ui->dxf_log->insertPlainText(" = ");
+				ui->dxf_log->insertPlainText(QString::number(lenght_entities));
+				ui->dxf_log->insertPlainText("\n");
+
+				ui->dxf_log->moveCursor(QTextCursor::End);
+				ui->dxf_log->repaint();
+			}
+		}
+		else
+		{
+			lenght_entities=index_objects-index_entities;
+			ui->dxf_log->insertPlainText("entities lenght : ");
+			ui->dxf_log->insertPlainText(QString::number(index_objects));
+			ui->dxf_log->insertPlainText(" - ");
+			ui->dxf_log->insertPlainText(QString::number(index_entities));
+			ui->dxf_log->insertPlainText(" = ");
+			ui->dxf_log->insertPlainText(QString::number(lenght_entities));
+			ui->dxf_log->insertPlainText("\n");
+
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+
+		}
+
+	}
+
+	if (index_objects==-1)
+	{
+		ui->dxf_log->insertPlainText("no section OBJECTS found \n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+	}
+	else
+	{
+
+		if((index_thumbnailimage-index_objects)<index_objects)
+		{
+			lenght_objects=dxf_line_count2-index_objects;
+			ui->dxf_log->insertPlainText("objects lenght : ");
+			ui->dxf_log->insertPlainText(QString::number(dxf_line_count2));
+			ui->dxf_log->insertPlainText(" - ");
+			ui->dxf_log->insertPlainText(QString::number(index_objects));
+			ui->dxf_log->insertPlainText(" = ");
+			ui->dxf_log->insertPlainText(QString::number(lenght_objects));
+			ui->dxf_log->insertPlainText("\n");
+
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+		}
+		else
+		{
+			lenght_objects=index_thumbnailimage-index_objects;
+			ui->dxf_log->insertPlainText("objects lenght : ");
+			ui->dxf_log->insertPlainText(QString::number(index_thumbnailimage));
+			ui->dxf_log->insertPlainText(" - ");
+			ui->dxf_log->insertPlainText(QString::number(index_objects));
+			ui->dxf_log->insertPlainText(" = ");
+			ui->dxf_log->insertPlainText(QString::number(lenght_objects));
+			ui->dxf_log->insertPlainText("\n");
+
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+		}
+
+	}
+
+	if (index_thumbnailimage==-1)
+	{
+		ui->dxf_log->insertPlainText("no section THUMBNAILIMAGE found \n");
+
+		ui->dxf_log->moveCursor(QTextCursor::End);
+		ui->dxf_log->repaint();
+	}
+	else
+	{
+
+
+		if((dxf_line_count2-index_thumbnailimage)<index_thumbnailimage)
+		{
+			ui->dxf_log->insertPlainText("no header lenght found\n");
+
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+		}
+		else
+		{
+			lenght_thumbnailimage=dxf_line_count2-index_thumbnailimage;
+			ui->dxf_log->insertPlainText("thumbnailimage lenght : ");
+			ui->dxf_log->insertPlainText(QString::number(dxf_line_count2));
+			ui->dxf_log->insertPlainText(" - ");
+			ui->dxf_log->insertPlainText(QString::number(index_thumbnailimage));
+			ui->dxf_log->insertPlainText(" = ");
+			ui->dxf_log->insertPlainText(QString::number(lenght_thumbnailimage));
+			ui->dxf_log->insertPlainText("\n");
+
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+		}
+
+	}
+
+
+
+
+}
+
+void DXFtoQET3DB::copy_list()
+{
+	dxf_header.clear();
+	dxf_classes.clear();
+	dxf_tables.clear();
+	dxf_blocks.clear();
+	dxf_entities.clear();
+	dxf_objects.clear();
+	dxf_thumbnailimage.clear();
+
+	list_header=0;
+	list_classes=0;
+	list_tables=0;
+	list_blocks=0;
+	list_entities=0;
+	list_objects=0;
+	list_thumbnailimage=0;
+
+	max_length=DXF_main_base[0].dxf_input.count();
+
+	max_header=index_header+lenght_header-5;
+	max_classes=index_classes+lenght_classes-5;
+	max_tables=index_tables+lenght_tables-5;
+	max_blocks=index_blocks+lenght_blocks-5;
+	max_entities=index_entities+lenght_entities-5;
+	max_objects=index_objects+lenght_objects-5;
+	max_thumbnailimage=index_thumbnailimage+lenght_thumbnailimage-5;
+
+	/*if (max_header>max_length)
+	{
+		max_header=max_length-1;
+	}
+
+	if (max_classes>max_length)
+	{
+		max_classes=max_length-1;
+	}
+
+	if (max_tables>max_length)
+	{
+		max_tables=max_length-1;
+	}
+
+	if (max_blocks>max_length)
+	{
+		max_blocks=max_length-1;
+	}
+
+	if (max_entities>max_length)
+	{
+		max_entities=max_length-1;
+	}
+
+	if (max_objects>max_length)
+	{
+		max_objects=max_length-1;
+	}
+
+	if (max_thumbnailimage>max_length)
+	{
+		max_thumbnailimage=max_length-1;
+	}*/
+
+
+
+
+
+
+	if (index_header != -1)
+	{
+		for (for1=index_header+1;for1<max_header; for1++)
+		{
+
+			dxf_header.append(DXF_main_base[0].dxf_input[for1]);
+
+		}
+
+		list_header=dxf_header.count();
+	}
+
+	if (index_classes != -1)
+	{
+		for (for1=index_classes+1;for1<max_classes;for1++)
+		{
+
+			dxf_classes.append(DXF_main_base[0].dxf_input[for1]);
+
+		}
+
+		list_classes=dxf_classes.count();
+	}
+
+	if (index_tables != -1)
+	{
+
+		for (for1=index_tables+1;for1<max_tables;for1++)
+		{
+
+			dxf_tables.append(DXF_main_base[0].dxf_input[for1]);
+
+		}
+
+		list_tables=dxf_tables.count();
+	}
+
+	if (index_blocks != -1)
+	{
+		for (for1=index_blocks+1;for1<max_blocks;for1++)
+		{
+
+			dxf_blocks.append(DXF_main_base[0].dxf_input[for1]);
+
+		}
+
+		list_blocks=dxf_blocks.count();
+	}
+
+	if (index_entities != -1)
+	{
+		for (for1=index_entities+1;for1<max_entities;for1++)
+		{
+
+			dxf_entities.append(DXF_main_base[0].dxf_input[for1]);
+
+		}
+
+		list_entities=dxf_entities.count();
+	}
+
+	if (index_objects != -1)
+	{
+		for (for1=index_objects+1;for1<max_objects;for1++)
+		{
+
+			dxf_objects.append(DXF_main_base[0].dxf_input[for1]);
+
+		}
+
+		list_objects=dxf_objects.count();
+	}
+
+	if (index_thumbnailimage != -1)
+	{
+		for (for1=index_thumbnailimage+1;for1<max_thumbnailimage;for1++)
+		{
+
+			dxf_thumbnailimage.append(DXF_main_base[0].dxf_input[for1]);
+
+		}
+
+		list_thumbnailimage=dxf_thumbnailimage.count();
+	}
+
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	return;
+
+}
+
+void DXFtoQET3DB::split_header()
+{
+	header_max_items=dxf_header.count("  9");
+	header_max_count=dxf_header.count();
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	ui->dxf_log->insertPlainText("header items :");
+	ui->dxf_log->insertPlainText(QString::number(header_max_items));
+	ui->dxf_log->insertPlainText("\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	count_header=0;
+	count_header_record_id=1;
+	count_header_lines=0;
+	id_header=1;
+
+	clear_dxf_header_items();
+	clear_split_tables();
+	x1=-1;
+
+	// split input into tempory table
+
+	for (x2=0;x2<header_max_count and header_max_items<DXF_item_split;x2++)
+	{
+
+		if (dxf_header[x2]=="  9")
+		{
+			x1=x1+1;
+			split_tables_list[x1].append(dxf_header[x2]); //??
+		}
+		else
+		{
+			split_tables_list[x1].append(dxf_header[x2]); //??
+		}
+	}
+
+
+	clear_sw_header();
+
+	ui->dxf_log->insertPlainText("Splitting HEADER \n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	max=0;
+	Record_Count_Header=1;
+
+
+
+	clear_dxf_code_tables();
+	ui->dxf_section->clear();
+	ui->dxf_section->insert("Section Header");
+	ui->dxf_log->repaint();
+
+	while (count_header< header_max_items)
+	{
+		text1=QString::number(count_header);
+		ui->dxf_section_count->clear();
+		ui->dxf_section_count->insert(text1);
+		ui->dxf_log->repaint();
+
+		count_header_item=0;
+		x3=split_tables_list[count_header].count();
+
+		if (x3>DXF_codeset_copies)
+		{
+			ui->dxf_log->insertPlainText("============================================================================\n");
+			ui->dxf_log->insertPlainText("Splitting header : out of range subitems acad command \n");
+			ui->dxf_log->insertPlainText(QString::number(x3));
+			ui->dxf_log->insertPlainText(" > ");
+			ui->dxf_log->insertPlainText(QString::number(DXF_codeset_copies));
+			ui->dxf_log->insertPlainText("\n");
+			ui->dxf_log->insertPlainText("============================================================================\n");
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+
+		}
+
+		clear_dxf_code_tables();
+
+
+		// record of temp table split to dxf table
+		max=Split_list("dxf_header", x3, count_header_item, count_header, id_header );
+
+
+
+		Record_Count_Header= mydb.dbManager_added_records(Filename_db, &max,&Record_Count_Header,"dxf_header");
+
+		sw_header[9]=0;
+		sw_header[0]=0;
+
+
+		id_header++;
+
+		count_header++;
+
+
+
+	}
+
+
+
+	return;
+
+}
+
+void DXFtoQET3DB::split_classes()
+{
+	classes_max_items=dxf_classes.count("  0");
+	classes_max_count=dxf_classes.count();
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	ui->dxf_log->insertPlainText("classes items :");
+	ui->dxf_log->insertPlainText(QString::number(classes_max_items));
+	ui->dxf_log->insertPlainText("\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	count_classes=0;
+	count_classes_record_id=1;
+	count_classes_lines=0;
+	id_header=1;
+
+
+	clear_dxf_classes_items();
+	clear_split_tables();
+
+	x1=-1;
+
+	for (x2=0;x2<classes_max_count and classes_max_items<DXF_item_split;x2++)
+	{
+
+		if (dxf_classes[x2]=="  0")
+		{
+			x1=x1+1;
+			split_tables_list[x1].append(dxf_classes[x2]);
+		}
+		else
+		{
+			split_tables_list[x1].append(dxf_classes[x2]);
+		}
+	}
+
+	clear_sw_header();
+
+
+	ui->dxf_log->insertPlainText("Splitting CLASSES \n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	clear_dxf_code_tables();
+
+	max=0;
+	Record_Count_Classes=1;
+
+	//Record_Count_Tables=1;
+
+	clear_dxf_code_tables();
+
+	ui->dxf_section->clear();
+	ui->dxf_section->insert("Section Classes");
+	ui->dxf_log->repaint();
+
+	while (count_classes< classes_max_items)
+	{
+		text1=QString::number(count_classes);
+		ui->dxf_section_count->clear();
+		ui->dxf_section_count->insert(text1);
+		ui->dxf_log->repaint();
+
+		count_classes_item=0;
+
+		//Record_Count_Tables=1;
+
+		x3=split_tables_list[count_classes].count();
+
+		if (x3>DXF_codeset_copies)
+		{
+			ui->dxf_log->insertPlainText("============================================================================\n");
+			ui->dxf_log->insertPlainText("Splitting classes : out of range subitems acad command \n");
+			ui->dxf_log->insertPlainText(QString::number(x3));
+			ui->dxf_log->insertPlainText(" > ");
+			ui->dxf_log->insertPlainText(QString::number(DXF_codeset_copies));
+			ui->dxf_log->insertPlainText("\n");
+			ui->dxf_log->insertPlainText("============================================================================\n");
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+
+		}
+
+		clear_dxf_code_tables();
+
+		max=Split_list("dxf_classes", x3, count_classes_item, count_classes, id_header );
+
+		//Record_Count_Tables++;
+
+		//Record_Count_Tables=Record_Count_Tables+count_classes;
+
+		Record_Count_Tables= mydb.dbManager_added_records(Filename_db, &max,&Record_Count_Tables,"dxf_classes");
+
+		sw_header[0]=0;
+		sw_header[9]=0;
+
+		id_header++;
+
+		count_classes++;
+		//Record_Count_Tables++;
+
+
+
+
+	}
+
+
+
+	return;
+}
+
+void DXFtoQET3DB::split_tables()
+{
+	tables_max_items=dxf_tables.count("  0");
+	tables_max_count=dxf_tables.count();
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	ui->dxf_log->insertPlainText("tables items :");
+	ui->dxf_log->insertPlainText(QString::number(tables_max_items));
+	ui->dxf_log->insertPlainText("\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	count_tables=0;
+	count_tables_record_id=1;
+	count_tables_lines=0;
+	id_header=1;
+
+	clear_dxf_tables_items();
+	clear_split_tables();
+
+	x1=-1;
+
+	for (x2=0;x2<tables_max_count and tables_max_items<DXF_item_split;x2++)
+	{
+
+		if (dxf_tables[x2]=="  0")
+		{
+			x1=x1+1;
+			split_tables_list[x1].append(dxf_tables[x2]);
+		}
+		else
+		{
+			split_tables_list[x1].append(dxf_tables[x2]);
+		}
+	}
+
+	clear_sw_header();
+
+	ui->dxf_log->insertPlainText("Splitting tables \n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	max=0;
+	Record_Count_Tables=1;
+
+	clear_dxf_code_tables();
+
+	ui->dxf_section->clear();
+	ui->dxf_section->insert("Section Tables");
+	ui->dxf_log->repaint();
+
+	while (count_tables< tables_max_items)			
+	{
+		text1=QString::number(count_tables);
+		ui->dxf_section_count->clear();
+		ui->dxf_section_count->insert(text1);
+		ui->dxf_log->repaint();
+
+		count_tables_item=0;
+
+		//Record_Count_Tables=1;
+
+		x3=split_tables_list[count_tables].count();
+
+		if (x3>DXF_codeset_copies)
+		{
+			ui->dxf_log->insertPlainText("============================================================================\n");
+			ui->dxf_log->insertPlainText("Splitting tables : out of range subitems acad command \n");
+			ui->dxf_log->insertPlainText(QString::number(x3));
+			ui->dxf_log->insertPlainText(" > ");
+			ui->dxf_log->insertPlainText(QString::number(DXF_codeset_copies));
+			ui->dxf_log->insertPlainText("\n");
+			ui->dxf_log->insertPlainText("============================================================================\n");
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+
+		}
+
+		clear_dxf_code_tables();
+
+		max=Split_list("dxf_tables", x3, count_tables_item, count_tables, id_header  );
+
+		//Record_Count_Tables++;
+
+		//Record_Count_Tables=Record_Count_Tables+count_tables;
+
+		Record_Count_Tables= mydb.dbManager_added_records(Filename_db, &max,&Record_Count_Tables,"dxf_tables");
+
+		sw_header[0]=0;
+		sw_header[9]=0;
+
+		id_header++;
+
+		count_tables++;
+
+		//Record_Count_Tables++;
+
+
+	}
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	return;
+}
+
+void DXFtoQET3DB::split_blocks()
+{
+	blocks_max_items=dxf_blocks.count("  0");
+	blocks_max_count=dxf_blocks.count();
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+
+	ui->dxf_log->insertPlainText("blocks items :");
+	ui->dxf_log->insertPlainText(QString::number(blocks_max_items));
+	ui->dxf_log->insertPlainText("\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+
+
+	count_blocks=0;
+	count_blocks_record_id=1;
+	count_blocks_lines=0;
+	id_header=1;
+
+	clear_dxf_blocks_items();
+	clear_split_tables();
+
+	x1=-1;
+
+	for (x2=0;x2<blocks_max_count and blocks_max_items<DXF_item_split;x2++)
+	{
+
+		if (dxf_blocks[x2]=="  0")
+		{
+			x1=x1+1;
+			split_tables_list[x1].append(dxf_blocks[x2]);
+		}
+		else
+		{
+			split_tables_list[x1].append(dxf_blocks[x2]);
+		}
+	}
+
+	clear_sw_header();
+
+
+
+	ui->dxf_log->insertPlainText("Splitting BLOCKS \n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	max=0;
+	Record_Count_Blocks=1;
+	//Record_Count_Tables=1;
+
+	clear_dxf_code_tables();
+
+	ui->dxf_section->clear();
+	ui->dxf_section->insert("Section Blocks");
+	ui->dxf_log->repaint();
+
+	while (count_blocks< blocks_max_items)
+	{
+		text1=QString::number(count_blocks);
+		ui->dxf_section_count->clear();
+		ui->dxf_section_count->insert(text1);
+		ui->dxf_log->repaint();
+
+		count_blocks_item=0;
+
+		//Record_Count_Tables=1;
+
+		x3=split_tables_list[count_blocks].count();
+
+		if (x3>DXF_codeset_copies)
+		{
+			ui->dxf_log->insertPlainText("============================================================================\n");
+			ui->dxf_log->insertPlainText("Splitting blocks : out of range subitems acad command \n");
+			ui->dxf_log->insertPlainText(QString::number(x3));
+			ui->dxf_log->insertPlainText(" > ");
+			ui->dxf_log->insertPlainText(QString::number(DXF_codeset_copies));
+			ui->dxf_log->insertPlainText("\n");
+			ui->dxf_log->insertPlainText("============================================================================\n");
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+		}
+
+		clear_dxf_code_tables();
+
+		max=Split_list("dxf_blocks", x3, count_blocks_item, count_blocks , id_header );
+
+		//Record_Count_Tables++;
+
+		//Record_Count_Tables=Record_Count_Tables+count_blocks;
+
+		Record_Count_Blocks= mydb.dbManager_added_records(Filename_db, &max,&Record_Count_Blocks,"dxf_blocks");
+
+		sw_header[0]=0;
+		sw_header[9]=0;
+
+		id_header++;
+
+		count_blocks++;
+
+		//Record_Count_Tables++;
+
+
+
+
+	}
+
+
+
+	return;
+}
+
+void DXFtoQET3DB::split_entities()
+{
+	entities_max_items=dxf_entities.count("  0");
+	entities_max_count=dxf_entities.count();
+	count_entities=0;
+	count_entities_record_id=1;
+	count_entities_lines=0;
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+
+	ui->dxf_log->insertPlainText("entities items :");
+	ui->dxf_log->insertPlainText(QString::number(entities_max_items));
+	ui->dxf_log->insertPlainText("\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+
+	count_entities=0;
+	count_entities_record_id=1;
+	count_entities_lines=0;
+	id_header=1;
+
+	clear_dxf_entities_items();
+	clear_split_tables();
+
+	x1=-1;
+
+	for (x2=0;x2<entities_max_count and entities_max_items<DXF_item_split;x2++)
+	{
+
+		if (dxf_entities[x2]=="  0")
+		{
+			x1=x1+1;
+			split_tables_list[x1].append(dxf_entities[x2]);
+		}
+		else
+		{
+			split_tables_list[x1].append(dxf_entities[x2]);
+		}
+	}
+
+	clear_sw_header();
+
+	ui->dxf_log->insertPlainText("Splitting entities \n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	max=0;
+	Record_Count_Entities=1;
+
+	//Record_Count_Tables=1;
+
+	clear_dxf_code_tables();
+
+
+	count_entities=0;
+
+	ui->dxf_section->clear();
+	ui->dxf_section->insert("Section Entities");
+	ui->dxf_log->repaint();
+
+	while (count_entities< entities_max_items)
+	{
+		text1=QString::number(count_entities);
+		ui->dxf_section_count->clear();
+		ui->dxf_section_count->insert(text1);
+		ui->dxf_log->repaint();
+
+		count_entities_item=0;
+
+		//Record_Count_Tables=1;
+
+		x3=split_tables_list[count_entities].count();
+
+		if (x3>DXF_codeset_copies)
+		{
+			ui->dxf_log->insertPlainText("============================================================================\n");
+			ui->dxf_log->insertPlainText("Splitting entities : out of range subitems acad command \n");
+			ui->dxf_log->insertPlainText(QString::number(x3));
+			ui->dxf_log->insertPlainText(" > ");
+			ui->dxf_log->insertPlainText(QString::number(DXF_codeset_copies));
+			ui->dxf_log->insertPlainText("\n");
+			ui->dxf_log->insertPlainText("============================================================================\n");
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+
+		}
+
+		clear_dxf_code_tables();
+
+		max=Split_list("dxf_entities", x3, count_entities_item, count_entities, id_header  );
+
+		//Record_Count_Tables++;
+
+		//Record_Count_Tables=Record_Count_Tables+count_entities;
+
+		Record_Count_Entities= mydb.dbManager_added_records(Filename_db, &max,&Record_Count_Entities,"dxf_entities");
+
+		sw_header[0]=0;
+		sw_header[9]=0;
+
+		id_header++;
+
+		count_entities++;
+
+		//Record_Count_Tables++;
+
+	}
+
+
+
+	return;
+}
+
+void DXFtoQET3DB::split_objects()
+{
+	objects_max_items=dxf_objects.count("  0");
+	objects_max_count=dxf_objects.count();
+	count_objects=0;
+	count_objects_record_id=1;
+	count_objects_lines=0;
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	ui->dxf_log->insertPlainText("objects items :");
+	ui->dxf_log->insertPlainText(QString::number(objects_max_items));
+	ui->dxf_log->insertPlainText("\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	count_objects=0;
+	count_objects_record_id=1;
+	count_objects_lines=0;
+	id_header=1;
+
+	clear_dxf_tables_items();
+	clear_split_tables();
+
+	x1=-1;
+
+	for (x2=0;x2<objects_max_count and objects_max_items<DXF_item_split;x2++)
+	{
+
+		if (dxf_objects[x2]=="  0")
+		{
+			x1=x1+1;
+			split_tables_list[x1].append(dxf_objects[x2]);
+		}
+		else
+		{
+			split_tables_list[x1].append(dxf_objects[x2]);
+		}
+	}
+
+	clear_sw_header();
+
+	ui->dxf_log->insertPlainText("Splitting objects \n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	max=0;
+	Record_Count_Objects=1;
+
+	//Record_Count_Tables=1;
+
+	clear_dxf_code_tables();
+
+	ui->dxf_section->clear();
+	ui->dxf_section->insert("Section Objects");
+	ui->dxf_log->repaint();
+
+	while (count_objects< objects_max_items)
+	{
+		text1=QString::number(count_objects);
+		ui->dxf_section_count->clear();
+		ui->dxf_section_count->insert(text1);
+		ui->dxf_log->repaint();
+
+		count_object_item=0;
+
+		//Record_Count_Tables=1;
+
+		x3=split_tables_list[count_objects].count();
+
+		if (x3>DXF_codeset_copies)
+		{
+			ui->dxf_log->insertPlainText("============================================================================\n");
+			ui->dxf_log->insertPlainText("Splitting objects : out of range subitems acad command \n");
+			ui->dxf_log->insertPlainText(QString::number(x3));
+			ui->dxf_log->insertPlainText(" > ");
+			ui->dxf_log->insertPlainText(QString::number(DXF_codeset_copies));
+			ui->dxf_log->insertPlainText("\n");
+			ui->dxf_log->insertPlainText("============================================================================\n");
+			ui->dxf_log->moveCursor(QTextCursor::End);
+			ui->dxf_log->repaint();
+
+		}
+
+		clear_dxf_code_tables();
+
+		max=Split_list("dxf_objects", x3, count_object_item, count_objects, id_header  );
+
+		//Record_Count_Tables=Record_Count_Tables+count_objects;
+
+		Record_Count_Objects= mydb.dbManager_added_records(Filename_db, &max,&Record_Count_Objects,"dxf_objects");
+
+		sw_header[0]=0;
+		sw_header[9]=0;
+
+		id_header++;
+
+		count_objects++;
+
+		//Record_Count_Tables++;
+
+	}
+
+
+
+	return;
+}
+
+void DXFtoQET3DB::split_thumbnailimage()
+{
+	thumbnailimage_max_items=dxf_thumbnailimage.count("  0");
+	count_thumbnailimage=0;
+	count_thumbnailimage_record_id=1;
+	count_thumbnailimage_lines=0;
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	ui->dxf_log->insertPlainText("Splitting thumbnailimage \n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	while (count_thumbnailimage< dxf_thumbnailimage.count())
+	{
+
+
+
+		line1=QString(dxf_thumbnailimage[count_thumbnailimage]).toInt();
+		line2=(dxf_thumbnailimage[count_thumbnailimage+1]);
+		switch (line1)
+		{
+			case 0:
+
+			break;
+
+			case 9:
+
+
+			break;
+
+			default:
+
+				ui->dxf_log->insertPlainText("Found code : ");
+				ui->dxf_log->insertPlainText(dxf_thumbnailimage[count_thumbnailimage]);
+				ui->dxf_log->insertPlainText(" | ");
+				ui->dxf_log->insertPlainText(dxf_thumbnailimage[count_thumbnailimage+1]);
+				ui->dxf_log->insertPlainText("\n");
+
+				ui->dxf_log->moveCursor(QTextCursor::End);
+				ui->dxf_log->repaint();
+		}
+
+		count_thumbnailimage=count_thumbnailimage+2;
+
+
+
+		//count_thumbnailimage=count_thumbnailimage+count_thumbnailimage_lines;
+
+	}
+
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	return;
+
+}
+
+void DXFtoQET3DB::clear_sw_header()
+{
+
+	for (x4=0; x4<=1072;x4++)
+	{
+		sw_header[x4]=0;
+	}
+
+}
+
+void DXFtoQET3DB::clear_dxf_header_items()
+{
+
+	for (xclear=0;xclear<DXF_item_split;xclear++)
+	{
+		dxf_header_items[xclear].clear();
+	}
+}
+
+void DXFtoQET3DB::clear_dxf_classes_items()
+{
+
+	for (xclear=0;xclear<DXF_item_split;xclear++)
+	{
+		dxf_classes_items[xclear].clear();
+	}
+}
+
+void DXFtoQET3DB::clear_dxf_tables_items()
+{
+
+	for (xclear=0;xclear<DXF_item_split;xclear++)
+	{
+		dxf_tables_items[xclear].clear();
+	}
+}
+
+void DXFtoQET3DB::clear_dxf_blocks_items()
+{
+
+	for (xclear=0;xclear<DXF_item_split;xclear++)
+	{
+		dxf_blocks_items[xclear].clear();
+	}
+}
+
+void DXFtoQET3DB::clear_dxf_entities_items()
+{
+
+	for (xclear=0;xclear<DXF_item_split;xclear++)
+	{
+		dxf_entities_items[xclear].clear();
+	}
+}
+
+void DXFtoQET3DB::clear_dxf_objects_items()
+{
+
+	for (xclear=0;xclear<DXF_item_split;xclear++)
+	{
+		dxf_objects_items[xclear].clear();
+	}
+}
+
+void DXFtoQET3DB::clear_dxf_thumbnailimage_items()
+{
+
+	for (xclear=0;xclear<DXF_item_split;xclear++)
+	{
+		dxf_thumbnailimage_items[xclear].clear();
+	}
+}
+
+void DXFtoQET3DB::clear_dxf_code_tables()
+{
+
+	for (clear_code_set=0;clear_code_set<DXF_codes_set;clear_code_set++)
+	{
+		//for (int clear2=0;clear2<DXF_codeset_copies;clear2++)
+		//{
+			DXF_code_tables[clear_code_set]=DXF_codes_tables_empty;
+		//}
+	}
+
+	//memset(&myStruct, 0, sizeof(myStruct));
+
+	//memset (&DXF_code_tables,0,sizeof(DXF_code_tables));
+	//DXF_code_tables=DXF_codes_tables_empty;
+
+}
+
+int DXFtoQET3DB::Split_list(QString TypeList, int x3max, int count_list_item, int count_tables_list, int header_id)
+{
+
+	max3=0;
+	clear_sw_header();
+
+
+	while (count_list_item<x3max and count_list_item<DXF_codeset_copies)
+	{
+
+		line1=QString(split_tables_list[count_tables_list][count_list_item]).toInt();
+		line2=split_tables_list[count_tables_list][count_list_item+1];
+
+
+			switch (line1)
+			{
+				case 0:
+					if (sw_header[0]==0)
+					{
+
+						DXF_code_tables[sw_header[0]].dxf_0=line2;
+
+						DXF_code_tables[sw_header[0]].Section=TypeList;
+						DXF_code_tables[sw_header[0]].Command=line2;
+
+						DXF_code_tables[sw_header[0]].ID_instruction=QString::number(header_id);
+
+						sw_header[0]++;
+
+						if (sw_header[0]>max3)
+						{
+							max3=sw_header[0];
+						}
+					}
+
+				break;
+
+				case 1:
+					if (sw_header[1]>=0)
+					{
+
+						DXF_code_tables[sw_header[1]].dxf_1=line2;
+						sw_header[1]++;
+
+						if (sw_header[1]>max3)
+						{
+							max3=sw_header[1];
+						}
+					}
+
+				break;
+
+				case 2:
+					if (sw_header[2]>=0)
+					{
+
+						DXF_code_tables[sw_header[2]].dxf_2=line2;
+						sw_header[2]++;
+
+						if (sw_header[2]>max3)
+						{
+							max3=sw_header[2];
+						}
+					}
+
+				break;
+
+				case 3:
+					if (sw_header[3]>=0)
+					{
+
+						DXF_code_tables[sw_header[3]].dxf_3=line2;
+						sw_header[3]++;
+
+						if (sw_header[3]>max3)
+						{
+							max3=sw_header[3];
+						}
+					}
+
+				break;
+
+				case 4:
+					if (sw_header[4]>=0)
+					{
+
+						DXF_code_tables[sw_header[4]].dxf_4=line2;
+						sw_header[4]++;
+
+						if (sw_header[4]>max3)
+						{
+							max3=sw_header[4];
+						}
+					}
+
+				break;
+
+				case 5:
+					if (sw_header[5]>=0)
+					{
+
+						DXF_code_tables[sw_header[5]].dxf_5=line2;
+						sw_header[5]++;
+
+						if (sw_header[5]>max3)
+						{
+							max3=sw_header[5];
+						}
+					}
+
+				break;
+
+				case 6:
+					if (sw_header[6]>=0)
+					{
+
+						DXF_code_tables[sw_header[6]].dxf_6=line2;
+						sw_header[6]++;
+
+						if (sw_header[6]>max3)
+						{
+							max3=sw_header[6];
+						}
+					}
+
+				break;
+
+				case 7:
+					if (sw_header[7]>=0)
+					{
+
+						DXF_code_tables[sw_header[7]].dxf_7=line2;
+						sw_header[7]++;
+
+						if (sw_header[7]>max3)
+						{
+							max3=sw_header[7];
+						}
+					}
+
+				break;
+
+				case 8:
+					if (sw_header[8]>=0)
+					{
+
+						DXF_code_tables[sw_header[8]].dxf_8=line2;
+						sw_header[8]++;
+
+						if (sw_header[8]>max3)
+						{
+							max3=sw_header[8];
+						}
+					}
+
+				break;
+
+				case 9:
+					if (sw_header[9]==0)
+					{
+
+						DXF_code_tables[sw_header[9]].dxf_9=line2;
+
+						DXF_code_tables[sw_header[9]].Section=TypeList;
+						DXF_code_tables[sw_header[9]].Command=line2;
+						DXF_code_tables[sw_header[9]].ID_instruction=QString::number(header_id);
+						//DXF_code_tables[sw_header[9]].ID_instruction=DXF_code_tables[sw_header[0]].dxf_5;
+
+						sw_header[9]++;
+
+						//Record_Count_Header++;
+
+						if (sw_header[9]>max)
+						{
+							max=sw_header[9];
+						}
+					}
+
+				break;
+
+				case 10:
+					if (sw_header[10]>=0)
+					{
+
+						DXF_code_tables[sw_header[10]].dxf_10=line2;
+						sw_header[10]++;
+
+						if (sw_header[10]>max3)
+						{
+							max3=sw_header[10];
+						}
+					}
+
+				break;
+
+				case 11:
+					if (sw_header[11]>=0)
+					{
+
+						DXF_code_tables[sw_header[11]].dxf_11=line2;
+						sw_header[11]++;
+
+						if (sw_header[11]>max3)
+						{
+							max3=sw_header[11];
+						}
+					}
+
+				break;
+
+				case 12:
+					if (sw_header[12]>=0)
+					{
+
+						DXF_code_tables[sw_header[12]].dxf_12=line2;
+						sw_header[12]++;
+
+						if (sw_header[12]>max3)
+						{
+							max3=sw_header[12];
+						}
+					}
+
+				break;
+
+
+				case 13:
+					if (sw_header[13]>=0)
+					{
+
+						DXF_code_tables[sw_header[13]].dxf_13=line2;
+						sw_header[13]++;
+
+						if (sw_header[13]>max3)
+						{
+							max3=sw_header[13];
+						}
+					}
+
+				break;
+
+
+				case 14:
+					if (sw_header[14]>=0)
+					{
+
+						DXF_code_tables[sw_header[14]].dxf_14=line2;
+						sw_header[14]++;
+
+						if (sw_header[14]>max3)
+						{
+							max3=sw_header[14];
+						}
+					}
+
+				break;
+
+				case 15:
+					if (sw_header[15]>=0)
+					{
+
+						DXF_code_tables[sw_header[15]].dxf_15=line2;
+						sw_header[15]++;
+
+						if (sw_header[15]>max)
+						{
+							max=sw_header[15];
+						}
+					}
+
+				break;
+
+				case 16:
+					if (sw_header[16]>=0)
+					{
+
+						DXF_code_tables[sw_header[16]].dxf_16=line2;
+						sw_header[16]++;
+
+						if (sw_header[16]>max3)
+						{
+							max3=sw_header[16];
+						}
+					}
+
+				break;
+
+				case 17:
+					if (sw_header[17]>=0)
+					{
+
+						DXF_code_tables[sw_header[17]].dxf_17=line2;
+						sw_header[17]++;
+
+						if (sw_header[17]>max3)
+						{
+							max3=sw_header[17];
+						}
+					}
+
+				break;
+
+				case 20:
+					if (sw_header[20]>=0)
+					{
+
+						DXF_code_tables[sw_header[20]].dxf_20=line2;
+						sw_header[20]++;
+
+						if (sw_header[20]>max3)
+						{
+							max3=sw_header[20];
+						}
+					}
+
+				break;
+
+				case 21:
+					if (sw_header[21]>=0)
+					{
+
+						DXF_code_tables[sw_header[21]].dxf_21=line2;
+						sw_header[21]++;
+
+						if (sw_header[21]>max3)
+						{
+							max3=sw_header[21];
+						}
+					}
+
+				break;
+
+				case 22:
+					if (sw_header[22]>=0)
+					{
+
+						DXF_code_tables[sw_header[22]].dxf_22=line2;
+						sw_header[22]++;
+
+						if (sw_header[22]>max3)
+						{
+							max3=sw_header[22];
+						}
+					}
+
+				break;
+
+				case 23:
+					if (sw_header[23]>=0)
+					{
+
+						DXF_code_tables[sw_header[23]].dxf_23=line2;
+						sw_header[23]++;
+
+						if (sw_header[23]>max3)
+						{
+							max3=sw_header[23];
+						}
+					}
+
+				break;
+
+				case 24:
+					if (sw_header[24]>=0)
+					{
+
+						DXF_code_tables[sw_header[24]].dxf_24=line2;
+						sw_header[24]++;
+
+						if (sw_header[24]>max3)
+						{
+							max3=sw_header[24];
+						}
+					}
+
+				break;
+
+				case 25:
+					if (sw_header[25]>=0)
+					{
+
+						DXF_code_tables[sw_header[25]].dxf_25=line2;
+						sw_header[25]++;
+
+						if (sw_header[25]>max3)
+						{
+							max3=sw_header[25];
+						}
+					}
+
+				break;
+
+
+				case 26:
+					if (sw_header[26]>=0)
+					{
+
+						DXF_code_tables[sw_header[26]].dxf_26=line2;
+						sw_header[26]++;
+
+						if (sw_header[26]>max3)
+						{
+							max3=sw_header[26];
+						}
+					}
+
+				break;
+
+				case 27:
+					if (sw_header[27]>=0)
+					{
+
+						DXF_code_tables[sw_header[27]].dxf_27=line2;
+						sw_header[27]++;
+
+						if (sw_header[27]>max3)
+						{
+							max3=sw_header[27];
+						}
+					}
+
+				break;
+
+				case 28:
+					if (sw_header[28]>=0)
+					{
+
+						DXF_code_tables[sw_header[28]].dxf_28=line2;
+						sw_header[28]++;
+
+						if (sw_header[28]>max3)
+						{
+							max3=sw_header[28];
+						}
+					}
+
+				break;
+
+				case 29:
+					if (sw_header[29]>=0)
+					{
+
+						DXF_code_tables[sw_header[29]].dxf_29=line2;
+						sw_header[29]++;
+
+						if (sw_header[29]>max3)
+						{
+							max3=sw_header[29];
+						}
+					}
+
+				break;
+
+
+
+				case 30:
+					if (sw_header[30]>=0)
+					{
+
+						DXF_code_tables[sw_header[30]].dxf_30=line2;
+						sw_header[30]++;
+
+						if (sw_header[30]>max3)
+						{
+							max3=sw_header[30];
+						}
+					}
+
+				break;
+
+				case 31:
+					if (sw_header[31]>=0)
+					{
+
+						DXF_code_tables[sw_header[31]].dxf_31=line2;
+						sw_header[31]++;
+
+						if (sw_header[31]>max3)
+						{
+							max3=sw_header[31];
+						}
+					}
+
+				break;
+
+				case 32:
+					if (sw_header[32]>=0)
+					{
+
+						DXF_code_tables[sw_header[32]].dxf_32=line2;
+						sw_header[32]++;
+
+						if (sw_header[32]>max3)
+						{
+							max3=sw_header[32];
+						}
+					}
+
+				break;
+
+				case 33:
+					if (sw_header[33]>=0)
+					{
+
+						DXF_code_tables[sw_header[33]].dxf_33=line2;
+						sw_header[33]++;
+
+						if (sw_header[33]>max3)
+						{
+							max3=sw_header[33];
+						}
+					}
+
+				break;
+
+				case 34:
+					if (sw_header[34]>=0)
+					{
+
+						DXF_code_tables[sw_header[34]].dxf_34=line2;
+						sw_header[34]++;
+
+						if (sw_header[34]>max3)
+						{
+							max3=sw_header[34];
+						}
+					}
+
+				break;
+
+				case 35:
+					if (sw_header[35]>=0)
+					{
+
+						DXF_code_tables[sw_header[35]].dxf_35=line2;
+						sw_header[35]++;
+
+						if (sw_header[35]>max3)
+						{
+							max3=sw_header[35];
+						}
+					}
+
+				break;
+
+				case 36:
+					if (sw_header[36]>=0)
+					{
+
+						DXF_code_tables[sw_header[36]].dxf_36=line2;
+						sw_header[36]++;
+
+						if (sw_header[36]>max3)
+						{
+							max3=sw_header[36];
+						}
+					}
+
+				break;
+
+				case 37:
+					if (sw_header[37]>=0)
+					{
+
+						DXF_code_tables[sw_header[37]].dxf_37=line2;
+						sw_header[37]++;
+
+						if (sw_header[37]>max3)
+						{
+							max3=sw_header[37];
+						}
+					}
+
+				break;
+
+				case 38:
+					if (sw_header[38]>=0)
+					{
+
+						DXF_code_tables[sw_header[38]].dxf_38=line2;
+						sw_header[38]++;
+
+						if (sw_header[38]>max3)
+						{
+							max3=sw_header[38];
+						}
+					}
+
+				break;
+
+				case 39:
+					if (sw_header[39]>=0)
+					{
+
+						DXF_code_tables[sw_header[39]].dxf_39=line2;
+						sw_header[39]++;
+
+						if (sw_header[39]>max3)
+						{
+							max3=sw_header[39];
+						}
+					}
+
+				break;
+
+
+				case 40:
+					if (sw_header[40]>=0)
+					{
+
+						DXF_code_tables[sw_header[40]].dxf_40=line2;
+						sw_header[40]++;
+
+						if (sw_header[40]>max3)
+						{
+							max3=sw_header[40];
+						}
+					}
+
+				break;
+
+
+				case 41:
+					if (sw_header[41]>=0)
+					{
+
+						DXF_code_tables[sw_header[41]].dxf_41=line2;
+						sw_header[41]++;
+
+						if (sw_header[41]>max3)
+						{
+							max3=sw_header[41];
+						}
+					}
+
+				break;
+
+
+				case 42:
+					if (sw_header[42]>=0)
+					{
+
+						DXF_code_tables[sw_header[42]].dxf_42=line2;
+						sw_header[42]++;
+
+						if (sw_header[42]>max3)
+						{
+							max3=sw_header[42];
+						}
+					}
+
+				break;
+
+				case 43:
+					if (sw_header[43]>=0)
+					{
+
+						DXF_code_tables[sw_header[43]].dxf_43=line2;
+						sw_header[43]++;
+
+						if (sw_header[43]>max3)
+						{
+							max3=sw_header[43];
+						}
+					}
+
+				break;
+
+				case 44:
+					if (sw_header[44]>=0)
+					{
+
+						DXF_code_tables[sw_header[44]].dxf_44=line2;
+						sw_header[44]++;
+
+						if (sw_header[44]>max3)
+						{
+							max3=sw_header[44];
+						}
+					}
+
+				break;
+
+				case 45:
+					if (sw_header[45]>=0)
+					{
+
+						DXF_code_tables[sw_header[45]].dxf_45=line2;
+						sw_header[45]++;
+
+						if (sw_header[45]>max3)
+						{
+							max3=sw_header[45];
+						}
+					}
+
+				break;
+
+				case 46:
+					if (sw_header[46]>=0)
+					{
+
+						DXF_code_tables[sw_header[46]].dxf_46=line2;
+						sw_header[46]++;
+
+						if (sw_header[46]>max3)
+						{
+							max3=sw_header[46];
+						}
+					}
+
+				break;
+
+				case 47:
+					if (sw_header[47]>=0)
+					{
+
+						DXF_code_tables[sw_header[47]].dxf_47=line2;
+						sw_header[47]++;
+
+						if (sw_header[47]>max3)
+						{
+							max3=sw_header[47];
+						}
+					}
+
+				break;
+
+				case 48:
+					if (sw_header[48]>=0)
+					{
+
+						DXF_code_tables[sw_header[48]].dxf_48=line2;
+						sw_header[48]++;
+
+						if (sw_header[48]>max3)
+						{
+							max3=sw_header[48];
+						}
+					}
+
+				break;
+
+				case 49:
+					if (sw_header[49]>=0)
+					{
+
+						DXF_code_tables[sw_header[49]].dxf_49=line2;
+						sw_header[49]++;
+
+						if (sw_header[49]>max3)
+						{
+							max3=sw_header[49];
+						}
+					}
+
+				break;
+
+				case 50:
+					if (sw_header[50]>=0)
+					{
+
+						DXF_code_tables[sw_header[50]].dxf_50=line2;
+						sw_header[50]++;
+
+						if (sw_header[50]>max3)
+						{
+							max3=sw_header[50];
+						}
+					}
+
+				break;
+
+
+				case 51:
+					if (sw_header[51]>=0)
+					{
+
+						DXF_code_tables[sw_header[51]].dxf_51=line2;
+						sw_header[51]++;
+
+						if (sw_header[51]>max3)
+						{
+							max3=sw_header[51];
+						}
+					}
+
+				break;
+
+				case 52:
+					if (sw_header[52]>=0)
+					{
+
+						DXF_code_tables[sw_header[52]].dxf_52=line2;
+						sw_header[52]++;
+
+						if (sw_header[52]>max3)
+						{
+							max3=sw_header[52];
+						}
+					}
+
+				break;
+
+				case 53:
+					if (sw_header[53]>=0)
+					{
+
+						DXF_code_tables[sw_header[53]].dxf_53=line2;
+						sw_header[53]++;
+
+						if (sw_header[53]>max3)
+						{
+							max3=sw_header[53];
+						}
+					}
+
+				break;
+
+				case 60:
+					if (sw_header[60]>=0)
+					{
+
+						DXF_code_tables[sw_header[60]].dxf_60=line2;
+						sw_header[60]++;
+
+						if (sw_header[60]>max3)
+						{
+							max3=sw_header[60];
+						}
+					}
+
+				break;
+
+				case 61:
+					if (sw_header[61]>=0)
+					{
+
+						DXF_code_tables[sw_header[61]].dxf_61=line2;
+						sw_header[61]++;
+
+						if (sw_header[61]>max3)
+						{
+							max3=sw_header[61];
+						}
+					}
+
+				break;
+
+				case 62:
+					if (sw_header[62]>=0)
+					{
+
+						DXF_code_tables[sw_header[62]].dxf_62=line2;
+						sw_header[62]++;
+
+						if (sw_header[62]>max3)
+						{
+							max3=sw_header[62];
+						}
+					}
+
+				break;
+
+				case 63:
+					if (sw_header[63]>=0)
+					{
+
+						DXF_code_tables[sw_header[63]].dxf_63=line2;
+						sw_header[63]++;
+
+						if (sw_header[63]>max3)
+						{
+							max3=sw_header[63];
+						}
+					}
+
+				break;
+
+				case 64:
+					if (sw_header[64]>=0)
+					{
+
+						DXF_code_tables[sw_header[64]].dxf_64=line2;
+						sw_header[64]++;
+
+						if (sw_header[64]>max3)
+						{
+							max3=sw_header[64];
+						}
+					}
+
+				break;
+
+
+				case 65:
+					if (sw_header[65]>=0)
+					{
+
+						DXF_code_tables[sw_header[65]].dxf_65=line2;
+						sw_header[65]++;
+
+						if (sw_header[65]>max3)
+						{
+							max3=sw_header[65];
+						}
+					}
+
+				break;
+
+				case 66:
+					if (sw_header[66]>=0)
+					{
+
+						DXF_code_tables[sw_header[66]].dxf_66=line2;
+						sw_header[66]++;
+
+						if (sw_header[66]>max3)
+						{
+							max3=sw_header[66];
+						}
+					}
+
+				break;
+
+				case 67:
+					if (sw_header[67]>=0)
+					{
+
+						DXF_code_tables[sw_header[67]].dxf_67=line2;
+						sw_header[67]++;
+
+						if (sw_header[67]>max3)
+						{
+							max3=sw_header[67];
+						}
+					}
+
+				break;
+
+				case 68:
+					if (sw_header[68]>=0)
+					{
+
+						DXF_code_tables[sw_header[68]].dxf_68=line2;
+						sw_header[68]++;
+
+						if (sw_header[68]>max3)
+						{
+							max3=sw_header[68];
+						}
+					}
+
+				break;
+
+				case 69:
+					if (sw_header[69]>=0)
+					{
+
+						DXF_code_tables[sw_header[69]].dxf_69=line2;
+						sw_header[69]++;
+
+						if (sw_header[69]>max3)
+						{
+							max3=sw_header[69];
+						}
+					}
+
+				break;
+
+				case 70:
+					if (sw_header[70]>=0)
+					{
+
+						DXF_code_tables[sw_header[70]].dxf_70=line2;
+						sw_header[70]++;
+
+						if (sw_header[70]>max3)
+						{
+							max3=sw_header[70];
+						}
+					}
+
+				break;
+
+				case 71:
+					if (sw_header[71]>=0)
+					{
+
+						DXF_code_tables[sw_header[71]].dxf_71=line2;
+						sw_header[71]++;
+
+						if (sw_header[71]>max3)
+						{
+							max3=sw_header[71];
+						}
+					}
+
+				break;
+
+				case 72:
+					if (sw_header[72]>=0)
+					{
+
+						DXF_code_tables[sw_header[72]].dxf_72=line2;
+						sw_header[72]++;
+
+						if (sw_header[72]>max3)
+						{
+							max3=sw_header[72];
+						}
+					}
+
+				break;
+
+				case 73:
+					if (sw_header[73]>=0)
+					{
+
+						DXF_code_tables[sw_header[73]].dxf_73=line2;
+						sw_header[73]++;
+
+						if (sw_header[73]>max3)
+						{
+							max3=sw_header[73];
+						}
+					}
+
+				break;
+
+				case 74:
+					if (sw_header[74]>=0)
+					{
+
+						DXF_code_tables[sw_header[74]].dxf_74=line2;
+						sw_header[74]++;
+
+						if (sw_header[74]>max3)
+						{
+							max3=sw_header[74];
+						}
+					}
+
+				break;
+
+				case 75:
+					if (sw_header[75]>=0)
+					{
+
+						DXF_code_tables[sw_header[75]].dxf_75=line2;
+						sw_header[75]++;
+
+						if (sw_header[75]>max3)
+						{
+							max3=sw_header[75];
+						}
+					}
+
+				break;
+
+				case 76:
+					if (sw_header[76]>=0)
+					{
+
+						DXF_code_tables[sw_header[76]].dxf_76=line2;
+						sw_header[76]++;
+
+						if (sw_header[76]>max3)
+						{
+							max3=sw_header[76];
+						}
+					}
+
+				break;
+
+				case 77:
+					if (sw_header[77]>=0)
+					{
+
+						DXF_code_tables[sw_header[77]].dxf_77=line2;
+						sw_header[77]++;
+
+						if (sw_header[77]>max3)
+						{
+							max3=sw_header[77];
+						}
+					}
+
+				break;
+
+				case 78:
+					if (sw_header[78]>=0)
+					{
+
+						DXF_code_tables[sw_header[78]].dxf_78=line2;
+						sw_header[78]++;
+
+						if (sw_header[78]>max3)
+						{
+							max3=sw_header[78];
+						}
+					}
+
+				break;
+
+				case 79:
+					if (sw_header[79]>=0)
+					{
+
+						DXF_code_tables[sw_header[79]].dxf_79=line2;
+						sw_header[79]++;
+
+						if (sw_header[79]>max3)
+						{
+							max3=sw_header[79];
+						}
+					}
+
+				break;
+
+				case 90:
+					if (sw_header[90]>=0)
+					{
+
+						DXF_code_tables[sw_header[90]].dxf_90=line2;
+						sw_header[90]++;
+
+						if (sw_header[90]>max3)
+						{
+							max3=sw_header[90];
+						}
+					}
+
+				break;
+
+
+				case 91:
+					if (sw_header[91]>=0)
+					{
+
+						DXF_code_tables[sw_header[91]].dxf_91=line2;
+						sw_header[91]++;
+
+						if (sw_header[91]>max3)
+						{
+							max3=sw_header[91];
+						}
+					}
+
+				break;
+
+
+				case 92:
+					if (sw_header[92]>=0)
+					{
+
+						DXF_code_tables[sw_header[92]].dxf_92=line2;
+						sw_header[92]++;
+
+						if (sw_header[92]>max3)
+						{
+							max3=sw_header[92];
+						}
+					}
+
+				break;
+
+				case 93:
+					if (sw_header[93]>=0)
+					{
+
+						DXF_code_tables[sw_header[93]].dxf_93=line2;
+						sw_header[93]++;
+
+						if (sw_header[93]>max3)
+						{
+							max3=sw_header[93];
+						}
+					}
+
+				break;
+
+				case 94:
+					if (sw_header[94]>=0)
+					{
+
+						DXF_code_tables[sw_header[94]].dxf_94=line2;
+						sw_header[94]++;
+
+						if (sw_header[94]>max3)
+						{
+							max3=sw_header[94];
+						}
+					}
+
+				break;
+
+				case 95:
+					if (sw_header[95]>=0)
+					{
+
+						DXF_code_tables[sw_header[95]].dxf_95=line2;
+						sw_header[95]++;
+
+						if (sw_header[95]>max3)
+						{
+							max3=sw_header[95];
+						}
+					}
+
+				break;
+
+				case 96:
+					if (sw_header[96]>=0)
+					{
+
+						DXF_code_tables[sw_header[96]].dxf_96=line2;
+						sw_header[96]++;
+
+						if (sw_header[96]>max3)
+						{
+							max3=sw_header[96];
+						}
+					}
+
+				break;
+
+				case 97:
+					if (sw_header[97]>=0)
+					{
+
+						DXF_code_tables[sw_header[97]].dxf_97=line2;
+						sw_header[97]++;
+
+						if (sw_header[97]>max3)
+						{
+							max3=sw_header[97];
+						}
+					}
+
+				break;
+
+				case 98:
+					if (sw_header[98]>=0)
+					{
+
+						DXF_code_tables[sw_header[98]].dxf_98=line2;
+						sw_header[98]++;
+
+						if (sw_header[98]>max3)
+						{
+							max3=sw_header[98];
+						}
+					}
+
+				break;
+
+				case 99:
+					if (sw_header[99]>=0)
+					{
+
+						DXF_code_tables[sw_header[99]].dxf_99=line2;
+						sw_header[99]++;
+
+						if (sw_header[99]>max3)
+						{
+							max3=sw_header[99];
+						}
+					}
+
+				break;
+
+				case 100:
+					if (sw_header[100]>=0)
+					{
+
+						DXF_code_tables[sw_header[100]].dxf_100=line2;
+						sw_header[100]++;
+
+						if (sw_header[100]>max3)
+						{
+							max3=sw_header[100];
+						}
+					}
+
+				break;
+
+				//code 101 dont exist
+
+				case 102:
+					if (sw_header[102]>=0)
+					{
+
+						DXF_code_tables[sw_header[102]].dxf_102=line2;
+						sw_header[102]++;
+
+						if (sw_header[102]>max3)
+						{
+							max3=sw_header[102];
+						}
+					}
+
+				break;
+
+				case 105:
+					if (sw_header[105]>=0)
+					{
+
+						DXF_code_tables[sw_header[105]].dxf_105=line2;
+						sw_header[105]++;
+
+						if (sw_header[105]>max3)
+						{
+							max3=sw_header[105];
+						}
+					}
+
+				break;
+
+				case 110:
+					if (sw_header[110]>=0)
+					{
+
+						DXF_code_tables[sw_header[110]].dxf_110=line2;
+						sw_header[110]++;
+
+						if (sw_header[110]>max3)
+						{
+							max3=sw_header[110];
+						}
+					}
+
+				break;
+
+				case 111:
+					if (sw_header[111]>=0)
+					{
+
+						DXF_code_tables[sw_header[111]].dxf_111=line2;
+						sw_header[111]++;
+
+						if (sw_header[111]>max3)
+						{
+							max3=sw_header[111];
+						}
+					}
+
+				break;
+
+				case 112:
+					if (sw_header[112]>=0)
+					{
+
+						DXF_code_tables[sw_header[112]].dxf_112=line2;
+						sw_header[112]++;
+
+						if (sw_header[112]>max3)
+						{
+							max3=sw_header[112];
+						}
+					}
+
+				break;
+
+				case 120:
+					if (sw_header[120]>=0)
+					{
+
+						DXF_code_tables[sw_header[120]].dxf_120=line2;
+						sw_header[120]++;
+
+						if (sw_header[120]>max3)
+						{
+							max3=sw_header[120];
+						}
+					}
+
+				break;
+
+				case 121:
+					if (sw_header[121]>=0)
+					{
+
+						DXF_code_tables[sw_header[121]].dxf_121=line2;
+						sw_header[121]++;
+
+						if (sw_header[121]>max3)
+						{
+							max3=sw_header[121];
+						}
+					}
+
+				break;
+
+				case 122:
+					if (sw_header[122]>=0)
+					{
+
+						DXF_code_tables[sw_header[122]].dxf_122=line2;
+						sw_header[122]++;
+
+						if (sw_header[122]>max3)
+						{
+							max3=sw_header[122];
+						}
+					}
+
+				break;
+
+				case 130:
+					if (sw_header[130]>=0)
+					{
+
+						DXF_code_tables[sw_header[130]].dxf_130=line2;
+						sw_header[130]++;
+
+						if (sw_header[130]>max3)
+						{
+							max3=sw_header[130];
+						}
+					}
+
+				break;
+
+				case 131:
+					if (sw_header[131]>=0)
+					{
+
+						DXF_code_tables[sw_header[131]].dxf_131=line2;
+						sw_header[131]++;
+
+						if (sw_header[131]>max3)
+						{
+							max3=sw_header[131];
+						}
+					}
+
+				break;
+
+				case 132:
+					if (sw_header[132]>=0)
+					{
+
+						DXF_code_tables[sw_header[132]].dxf_132=line2;
+						sw_header[132]++;
+
+						if (sw_header[132]>max3)
+						{
+							max3=sw_header[132];
+						}
+					}
+
+				break;
+
+				case 140:
+					if (sw_header[140]>=0)
+					{
+
+						DXF_code_tables[sw_header[140]].dxf_140=line2;
+						sw_header[140]++;
+
+						if (sw_header[140]>max3)
+						{
+							max3=sw_header[140];
+						}
+					}
+
+				break;
+
+				case 141:
+					if (sw_header[141]>=0)
+					{
+
+						DXF_code_tables[sw_header[141]].dxf_141=line2;
+						sw_header[141]++;
+
+						if (sw_header[141]>max3)
+						{
+							max3=sw_header[141];
+						}
+					}
+
+				break;
+
+				case 142:
+					if (sw_header[142]>=0)
+					{
+
+						DXF_code_tables[sw_header[142]].dxf_142=line2;
+						sw_header[142]++;
+
+						if (sw_header[142]>max3)
+						{
+							max3=sw_header[142];
+						}
+					}
+
+				break;
+
+				case 143:
+					if (sw_header[143]>=0)
+					{
+
+						DXF_code_tables[sw_header[143]].dxf_143=line2;
+						sw_header[143]++;
+
+						if (sw_header[143]>max3)
+						{
+							max3=sw_header[143];
+						}
+					}
+
+				break;
+
+				case 144:
+					if (sw_header[144]>=0)
+					{
+
+						DXF_code_tables[sw_header[144]].dxf_144=line2;
+						sw_header[144]++;
+
+						if (sw_header[144]>max3)
+						{
+							max3=sw_header[144];
+						}
+					}
+
+				break;
+
+				case 145:
+					if (sw_header[145]>=0)
+					{
+
+						DXF_code_tables[sw_header[145]].dxf_145=line2;
+						sw_header[145]++;
+
+						if (sw_header[145]>max3)
+						{
+							max3=sw_header[145];
+						}
+					}
+
+				break;
+
+				case 146:
+					if (sw_header[146]>=0)
+					{
+
+						DXF_code_tables[sw_header[146]].dxf_146=line2;
+						sw_header[146]++;
+
+						if (sw_header[146]>max3)
+						{
+							max3=sw_header[146];
+						}
+					}
+
+				break;
+
+				case 147:
+					if (sw_header[147]>=0)
+					{
+
+						DXF_code_tables[sw_header[147]].dxf_147=line2;
+						sw_header[147]++;
+
+						if (sw_header[147]>max3)
+						{
+							max3=sw_header[147];
+						}
+					}
+
+				break;
+
+				case 148:
+					if (sw_header[148]>=0)
+					{
+
+						DXF_code_tables[sw_header[148]].dxf_148=line2;
+						sw_header[148]++;
+
+						if (sw_header[148]>max3)
+						{
+							max3=sw_header[148];
+						}
+					}
+
+				break;
+
+				case 149:
+					if (sw_header[149]>=0)
+					{
+
+						DXF_code_tables[sw_header[149]].dxf_149=line2;
+						sw_header[149]++;
+
+						if (sw_header[149]>max3)
+						{
+							max3=sw_header[149];
+						}
+					}
+
+				break;
+
+				case 160:
+					if (sw_header[160]>=0)
+					{
+
+						DXF_code_tables[sw_header[160]].dxf_160=line2;
+						sw_header[160]++;
+
+						if (sw_header[160]>max3)
+						{
+							max3=sw_header[160];
+						}
+					}
+
+				break;
+
+				case 170:
+					if (sw_header[170]>=0)
+					{
+
+						DXF_code_tables[sw_header[170]].dxf_170=line2;
+						sw_header[170]++;
+
+						if (sw_header[170]>max3)
+						{
+							max3=sw_header[170];
+						}
+					}
+
+				break;
+
+				case 171:
+					if (sw_header[171]>=0)
+					{
+
+						DXF_code_tables[sw_header[171]].dxf_171=line2;
+						sw_header[171]++;
+
+						if (sw_header[171]>max3)
+						{
+							max3=sw_header[171];
+						}
+					}
+
+				break;
+
+				case 172:
+					if (sw_header[172]>=0)
+					{
+
+						DXF_code_tables[sw_header[172]].dxf_172=line2;
+						sw_header[172]++;
+
+						if (sw_header[172]>max3)
+						{
+							max3=sw_header[172];
+						}
+					}
+
+				break;
+
+				case 173:
+					if (sw_header[173]>=0)
+					{
+
+						DXF_code_tables[sw_header[173]].dxf_173=line2;
+						sw_header[173]++;
+
+						if (sw_header[173]>max3)
+						{
+							max3=sw_header[173];
+						}
+					}
+
+				break;
+
+				case 174:
+					if (sw_header[174]>=0)
+					{
+
+						DXF_code_tables[sw_header[174]].dxf_174=line2;
+						sw_header[174]++;
+
+						if (sw_header[174]>max3)
+						{
+							max3=sw_header[174];
+						}
+					}
+
+				break;
+
+				case 175:
+					if (sw_header[175]>=0)
+					{
+
+						DXF_code_tables[sw_header[175]].dxf_175=line2;
+						sw_header[175]++;
+
+						if (sw_header[175]>max3)
+						{
+							max3=sw_header[175];
+						}
+					}
+
+				break;
+
+				case 176:
+					if (sw_header[176]>=0)
+					{
+
+						DXF_code_tables[sw_header[176]].dxf_176=line2;
+						sw_header[176]++;
+
+						if (sw_header[176]>max3)
+						{
+							max3=sw_header[176];
+						}
+					}
+
+				break;
+
+				case 177:
+					if (sw_header[177]>=0)
+					{
+
+						DXF_code_tables[sw_header[177]].dxf_177=line2;
+						sw_header[177]++;
+
+						if (sw_header[177]>max3)
+						{
+							max3=sw_header[177];
+						}
+					}
+
+				break;
+
+				case 178:
+					if (sw_header[178]>=0)
+					{
+
+						DXF_code_tables[sw_header[178]].dxf_178=line2;
+						sw_header[178]++;
+
+						if (sw_header[178]>max3)
+						{
+							max3=sw_header[178];
+						}
+					}
+
+				break;
+
+
+				case 179:
+					if (sw_header[179]>=0)
+					{
+
+						DXF_code_tables[sw_header[179]].dxf_179=line2;
+						sw_header[179]++;
+
+						if (sw_header[179]>max3)
+						{
+							max3=sw_header[179];
+						}
+					}
+
+				break;
+
+				case 210:
+					if (sw_header[210]>=0)
+					{
+
+						DXF_code_tables[sw_header[210]].dxf_210=line2;
+						sw_header[210]++;
+
+						if (sw_header[210]>max3)
+						{
+							max3=sw_header[210];
+						}
+					}
+
+				break;
+
+				case 220:
+					if (sw_header[220]>=0)
+					{
+
+						DXF_code_tables[sw_header[220]].dxf_220=line2;
+						sw_header[220]++;
+
+						if (sw_header[220]>max3)
+						{
+							max3=sw_header[220];
+						}
+					}
+
+				break;
+
+				case 230:
+					if (sw_header[230]>=0)
+					{
+
+						DXF_code_tables[sw_header[230]].dxf_230=line2;
+						sw_header[230]++;
+
+						if (sw_header[230]>max3)
+						{
+							max3=sw_header[230];
+						}
+					}
+
+				break;
+
+				case 270:
+					if (sw_header[270]>=0)
+					{
+
+						DXF_code_tables[sw_header[270]].dxf_270=line2;
+						sw_header[270]++;
+
+						if (sw_header[270]>max3)
+						{
+							max3=sw_header[270];
+						}
+					}
+
+				break;
+
+				case 271:
+					if (sw_header[271]>=0)
+					{
+
+						DXF_code_tables[sw_header[271]].dxf_271=line2;
+						sw_header[271]++;
+
+						if (sw_header[271]>max3)
+						{
+							max3=sw_header[271];
+						}
+					}
+
+				break;
+
+				case 272:
+					if (sw_header[272]>=0)
+					{
+
+						DXF_code_tables[sw_header[272]].dxf_272=line2;
+						sw_header[272]++;
+
+						if (sw_header[272]>max3)
+						{
+							max3=sw_header[272];
+						}
+					}
+
+				break;
+
+				case 273:
+					if (sw_header[273]>=0)
+					{
+
+						DXF_code_tables[sw_header[273]].dxf_273=line2;
+						sw_header[273]++;
+
+						if (sw_header[273]>max3)
+						{
+							max3=sw_header[273];
+						}
+					}
+
+				break;
+
+				case 274:
+					if (sw_header[274]>=0)
+					{
+
+						DXF_code_tables[sw_header[274]].dxf_274=line2;
+						sw_header[274]++;
+
+						if (sw_header[274]>max3)
+						{
+							max3=sw_header[274];
+						}
+					}
+
+				break;
+
+				case 275:
+					if (sw_header[275]>=0)
+					{
+
+						DXF_code_tables[sw_header[275]].dxf_275=line2;
+						sw_header[275]++;
+
+						if (sw_header[275]>max3)
+						{
+							max3=sw_header[275];
+						}
+					}
+
+				break;
+
+				case 276:
+					if (sw_header[276]>=0)
+					{
+
+						DXF_code_tables[sw_header[276]].dxf_276=line2;
+						sw_header[276]++;
+
+						if (sw_header[276]>max3)
+						{
+							max3=sw_header[276];
+						}
+					}
+
+				break;
+
+
+				case 277:
+					if (sw_header[277]>=0)
+					{
+
+						DXF_code_tables[sw_header[277]].dxf_277=line2;
+						sw_header[277]++;
+
+						if (sw_header[277]>max3)
+						{
+							max3=sw_header[277];
+						}
+					}
+
+				break;
+
+				case 278:
+					if (sw_header[278]>=0)
+					{
+
+						DXF_code_tables[sw_header[278]].dxf_278=line2;
+						sw_header[278]++;
+
+						if (sw_header[278]>max3)
+						{
+							max3=sw_header[278];
+						}
+					}
+
+				break;
+
+				case 279:
+					if (sw_header[279]>=0)
+					{
+
+						DXF_code_tables[sw_header[279]].dxf_279=line2;
+						sw_header[279]++;
+
+						if (sw_header[279]>max3)
+						{
+							max3=sw_header[279];
+						}
+					}
+
+				break;
+
+				case 280:
+					if (sw_header[280]>=0)
+					{
+
+						DXF_code_tables[sw_header[280]].dxf_280=line2;
+						sw_header[280]++;
+
+						if (sw_header[280]>max3)
+						{
+							max3=sw_header[280];
+						}
+					}
+
+				break;
+
+				case 281:
+					if (sw_header[281]>=0)
+					{
+
+						DXF_code_tables[sw_header[281]].dxf_281=line2;
+						sw_header[281]++;
+
+						if (sw_header[281]>max3)
+						{
+							max3=sw_header[281];
+						}
+					}
+
+				break;
+
+				case 282:
+					if (sw_header[282]>=0)
+					{
+
+						DXF_code_tables[sw_header[282]].dxf_282=line2;
+						sw_header[282]++;
+
+						if (sw_header[282]>max3)
+						{
+							max3=sw_header[282];
+						}
+					}
+
+				break;
+
+				case 283:
+					if (sw_header[283]>=0)
+					{
+
+						DXF_code_tables[sw_header[283]].dxf_283=line2;
+						sw_header[283]++;
+
+						if (sw_header[283]>max3)
+						{
+							max3=sw_header[283];
+						}
+					}
+
+				break;
+
+				case 284:
+					if (sw_header[284]>=0)
+					{
+
+						DXF_code_tables[sw_header[284]].dxf_284=line2;
+						sw_header[284]++;
+
+						if (sw_header[284]>max3)
+						{
+							max3=sw_header[284];
+						}
+					}
+
+				break;
+
+				case 285:
+					if (sw_header[285]>=0)
+					{
+
+						DXF_code_tables[sw_header[285]].dxf_285=line2;
+						sw_header[285]++;
+
+						if (sw_header[285]>max3)
+						{
+							max3=sw_header[285];
+						}
+					}
+
+				break;
+
+				case 286:
+					if (sw_header[286]>=0)
+					{
+
+						DXF_code_tables[sw_header[286]].dxf_286=line2;
+						sw_header[286]++;
+
+						if (sw_header[286]>max3)
+						{
+							max3=sw_header[286];
+						}
+					}
+
+				break;
+
+				case 287:
+					if (sw_header[287]>=0)
+					{
+
+						DXF_code_tables[sw_header[287]].dxf_287=line2;
+						sw_header[287]++;
+
+						if (sw_header[287]>max3)
+						{
+							max3=sw_header[287];
+						}
+					}
+
+				break;
+
+				case 288:
+					if (sw_header[288]>=0)
+					{
+
+						DXF_code_tables[sw_header[288]].dxf_288=line2;
+						sw_header[288]++;
+
+						if (sw_header[288]>max3)
+						{
+							max3=sw_header[288];
+						}
+					}
+
+				break;
+
+				case 289:
+					if (sw_header[289]>=0)
+					{
+
+						DXF_code_tables[sw_header[289]].dxf_289=line2;
+						sw_header[289]++;
+
+						if (sw_header[289]>max3)
+						{
+							max3=sw_header[289];
+						}
+					}
+
+				break;
+
+				case 290:
+					if (sw_header[290]>=0)
+					{
+
+						DXF_code_tables[sw_header[290]].dxf_290=line2;
+						sw_header[290]++;
+
+						if (sw_header[290]>max3)
+						{
+							max3=sw_header[290];
+						}
+					}
+
+				break;
+
+				case 291:
+					if (sw_header[291]>=0)
+					{
+
+						DXF_code_tables[sw_header[291]].dxf_291=line2;
+						sw_header[291]++;
+
+						if (sw_header[291]>max3)
+						{
+							max3=sw_header[291];
+						}
+					}
+
+				break;
+
+				case 292:
+					if (sw_header[292]>=0)
+					{
+
+						DXF_code_tables[sw_header[292]].dxf_292=line2;
+						sw_header[292]++;
+
+						if (sw_header[292]>max3)
+						{
+							max3=sw_header[292];
+						}
+					}
+
+				break;
+
+				case 293:
+					if (sw_header[293]>=0)
+					{
+
+						DXF_code_tables[sw_header[293]].dxf_293=line2;
+						sw_header[293]++;
+
+						if (sw_header[293]>max3)
+						{
+							max3=sw_header[293];
+						}
+					}
+
+				break;
+
+				case 294:
+					if (sw_header[294]>=0)
+					{
+
+						DXF_code_tables[sw_header[294]].dxf_294=line2;
+						sw_header[294]++;
+
+						if (sw_header[294]>max3)
+						{
+							max3=sw_header[294];
+						}
+					}
+
+				break;
+
+				case 295:
+					if (sw_header[295]>=0)
+					{
+
+						DXF_code_tables[sw_header[295]].dxf_295=line2;
+						sw_header[295]++;
+
+						if (sw_header[295]>max3)
+						{
+							max3=sw_header[295];
+						}
+					}
+
+				break;
+
+				case 296:
+					if (sw_header[296]>=0)
+					{
+
+						DXF_code_tables[sw_header[296]].dxf_296=line2;
+						sw_header[296]++;
+
+						if (sw_header[296]>max3)
+						{
+							max3=sw_header[296];
+						}
+					}
+
+				break;
+
+				case 297:
+					if (sw_header[297]>=0)
+					{
+
+						DXF_code_tables[sw_header[297]].dxf_297=line2;
+						sw_header[297]++;
+
+						if (sw_header[297]>max3)
+						{
+							max3=sw_header[297];
+						}
+					}
+
+				break;
+
+				case 298:
+					if (sw_header[298]>=0)
+					{
+
+						DXF_code_tables[sw_header[298]].dxf_298=line2;
+						sw_header[298]++;
+
+						if (sw_header[298]>max3)
+						{
+							max3=sw_header[298];
+						}
+					}
+
+				break;
+
+				case 299:
+					if (sw_header[299]>=0)
+					{
+
+						DXF_code_tables[sw_header[299]].dxf_299=line2;
+						sw_header[299]++;
+
+						if (sw_header[299]>max3)
+						{
+							max3=sw_header[299];
+						}
+					}
+
+				break;
+
+				case 300:
+					if (sw_header[300]>=0)
+					{
+
+						DXF_code_tables[sw_header[300]].dxf_300=line2;
+						sw_header[300]++;
+
+						if (sw_header[300]>max3)
+						{
+							max3=sw_header[300];
+						}
+					}
+
+				break;
+
+				case 301:
+					if (sw_header[301]>=0)
+					{
+
+						DXF_code_tables[sw_header[301]].dxf_301=line2;
+						sw_header[301]++;
+
+						if (sw_header[301]>max3)
+						{
+							max3=sw_header[301];
+						}
+					}
+
+				break;
+
+				case 302:
+					if (sw_header[302]>=0)
+					{
+
+						DXF_code_tables[sw_header[302]].dxf_302=line2;
+						sw_header[302]++;
+
+						if (sw_header[302]>max3)
+						{
+							max3=sw_header[302];
+						}
+					}
+
+				break;
+
+				case 303:
+					if (sw_header[303]>=0)
+					{
+
+						DXF_code_tables[sw_header[303]].dxf_303=line2;
+						sw_header[303]++;
+
+						if (sw_header[303]>max3)
+						{
+							max3=sw_header[303];
+						}
+					}
+
+				break;
+
+				case 304:
+					if (sw_header[304]>=0)
+					{
+
+						DXF_code_tables[sw_header[304]].dxf_304=line2;
+						sw_header[304]++;
+
+						if (sw_header[304]>max3)
+						{
+							max3=sw_header[304];
+						}
+					}
+
+				break;
+
+				case 305:
+					if (sw_header[305]>=0)
+					{
+
+						DXF_code_tables[sw_header[305]].dxf_305=line2;
+						sw_header[305]++;
+
+						if (sw_header[305]>max3)
+						{
+							max3=sw_header[305];
+						}
+					}
+
+				break;
+
+				case 306:
+					if (sw_header[306]>=0)
+					{
+
+						DXF_code_tables[sw_header[306]].dxf_306=line2;
+						sw_header[306]++;
+
+						if (sw_header[306]>max3)
+						{
+							max3=sw_header[306];
+						}
+					}
+
+				break;
+
+				case 307:
+					if (sw_header[307]>=0)
+					{
+
+						DXF_code_tables[sw_header[307]].dxf_307=line2;
+						sw_header[307]++;
+
+						if (sw_header[307]>max3)
+						{
+							max3=sw_header[307];
+						}
+					}
+
+				break;
+
+				case 308:
+					if (sw_header[308]>=0)
+					{
+
+						DXF_code_tables[sw_header[308]].dxf_308=line2;
+						sw_header[308]++;
+
+						if (sw_header[308]>max3)
+						{
+							max3=sw_header[308];
+						}
+					}
+
+				break;
+
+				case 309:
+					if (sw_header[309]>=0)
+					{
+
+						DXF_code_tables[sw_header[309]].dxf_309=line2;
+						sw_header[309]++;
+
+						if (sw_header[309]>max3)
+						{
+							max3=sw_header[309];
+						}
+					}
+
+				break;
+
+				case 310:
+					if (sw_header[310]>=0)
+					{
+
+						DXF_code_tables[sw_header[310]].dxf_310=line2;
+						sw_header[310]++;
+
+						if (sw_header[310]>max3)
+						{
+							max3=sw_header[310];
+						}
+					}
+
+				break;
+
+				case 330:
+					if (sw_header[330]>=0)
+					{
+
+						DXF_code_tables[sw_header[330]].dxf_330=line2;
+						sw_header[330]++;
+
+						if (sw_header[330]>max3)
+						{
+							max3=sw_header[330];
+						}
+					}
+
+				break;
+
+
+
+				case 331:
+					if (sw_header[331]>=0)
+					{
+
+						DXF_code_tables[sw_header[331]].dxf_331=line2;
+						sw_header[331]++;
+
+						if (sw_header[331]>max3)
+						{
+							max3=sw_header[331];
+						}
+					}
+
+				break;
+
+				case 332:
+					if (sw_header[332]>=0)
+					{
+
+						DXF_code_tables[sw_header[332]].dxf_332=line2;
+						sw_header[332]++;
+
+						if (sw_header[332]>max3)
+						{
+							max3=sw_header[332];
+						}
+					}
+
+				break;
+
+				case 338:
+					if (sw_header[338]>=0)
+					{
+
+						DXF_code_tables[sw_header[338]].dxf_342=line2;
+						sw_header[338]++;
+
+						if (sw_header[338]>max3)
+						{
+							max3=sw_header[338];
+						}
+					}
+
+				break;
+
+				case 340:
+					if (sw_header[340]>=0)
+					{
+
+						DXF_code_tables[sw_header[340]].dxf_340=line2;
+						sw_header[340]++;
+
+						if (sw_header[340]>max3)
+						{
+							max3=sw_header[340];
+						}
+					}
+
+				break;
+
+				case 341:
+					if (sw_header[341]>=0)
+					{
+
+						DXF_code_tables[sw_header[341]].dxf_341=line2;
+						sw_header[341]++;
+
+						if (sw_header[341]>max3)
+						{
+							max3=sw_header[341];
+						}
+					}
+
+				break;
+
+				case 342:
+					if (sw_header[342]>=0)
+					{
+
+						DXF_code_tables[sw_header[342]].dxf_342=line2;
+						sw_header[342]++;
+
+						if (sw_header[342]>max3)
+						{
+							max3=sw_header[342];
+						}
+					}
+
+				break;
+
+				case 343:
+					if (sw_header[343]>=0)
+					{
+
+						DXF_code_tables[sw_header[343]].dxf_343=line2;
+						sw_header[343]++;
+
+						if (sw_header[343]>max3)
+						{
+							max3=sw_header[343];
+						}
+					}
+
+				break;
+
+				case 347:
+					if (sw_header[347]>=0)
+					{
+
+						DXF_code_tables[sw_header[347]].dxf_347=line2;
+						sw_header[347]++;
+
+						if (sw_header[347]>max3)
+						{
+							max3=sw_header[347];
+						}
+					}
+
+				break;
+
+				case 348:
+					if (sw_header[348]>=0)
+					{
+
+						DXF_code_tables[sw_header[348]].dxf_348=line2;
+						sw_header[348]++;
+
+						if (sw_header[348]>max3)
+						{
+							max3=sw_header[348];
+						}
+					}
+
+				break;
+
+				case 350:
+					if (sw_header[350]>=0)
+					{
+
+						DXF_code_tables[sw_header[350]].dxf_350=line2;
+						sw_header[350]++;
+
+						if (sw_header[350]>max3)
+						{
+							max3=sw_header[350];
+						}
+					}
+
+				break;
+
+				case 360:
+					if (sw_header[360]>=0)
+					{
+
+						DXF_code_tables[sw_header[360]].dxf_360=line2;
+						sw_header[360]++;
+
+						if (sw_header[360]>max3)
+						{
+							max3=sw_header[360];
+						}
+					}
+
+				break;
+
+				case 361:
+					if (sw_header[361]>=0)
+					{
+
+						DXF_code_tables[sw_header[361]].dxf_361=line2;
+						sw_header[361]++;
+
+						if (sw_header[361]>max3)
+						{
+							max3=sw_header[361];
+						}
+					}
+
+				break;
+
+				case 370:
+					if (sw_header[370]>=0)
+					{
+
+						DXF_code_tables[sw_header[370]].dxf_370=line2;
+						sw_header[370]++;
+
+						if (sw_header[370]>max3)
+						{
+							max3=sw_header[370];
+						}
+					}
+
+				break;
+
+				case 371:
+					if (sw_header[371]>=0)
+					{
+
+						DXF_code_tables[sw_header[371]].dxf_371=line2;
+						sw_header[371]++;
+
+						if (sw_header[371]>max3)
+						{
+							max3=sw_header[371];
+						}
+					}
+
+				break;
+
+				case 372:
+					if (sw_header[372]>=0)
+					{
+
+						DXF_code_tables[sw_header[372]].dxf_372=line2;
+						sw_header[372]++;
+
+						if (sw_header[372]>max3)
+						{
+							max3=sw_header[372];
+						}
+					}
+
+				break;
+
+				case 373:
+					if (sw_header[373]>=0)
+					{
+
+						DXF_code_tables[sw_header[373]].dxf_373=line2;
+						sw_header[373]++;
+
+						if (sw_header[373]>max3)
+						{
+							max3=sw_header[373];
+						}
+					}
+
+				break;
+
+				case 380:
+					if (sw_header[380]>=0)
+					{
+
+						DXF_code_tables[sw_header[380]].dxf_380=line2;
+						sw_header[380]++;
+
+						if (sw_header[380]>max3)
+						{
+							max3=sw_header[380];
+						}
+					}
+
+				break;
+
+				case 390:
+					if (sw_header[390]>=0)
+					{
+
+						DXF_code_tables[sw_header[390]].dxf_390=line2;
+						sw_header[390]++;
+
+						if (sw_header[390]>max3)
+						{
+							max3=sw_header[390];
+						}
+					}
+
+				break;
+
+				case 420:
+					if (sw_header[420]>=0)
+					{
+
+						DXF_code_tables[sw_header[420]].dxf_420=line2;
+						sw_header[420]++;
+
+						if (sw_header[420]>max3)
+						{
+							max3=sw_header[420];
+						}
+					}
+
+				break;
+
+
+				case 421:
+					if (sw_header[421]>=0)
+					{
+
+						DXF_code_tables[sw_header[421]].dxf_421=line2;
+						sw_header[421]++;
+
+						if (sw_header[421]>max3)
+						{
+							max3=sw_header[421];
+						}
+					}
+
+				break;
+
+				case 424:
+					if (sw_header[424]>=0)
+					{
+
+						DXF_code_tables[sw_header[424]].dxf_424=line2;
+						sw_header[424]++;
+
+						if (sw_header[424]>max3)
+						{
+							max3=sw_header[424];
+						}
+					}
+
+
+				case 425:
+					if (sw_header[425]>=0)
+					{
+
+						DXF_code_tables[sw_header[425]].dxf_425=line2;
+						sw_header[425]++;
+
+						if (sw_header[425]>max3)
+						{
+							max3=sw_header[425];
+						}
+					}
+
+				break;
+
+				break;
+
+				case 1000:
+					if (sw_header[1000]>=0)
+					{
+
+						DXF_code_tables[sw_header[1000]].dxf_1000=line2;
+						sw_header[1000]++;
+
+						if (sw_header[1000]>max3)
+						{
+							max3=sw_header[1000];
+						}
+					}
+
+				break;
+
+				case 1001:
+					if (sw_header[1001]>=0)
+					{
+
+						DXF_code_tables[sw_header[1001]].dxf_1001=line2;
+						sw_header[1001]++;
+
+						if (sw_header[1001]>max3)
+						{
+							max3=sw_header[1001];
+						}
+					}
+
+				break;
+
+				case 1002:
+					if (sw_header[1002]>=0)
+					{
+
+						DXF_code_tables[sw_header[1002]].dxf_1002=line2;
+						sw_header[1002]++;
+
+						if (sw_header[1002]>max3)
+						{
+							max3=sw_header[1002];
+						}
+					}
+
+				break;
+
+				case 1005:
+					if (sw_header[1005]>=0)
+					{
+
+						DXF_code_tables[sw_header[1005]].dxf_1005=line2;
+						sw_header[1005]++;
+
+						if (sw_header[1005]>max3)
+						{
+							max3=sw_header[1005];
+						}
+					}
+
+				break;
+
+				case 1010:
+					if (sw_header[1010]>=0)
+					{
+
+						DXF_code_tables[sw_header[1010]].dxf_1010=line2;
+						sw_header[1010]++;
+
+						if (sw_header[1010]>max3)
+						{
+							max3=sw_header[1010];
+						}
+					}
+
+				break;
+
+				case 1011:
+					if (sw_header[1011]>=0)
+					{
+
+						DXF_code_tables[sw_header[1011]].dxf_1011=line2;
+						sw_header[1011]++;
+
+						if (sw_header[1011]>max3)
+						{
+							max3=sw_header[1011];
+						}
+					}
+
+				break;
+
+				case 1012:
+					if (sw_header[1012]>=0)
+					{
+
+						DXF_code_tables[sw_header[1012]].dxf_1012=line2;
+						sw_header[1012]++;
+
+						if (sw_header[1012]>max3)
+						{
+							max3=sw_header[1012];
+						}
+					}
+
+				break;
+
+				case 1013:
+					if (sw_header[1013]>=0)
+					{
+
+						DXF_code_tables[sw_header[1013]].dxf_1013=line2;
+						sw_header[1013]++;
+
+						if (sw_header[1013]>max3)
+						{
+							max3=sw_header[1013];
+						}
+					}
+
+				break;
+
+
+				case 1020:
+					if (sw_header[1020]>=0)
+					{
+
+						DXF_code_tables[sw_header[1020]].dxf_1020=line2;
+						sw_header[1020]++;
+
+						if (sw_header[1020]>max3)
+						{
+							max3=sw_header[1020];
+						}
+					}
+
+				break;
+
+				case 1021:
+					if (sw_header[1021]>=0)
+					{
+
+						DXF_code_tables[sw_header[1021]].dxf_1021=line2;
+						sw_header[1021]++;
+
+						if (sw_header[1021]>max3)
+						{
+							max3=sw_header[1021];
+						}
+					}
+
+				break;
+
+				case 1022:
+					if (sw_header[1022]>=0)
+					{
+
+						DXF_code_tables[sw_header[1022]].dxf_1022=line2;
+						sw_header[1022]++;
+
+						if (sw_header[1022]>max3)
+						{
+							max3=sw_header[1022];
+						}
+					}
+
+				break;
+
+				case 1023:
+					if (sw_header[1023]>=0)
+					{
+
+						DXF_code_tables[sw_header[1023]].dxf_1023=line2;
+						sw_header[1023]++;
+
+						if (sw_header[1023]>max3)
+						{
+							max3=sw_header[1023];
+						}
+					}
+
+				break;
+
+				case 1030:
+					if (sw_header[1030]>=0)
+					{
+
+						DXF_code_tables[sw_header[1030]].dxf_1030=line2;
+						sw_header[1030]++;
+
+						if (sw_header[1030]>max3)
+						{
+							max3=sw_header[1030];
+						}
+					}
+
+				break;
+
+				case 1031:
+					if (sw_header[1031]>=0)
+					{
+
+						DXF_code_tables[sw_header[1031]].dxf_1031=line2;
+						sw_header[1031]++;
+
+						if (sw_header[1031]>max3)
+						{
+							max3=sw_header[1031];
+						}
+					}
+
+				break;
+
+				case 1032:
+					if (sw_header[1032]>=0)
+					{
+
+						DXF_code_tables[sw_header[1032]].dxf_1032=line2;
+						sw_header[1032]++;
+
+						if (sw_header[1032]>max3)
+						{
+							max3=sw_header[1032];
+						}
+					}
+
+				break;
+
+				case 1033:
+					if (sw_header[1033]>=0)
+					{
+
+						DXF_code_tables[sw_header[1033]].dxf_1033=line2;
+						sw_header[1033]++;
+
+						if (sw_header[1033]>max3)
+						{
+							max3=sw_header[1033];
+						}
+					}
+
+				break;
+
+				case 1040:
+					if (sw_header[1040]>=0)
+					{
+
+						DXF_code_tables[sw_header[1040]].dxf_1040=line2;
+						sw_header[1040]++;
+
+						if (sw_header[1040]>max3)
+						{
+							max3=sw_header[1040];
+						}
+					}
+
+				break;
+
+				case 1070:
+					if (sw_header[1070]>=0)
+					{
+
+						DXF_code_tables[sw_header[1070]].dxf_1070=line2;
+						sw_header[1070]++;
+
+						if (sw_header[1070]>max3)
+						{
+							max3=sw_header[1070];
+						}
+					}
+
+				break;
+
+
+				case 1071:
+					if (sw_header[1071]>=0)
+					{
+
+						DXF_code_tables[sw_header[1071]].dxf_1071=line2;
+						sw_header[1071]++;
+
+						if (sw_header[1071]>max3)
+						{
+							max3=sw_header[1071];
+						}
+					}
+
+				break;
+
+				default:
+
+					ui->dxf_log->insertPlainText("Found code : ");
+					ui->dxf_log->insertPlainText(split_tables_list[count_tables_list][count_list_item]);
+					ui->dxf_log->insertPlainText(" | ");
+					ui->dxf_log->insertPlainText(split_tables_list[count_tables_list][count_list_item+1]);
+					ui->dxf_log->insertPlainText("\n");
+
+					ui->dxf_log->moveCursor(QTextCursor::End);
+					ui->dxf_log->repaint();
+
+			}
+
+
+		count_list_item=count_list_item+2;
+	}
+
+
+
+
+	return max3;
+}
+
+void DXFtoQET3DB::clear_split_tables()
+{
+	for (xclear = 0;xclear < DXF_item_split;xclear++)
+	{
+		split_tables_list[xclear].clear();
+	}
+
+}
+
+void DXFtoQET3DB::on_Create_QET_ELMT_clicked()
+{
+	ui->ELMT_Result->clear();
+	DXF_Entities_List.DXF_Result.clear();
+
+	ui->MainTab->setCurrentIndex(1);
+	ui->MainTab->repaint();
+
+
+	DXF_main_base[0].QDXF_arc_color="black";
+	DXF_main_base[0].QDXF_circle_color="black";
+	DXF_main_base[0].QDXF_ellipse_color="black";
+	DXF_main_base[0].QDXF_input_color="black";
+	DXF_main_base[0].QDXF_line_color="black";
+	DXF_main_base[0].QDXF_lwpolyline_color="black";
+	DXF_main_base[0].QDXF_polyline_color="black";
+	DXF_main_base[0].QDXF_rectangel_color="black";
+	DXF_main_base[0].QDXF_terminal_color="black";
+	DXF_main_base[0].QDXF_text_color="black";
+	DXF_main_base[0].QDXF_solid_color="black";
+
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+
+	ui->dxf_log->insertPlainText(QTime::currentTime().toString());
+	ui->dxf_log->insertPlainText("=> Start creating converting to ELMT \n");
+	ui->dxf_log->insertPlainText("============================================================================\n");
+
+
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	Filename_db=DXF_main_base[0].dxf_savepath + "/" +DXF_main_base[0].dxf_openfile;
+	Filename_db.append(".db3");
+
+	ui->dxf_log->insertPlainText("Open : ");
+	ui->dxf_log->insertPlainText(Filename_db);
+	ui->dxf_log->insertPlainText("\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+
+
+	ui->dxf_log->insertPlainText("Get dxf Header information\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+
+	ELMT_header_steps NewHeader;
+
+	NewHeader.Open_SQL_DB(Filename_db);
+
+	NewHeader.GetHeader_info(Filename_db);
+
+	NewHeader.Close_SQL_DB(Filename_db);
+
+	elmt_tables NewLayerTable;
+
+	ui->dxf_log->insertPlainText("Get dxf Layer information\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	NewLayerTable.Open_SQL_DB(Filename_db);
+
+	ui->dxf_log->insertPlainText(NewLayerTable.Get_Tables_Layers(Filename_db));
+
+	NewLayerTable.Close_SQL_DB(Filename_db);
+
+	ui->dxf_log->insertPlainText(NewLayerTable.Get_Tables_Layers(Filename_db));
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+
+
+	ResultELMT="";
+	BaseELMT NewBase;
+
+	ui->dxf_log->insertPlainText("Creating header of ELMT file \n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	NewBase.ELMT_definition_width=NewHeader.Calc_Width();
+	NewBase.ELMT_definition_height=NewHeader.Calc_Height();
+	NewBase.ELMT_definition_version="0.51";
+	NewBase.ELMT_definition_hotspot_x=DXF_variable.DXF_INSBASE_X;
+	NewBase.ELMT_definition_hotspot_y=DXF_variable.DXF_INSBASE_Y;
+	NewBase.ELMT_definition_link_type="simple";
+	NewBase.ELMT_definition_orientation="dyyy";
+	NewBase.ELMT_definition_type="element";
+
+	NewBase.ELMT_Name_en="en";
+	NewBase.ELMT_Name_fr="fr";
+
+	NewBase.ELMT_Name_text_en=DXF_main_base[0].dxf_openfile;
+	NewBase.ELMT_Name_text_fr=DXF_main_base[0].dxf_openfile;
+
+	//NewBase.ELMT_kind_name="";
+	//NewBase.ELMT_kind_show="";
+	//NewBase.ELMT_kind_type="";
+
+	NewBase.ELMT_informations_Author="DXF converter";
+	NewBase.ELMT_informations_License="see http://qelectrotech.org/wiki/doc/elements_license";;
+	NewBase.ELMT_converter_version="V3.0 DB";
+	NewBase.ELMT_converter_by="Ronny Desmedt";
+
+	ui->dxf_log->insertPlainText("Add UUID names, kindinformation, information ... ELMT file \n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	//ResultELMT.append(NewBase.DefinitionStart());
+	DXF_Entities_List.DXF_Result.append(NewBase.DefinitionStart());
+	ResultELMT=DXF_Entities_List.DXF_Result;
+
+	ui->ELMT_Result->clear();
+
+	ui->ELMT_Result->insertPlainText(ResultELMT);
+	ui->ELMT_Result->moveCursor(QTextCursor::End);
+	ui->ELMT_Result->repaint();
+
+	//ResultELMT.append(NewBase.Uuid());
+	DXF_Entities_List.DXF_Result.append(NewBase.Uuid());
+	ResultELMT=DXF_Entities_List.DXF_Result;
+
+	ui->ELMT_Result->clear();
+
+	ui->ELMT_Result->insertPlainText(ResultELMT);
+	ui->ELMT_Result->moveCursor(QTextCursor::End);
+	ui->ELMT_Result->repaint();
+
+	//ResultELMT.append(NewBase.Names());
+	DXF_Entities_List.DXF_Result.append(NewBase.Names());
+	ResultELMT=DXF_Entities_List.DXF_Result;
+
+	ui->ELMT_Result->clear();
+
+	ui->ELMT_Result->insertPlainText(ResultELMT);
+	ui->ELMT_Result->moveCursor(QTextCursor::End);
+	ui->ELMT_Result->repaint();
+
+	//ResultELMT.append(NewBase.KindInformation());
+	DXF_Entities_List.DXF_Result.append(NewBase.KindInformation());
+	ResultELMT=DXF_Entities_List.DXF_Result;
+
+	ui->ELMT_Result->clear();
+
+	ui->ELMT_Result->insertPlainText(ResultELMT);
+	ui->ELMT_Result->moveCursor(QTextCursor::End);
+	ui->ELMT_Result->repaint();
+
+	//ResultELMT.append(NewBase.Informations());
+	DXF_Entities_List.DXF_Result.append(NewBase.Informations());
+	ResultELMT=DXF_Entities_List.DXF_Result;
+
+	ui->ELMT_Result->clear();
+
+	ui->ELMT_Result->insertPlainText(ResultELMT);
+	ui->ELMT_Result->moveCursor(QTextCursor::End);
+	ui->ELMT_Result->repaint();
+
+	//ResultELMT.append(NewBase.DescriptionStart());
+	DXF_Entities_List.DXF_Result.append(NewBase.DescriptionStart());
+	ResultELMT=DXF_Entities_List.DXF_Result;
+
+	ui->ELMT_Result->clear();
+
+	ui->ELMT_Result->insertPlainText(ResultELMT);
+	ui->ELMT_Result->moveCursor(QTextCursor::End);
+	ui->ELMT_Result->repaint();
+
+	ui->ELMT_Result->clear();
+
+	elmt_entities NewEntity;
+
+	ui->dxf_log->insertPlainText("Add DXF entities to ELMT file \n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	NewEntity.Open_SQL_DB(Filename_db);
+
+	ui->ELMT_Result->clear();
+
+	//create entities
+	ui->dxf_log->insertPlainText(NewEntity.Get_Entities(Filename_db));
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	NewEntity.Close_SQL_DB(Filename_db);
+
+
+
+	//ResultELMT.append(DXF_Entities_List.DXF_Result);
+	//DXF_Entities_List.DXF_Result;
+	ResultELMT=DXF_Entities_List.DXF_Result;
+
+	ui->ELMT_Result->clear();
+
+	ui->ELMT_Result->insertPlainText(ResultELMT);
+	ui->ELMT_Result->moveCursor(QTextCursor::End);
+	ui->ELMT_Result->repaint();
+
+
+
+	//ResultELMT.append(NewBase.DescriptionEnd());
+	DXF_Entities_List.DXF_Result.append(NewBase.DescriptionEnd());
+	ResultELMT=DXF_Entities_List.DXF_Result;
+
+	ui->ELMT_Result->clear();
+
+	ui->ELMT_Result->insertPlainText(ResultELMT);
+	ui->ELMT_Result->moveCursor(QTextCursor::End);
+	ui->ELMT_Result->repaint();
+
+	//ResultELMT.append(NewBase.DefinitionEnd());
+	DXF_Entities_List.DXF_Result.append(NewBase.DefinitionEnd());
+	ResultELMT=DXF_Entities_List.DXF_Result;
+
+	ui->ELMT_Result->clear();
+
+	ui->ELMT_Result->insertPlainText(ResultELMT);
+	ui->ELMT_Result->moveCursor(QTextCursor::End);
+	ui->ELMT_Result->repaint();
+
+	ui->dxf_log->insertPlainText("DXF file converted to ELMT file\n");
+	ui->dxf_log->moveCursor(QTextCursor::End);
+	ui->dxf_log->repaint();
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+
+	ui->dxf_log->insertPlainText(QTime::currentTime().toString());
+	ui->dxf_log->insertPlainText("=> End of converting DXF to ELMT \n");
+	ui->dxf_log->insertPlainText("============================================================================\n");
+
+
+}
+
+void DXFtoQET3DB::on_Choose_DB_clicked()
+{
+	ui->dxf_log->clear();
+
+	ui->MainTab->setCurrentIndex(0);
+	ui->MainTab->repaint();
+
+	QFileDialog dialog(this);
+	dialog.setNameFilter(tr("DB files (*.*)"));
+	dialog.setFileMode(QFileDialog::ExistingFile);
+	dialog.setViewMode(QFileDialog::Detail);
+
+	if (dialog.exec() == QDialog::Accepted)
+	{
+		DXF_main_base[0].dxf_filepath = dialog.selectedFiles().first();
+		DXF_main_base[0].dxf_dir = dialog.directory().absolutePath();
+		DXF_main_base[0].dxf_openfile=DXF_main_base[0].dxf_filepath.split("/").last();
+		ui->dxf_file_path_save->setText(DXF_main_base[0].dxf_savepath);
+
+		Filename_db_temp=dialog.selectedFiles().first();
+		Filename_db=Filename_db_temp.split("/").last();
+		DXF_main_base[0].dxf_openfile=Filename_db.split(".").first();
+		Filename_db=DXF_main_base[0].dxf_openfile;
+		ui->dxf_open_file->setPlaceholderText(DXF_main_base[0].dxf_openfile);
+	}
+
+	ui->dxf_log->insertPlainText("============================================================================\n");
+
+	ui->dxf_log->insertPlainText(QTime::currentTime().toString());
+	ui->dxf_log->insertPlainText("=> Opening DB3 file (dxf converted table file) \n");
+	ui->dxf_log->insertPlainText(Filename_db);
+	ui->dxf_log->insertPlainText("\n");
+	ui->dxf_log->insertPlainText("============================================================================\n");
+
+	return;
+}
+
+void DXFtoQET3DB::on_SavetoELMT_clicked()
+{
+	QFile file(DXF_main_base[0].dxf_savepath + "/" + DXF_main_base[0].dxf_openfile + ".elmt");
+
+	if (!file.open(QFile::WriteOnly | QFile::Text)) {
+		QMessageBox::warning(this, tr("Application"),
+							 tr("Cannot write file %1:\n%2.")
+							 .arg(DXF_main_base[0].dxf_dir)
+							 .arg(file.errorString()));
+		return;
+	}
+
+	QTextStream out(&file);
+	//out << ui->ELMT_Result->toPlainText();
+	out << DXF_Entities_List.DXF_Result;
+
+	file.close();
+	QMessageBox::information(this, tr("Export as elmt file"), tr("L'element %1 a bien ete enregistre").arg(ui->dxf_open_file->text()));
+}
+
+void DXFtoQET3DB::on_Convert_dxf_blocks_clicked()
+{
+
+
+
+}
+
+
+
+void DXFtoQET3DB::on_Convert_dxf_entities_clicked()
+{
+
+}

Added: branches/DXFtoQET3_DB/dxftoqet3db.h
===================================================================
--- branches/DXFtoQET3_DB/dxftoqet3db.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/dxftoqet3db.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,351 @@
+#ifndef DXFTOQET3DB_H
+#define DXFTOQET3DB_H
+
+#include <QWidget>
+#include <QObject>
+#include <QMessageBox>
+#include <QtWidgets>
+#include <QTableView>
+#include <QTextStream>
+#include <QFileDialog>
+#include <QFile>
+#include <QModelIndex>
+#include <QSettings>
+#include <QDateTime>
+#include <QPlainTextEdit>
+
+#include "data.h"
+#include "src/dxf_load.h"
+#include "db/dbmanager.h"
+
+#include "src/ELMT_steps/elmt_header_steps.h"
+
+#include "src/ELMT_base_types/dxf_base_arc.h"
+#include "src/ELMT_base_types/dxf_base_circle.h"
+#include "src/ELMT_base_types/dxf_base_ellipse.h"
+#include "src/ELMT_base_types/dxf_base_input.h"
+#include "src/ELMT_base_types/dxf_base_line.h"
+#include "src/ELMT_base_types/dxf_base_polyline.h"
+#include "src/ELMT_base_types/dxf_base_rectangel.h"
+#include "src/ELMT_base_types/dxf_base_terminal.h"
+#include "src/ELMT_base_types/dxf_base_text.h"
+#include "src/ELMT_base/baseelmt.h"
+#include "src/ELMT_steps/elmt_tables.h"
+#include "src/ELMT_steps/elmt_entities.h"
+
+
+namespace Ui {
+	class DXFtoQET3DB;
+}
+
+class DXFtoQET3DB : public QWidget
+{
+	Q_OBJECT
+
+	public:
+	explicit DXFtoQET3DB(QWidget *parent = 0);
+	~DXFtoQET3DB();
+
+		dbManager mydb;
+
+
+
+		int main_sw1; // Binaery = 0 ASCII = 1
+		int main_sw2; // CSV = 1
+		int main_sw3; // DXF = 1
+
+		int32_t CSV_line_count;
+		int32_t CSV_row;
+		int32_t CSV_col;
+
+		int32_t csv_elmt_count;
+
+		int32_t split_count1;
+		int32_t counter_Split;
+		int32_t split_lenght;
+
+		int32_t dxf_split_count1;
+		int32_t counter1;
+
+		int32_t index_header;
+		int32_t index_classes;
+		int32_t index_tables;
+		int32_t index_blocks;
+		int32_t index_entities;
+		int32_t index_objects;
+		int32_t index_thumbnailimage;
+
+		int32_t lenght_header;
+		int32_t lenght_classes;
+		int32_t lenght_tables;
+		int32_t lenght_blocks;
+		int32_t lenght_entities;
+		int32_t lenght_objects;
+		int32_t lenght_thumbnailimage;
+
+		int32_t id_header;
+		int32_t id_classes;
+		int32_t id_tables;
+		int32_t id_blocks;
+		int32_t id_entities;
+		int32_t id_objects;
+		int32_t id_thumbnailimage;
+
+		int sw_header[1072];
+		int sw_classes[1072];
+		int sw_tables[1072];
+		int sw_blocks[1072];
+		int sw_entities[1072];
+		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;
+
+		int64_t count_classes;
+		int64_t count_classes_record_id;
+		int64_t count_classes_lines;
+		int64_t count_classes_item;
+
+		int64_t count_tables;
+		int64_t count_tables_record_id;
+		int64_t count_tables_lines;
+		int64_t count_tables_item;
+
+		int64_t count_blocks;
+		int64_t count_blocks_record_id;
+		int64_t count_blocks_lines;
+		int64_t count_blocks_item;
+
+		int64_t count_entities;
+		int64_t count_entities_record_id;
+		int64_t count_entities_lines;
+		int64_t count_entities_item;
+
+		int64_t count_objects;
+		int64_t count_objects_record_id;
+		int64_t count_objects_lines;
+		int64_t count_object_item;
+
+		int64_t count_thumbnailimage;
+		int64_t count_thumbnailimage_record_id;
+		int64_t count_thumbnailimage_lines;
+		int64_t count_thumbnailimage_item;
+
+		int64_t header_max_items;
+		int64_t classes_max_items;
+		int64_t tables_max_items;
+		int64_t blocks_max_items;
+		int64_t entities_max_items;
+		int64_t objects_max_items;
+		int64_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;
+
+		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 for1;
+		int32_t for2;
+
+		int32_t line1;
+		QString line2;
+		int32_t line3;
+
+		int32_t x;
+		int32_t x1;
+		int32_t x10;
+		int32_t x2;
+		int32_t x3;
+		int32_t x4;
+		int32_t xclear;
+
+		int32_t clear_code_set;
+
+		int64_t max;
+		int64_t max3;
+
+		int32_t index1;
+		int32_t	index2;
+
+		QStringList dxf_header;
+		QStringList dxf_classes;
+		QStringList dxf_tables;
+		QStringList dxf_blocks;
+		QStringList dxf_entities;
+		QStringList dxf_objects;
+		QStringList dxf_thumbnailimage;
+
+		QStringList dxf_header_items[DXF_item_split];
+		QStringList dxf_classes_items[DXF_item_split];
+		QStringList dxf_tables_items[DXF_item_split];
+		QStringList dxf_blocks_items[DXF_item_split];
+		QStringList dxf_entities_items[DXF_item_split];
+		QStringList dxf_objects_items[DXF_item_split];
+		QStringList dxf_thumbnailimage_items[DXF_item_split];
+		QStringList split_tables_list[DXF_item_split];
+
+		QString Copy_list_item;
+
+		QString ResultELMT;
+
+		int32_t list_header;
+		int32_t list_classes;
+		int32_t list_tables;
+		int32_t list_blocks;
+		int32_t list_entities;
+		int32_t list_objects;
+		int32_t list_thumbnailimage;
+
+		int32_t max_header;
+		int32_t max_classes;
+		int32_t max_tables;
+		int32_t max_blocks;
+		int32_t max_entities;
+		int32_t max_objects;
+		int32_t max_thumbnailimage;
+
+		int32_t max_length;
+
+		int32_t dxf_line_count1;
+		int32_t dxf_line_count2;
+
+		QString log_file;
+		QString log_trans;
+		QString log_split;
+		QString status1;
+
+		QString FileType;
+		QString FileName;
+		QString Filename2;
+		QString Filename_db;
+		QString Filename_db_temp;
+
+		QString text1;
+
+		QString Config_QET_User_Symbols;
+		QString Config_DXF_Block_color;
+		QString Config_DXF_Entities_color;
+		QString Config_save_to_file;
+		QString Config_in_read_all;
+
+		QStringList Config_list;
+		QStringList Config_List_Split;
+
+		QString Result;
+		QString Result4;
+
+		QStandardItemModel *model;
+		QStandardItemModel *model2;
+		QStandardItemModel *model3;
+		QAbstractItemModel *model4;
+		QAbstractItemModel *model5;
+
+		QStringList List2;
+		QStringList List3;
+
+		QStringList header_split;
+		QStringList classes_split;
+		QStringList tables_split;
+		QStringList blocks_split;
+		QStringList entities_split;
+		QStringList objects_split;
+		QStringList thumbnailimage_split;
+		//QStringList split_tables_list;
+
+	signals:
+
+
+	protected:
+		void changeEvent(QEvent *e);
+
+		private slots:
+
+		void on_OpenFile_clicked();
+
+		void on_savepath_2_clicked();
+
+		void on_Load_dxf_into_tables_clicked();
+
+		void on_Delete_DB_clicked();
+
+		void split_header();
+
+		void split_classes();
+
+		void split_tables();
+
+		void split_blocks();
+
+		void split_entities();
+
+		void split_objects();
+
+		void split_thumbnailimage();
+
+		void section_lengts();
+
+		void copy_list();
+
+		void clear_dxf_header_items();
+
+		void clear_dxf_classes_items();
+
+		void clear_dxf_tables_items();
+
+		void clear_dxf_blocks_items();
+
+		void clear_dxf_entities_items();
+
+		void clear_dxf_objects_items();
+
+		void clear_dxf_thumbnailimage_items();
+
+		void clear_split_tables();
+
+		void clear_sw_header();
+
+		void clear_dxf_code_tables();
+
+		int Split_list(QString TypeList, int x3max, int count_list_item, int count_tables_list, int header_id);
+
+		//QString Calc_Width();
+		//QString Calc_Height();
+
+
+		void on_Create_QET_ELMT_clicked();
+
+
+
+		void on_Choose_DB_clicked();
+
+		void on_SavetoELMT_clicked();
+
+
+
+
+		void on_Convert_dxf_blocks_clicked();
+
+
+
+		void on_Convert_dxf_entities_clicked();
+
+		private:
+		Ui::DXFtoQET3DB *ui;
+};
+
+#endif // DXFTOQET3DB_H

Added: branches/DXFtoQET3_DB/dxftoqet3db.ui
===================================================================
--- branches/DXFtoQET3_DB/dxftoqet3db.ui	                        (rev 0)
+++ branches/DXFtoQET3_DB/dxftoqet3db.ui	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,530 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>DXFtoQET3DB</class>
+ <widget class="QWidget" name="DXFtoQET3DB">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1054</width>
+    <height>722</height>
+   </rect>
+  </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle">
+   <string>DXFtoQET3DB</string>
+  </property>
+  <widget class="QTabWidget" name="MainTab">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>100</y>
+     <width>1031</width>
+     <height>571</height>
+    </rect>
+   </property>
+   <property name="sizePolicy">
+    <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+     <horstretch>0</horstretch>
+     <verstretch>0</verstretch>
+    </sizepolicy>
+   </property>
+   <property name="tabPosition">
+    <enum>QTabWidget::West</enum>
+   </property>
+   <property name="currentIndex">
+    <number>5</number>
+   </property>
+   <widget class="QWidget" name="Log">
+    <attribute name="title">
+     <string>Log</string>
+    </attribute>
+    <widget class="QPlainTextEdit" name="dxf_log">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>10</y>
+       <width>981</width>
+       <height>551</height>
+      </rect>
+     </property>
+     <property name="verticalScrollBarPolicy">
+      <enum>Qt::ScrollBarAlwaysOn</enum>
+     </property>
+     <property name="horizontalScrollBarPolicy">
+      <enum>Qt::ScrollBarAlwaysOn</enum>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="tab_ELMT">
+    <attribute name="title">
+     <string>ELMT</string>
+    </attribute>
+    <widget class="QPlainTextEdit" name="ELMT_Result">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>10</y>
+       <width>981</width>
+       <height>551</height>
+      </rect>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="Home">
+    <attribute name="title">
+     <string>Home</string>
+    </attribute>
+    <widget class="QLineEdit" name="dxf_file_path_save">
+     <property name="geometry">
+      <rect>
+       <x>140</x>
+       <y>60</y>
+       <width>351</width>
+       <height>27</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label">
+     <property name="geometry">
+      <rect>
+       <x>30</x>
+       <y>60</y>
+       <width>101</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Save path elmt</string>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="dxf_file_path">
+     <property name="geometry">
+      <rect>
+       <x>140</x>
+       <y>100</y>
+       <width>351</width>
+       <height>27</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_2">
+     <property name="geometry">
+      <rect>
+       <x>30</x>
+       <y>100</y>
+       <width>91</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Directory</string>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="dxf_open_file">
+     <property name="geometry">
+      <rect>
+       <x>140</x>
+       <y>140</y>
+       <width>351</width>
+       <height>27</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_3">
+     <property name="geometry">
+      <rect>
+       <x>30</x>
+       <y>140</y>
+       <width>91</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Open file</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_4">
+     <property name="geometry">
+      <rect>
+       <x>70</x>
+       <y>330</y>
+       <width>51</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>CSV</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_5">
+     <property name="geometry">
+      <rect>
+       <x>70</x>
+       <y>290</y>
+       <width>51</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>DXF</string>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="dxf_line_count1">
+     <property name="geometry">
+      <rect>
+       <x>130</x>
+       <y>290</y>
+       <width>141</width>
+       <height>27</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="dxf_line_count2">
+     <property name="geometry">
+      <rect>
+       <x>130</x>
+       <y>330</y>
+       <width>141</width>
+       <height>27</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_6">
+     <property name="geometry">
+      <rect>
+       <x>280</x>
+       <y>330</y>
+       <width>131</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>nr of lines</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_7">
+     <property name="geometry">
+      <rect>
+       <x>280</x>
+       <y>290</y>
+       <width>131</width>
+       <height>31</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>nr of lines</string>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="Open_file">
+    <attribute name="title">
+     <string>Open File</string>
+    </attribute>
+    <widget class="QPlainTextEdit" name="dxf_file_loaded">
+     <property name="geometry">
+      <rect>
+       <x>13</x>
+       <y>7</y>
+       <width>971</width>
+       <height>551</height>
+      </rect>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="Settings">
+    <attribute name="title">
+     <string>Settings</string>
+    </attribute>
+    <widget class="QLabel" name="dxf_line_counter_4">
+     <property name="geometry">
+      <rect>
+       <x>20</x>
+       <y>60</y>
+       <width>163</width>
+       <height>27</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Path user symbols QET : </string>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="QET_user_symbole_path_save">
+     <property name="geometry">
+      <rect>
+       <x>190</x>
+       <y>60</y>
+       <width>450</width>
+       <height>27</height>
+      </rect>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>450</width>
+       <height>0</height>
+      </size>
+     </property>
+    </widget>
+    <widget class="QPushButton" name="savepath_2">
+     <property name="geometry">
+      <rect>
+       <x>640</x>
+       <y>60</y>
+       <width>20</width>
+       <height>27</height>
+      </rect>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="maximumSize">
+      <size>
+       <width>20</width>
+       <height>16777215</height>
+      </size>
+     </property>
+     <property name="text">
+      <string>...</string>
+     </property>
+    </widget>
+   </widget>
+   <widget class="QWidget" name="Info">
+    <attribute name="title">
+     <string>Info</string>
+    </attribute>
+    <widget class="QPlainTextEdit" name="plainTextEdit">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>10</y>
+       <width>981</width>
+       <height>551</height>
+      </rect>
+     </property>
+     <property name="plainText">
+      <string>
+DXF to QET ELMT converter V3.0 use SQlite
+==============================================================================================================
+
+This converter converts only ASCII dxf files
+binary dxf files are not converted.
+
+when having problems with a dxf file, copy paste the log tab into a email
+with a description of the problem you have found
+
+if you have a drawing with block inside blocks, open this drawing with a cad program and 
+explode this blocks into one level blocks.
+
+==============================================================================================================
+
+A few steps to follow
+
+Click on &quot;Open dxf file&quot; to search the dxf file you want to convert
+
+next click on &quot;Load dxf into DB&quot;, this starts splitting and loading the dxf code into the different db tables
+
+is this is don you dont need everityme to do the &quot;load dxf into DB&quot;
+
+you can then click on &quot;Choose DB to proces&quot;
+
+after &quot;Load dxf into DB&quot; or &quot;Choose DB to proces&quot; click on &quot;Create QET elmt&quot; to create a elmt output
+
+you can check this syntax under the tab &quot;ELMT&quot;
+
+Then click on &quot;Save to ELMT file&quot; to store the result into the QET user cymbols folder
+
+if this is not done into the correct folder, checkout the tab settings to change the destination path
+
+The time needed for loading into the DB depents on the amount of lines in the dxf file
+
+21:26:49=&gt; Start loading dxf file into tables 
+total lines : 28935
+header items :255
+tables items :447
+blocks items :405
+entities items :397
+End loading into db 21:31:25
+
+the creation of the ELMT file is faster and depents on the amount of ENTITIES and BLOCKS in the dxf file.</string>
+     </property>
+    </widget>
+   </widget>
+  </widget>
+  <widget class="QWidget" name="layoutWidget">
+   <property name="geometry">
+    <rect>
+     <x>40</x>
+     <y>680</y>
+     <width>1001</width>
+     <height>29</height>
+    </rect>
+   </property>
+   <layout class="QHBoxLayout" name="horizontalLayout">
+    <item>
+     <widget class="QLabel" name="label_8">
+      <property name="text">
+       <string>Dxf section</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QLineEdit" name="dxf_section">
+      <property name="minimumSize">
+       <size>
+        <width>0</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="maximumSize">
+       <size>
+        <width>200</width>
+        <height>16777215</height>
+       </size>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QLabel" name="label_9">
+      <property name="text">
+       <string>Count</string>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <widget class="QLineEdit" name="dxf_section_count">
+      <property name="maximumSize">
+       <size>
+        <width>100</width>
+        <height>16777215</height>
+       </size>
+      </property>
+     </widget>
+    </item>
+    <item>
+     <spacer name="horizontalSpacer">
+      <property name="orientation">
+       <enum>Qt::Horizontal</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>40</width>
+        <height>20</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+   </layout>
+  </widget>
+  <widget class="QWidget" name="layoutWidget">
+   <property name="geometry">
+    <rect>
+     <x>10</x>
+     <y>10</y>
+     <width>1031</width>
+     <height>71</height>
+    </rect>
+   </property>
+   <layout class="QGridLayout" name="gridLayout">
+    <item row="1" column="3">
+     <widget class="QPushButton" name="Convert_dxf_entities">
+      <property name="enabled">
+       <bool>false</bool>
+      </property>
+      <property name="text">
+       <string>Convert DXF entities</string>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="5">
+     <widget class="QPushButton" name="Create_QET_ELMT">
+      <property name="text">
+       <string>Create QET elmt</string>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="6">
+     <widget class="QPushButton" name="SavetoELMT">
+      <property name="text">
+       <string>Save to ELMT file</string>
+      </property>
+     </widget>
+    </item>
+    <item row="0" column="0">
+     <widget class="QPushButton" name="OpenFile">
+      <property name="text">
+       <string>Open dxf file</string>
+      </property>
+     </widget>
+    </item>
+    <item row="1" column="2">
+     <spacer name="horizontalSpacer_3">
+      <property name="orientation">
+       <enum>Qt::Horizontal</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>40</width>
+        <height>20</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+    <item row="1" column="0">
+     <widget class="QPushButton" name="Load_dxf_into_tables">
+      <property name="text">
+       <string>Load dxf into DB</string>
+      </property>
+     </widget>
+    </item>
+    <item row="1" column="4">
+     <spacer name="horizontalSpacer_4">
+      <property name="orientation">
+       <enum>Qt::Horizontal</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>40</width>
+        <height>20</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+    <item row="0" column="3">
+     <widget class="QPushButton" name="Convert_dxf_blocks">
+      <property name="enabled">
+       <bool>false</bool>
+      </property>
+      <property name="text">
+       <string>Convert DXF blocks</string>
+      </property>
+     </widget>
+    </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="1" column="1">
+     <widget class="QPushButton" name="Delete_DB">
+      <property name="text">
+       <string>Delete SQL DB</string>
+      </property>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>

Added: branches/DXFtoQET3_DB/main.cpp
===================================================================
--- branches/DXFtoQET3_DB/main.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/main.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,15 @@
+#include "dxftoqet3db.h"
+#include <QApplication>
+
+#include "data.h"
+
+
+int main(int argc, char *argv[])
+{
+
+	QApplication a(argc, argv);
+	DXFtoQET3DB w;
+	w.show();
+
+	return a.exec();
+}

Added: branches/DXFtoQET3_DB/src/DXF_control/dxf_corner_to_elmt.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/DXF_control/dxf_corner_to_elmt.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/DXF_control/dxf_corner_to_elmt.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,133 @@
+#include "dxf_corner_to_elmt.h"
+
+dxf_corner_to_elmt::dxf_corner_to_elmt(QWidget *parent) : QWidget(parent)
+{
+
+}
+
+double dxf_corner_to_elmt::QET_start_angle()
+{
+
+	begin1=450-start_angle;
+
+
+	if (begin1>360)
+	{
+		begin0=begin1-360;
+	}
+	else
+	{
+		if(begin1<0)
+		{
+			begin0=360-begin1;
+		}
+		else
+		{
+			begin0=begin1;
+		}
+	}
+
+	return -(begin0-90);
+}
+
+
+
+
+double dxf_corner_to_elmt::QET_end_angle()
+{
+
+	einde1=450-end_angle;
+
+	if (einde1>360)
+	{
+		einde0=einde1-360;
+	}
+	else
+	{
+		if (einde1<0)
+		{
+			einde0=einde1-360;
+		}
+		else
+		{
+			einde0=einde1;
+		}
+	}
+
+
+	return einde0;
+}
+
+;
+
+
+
+
+double dxf_corner_to_elmt::QET_corner_angle()
+{
+	if (begin2>einde2)
+	{
+		N=einde2-begin2;
+	}
+	else
+	{
+		N=einde2-begin2-360;
+	}
+
+	if (N<0)
+	{
+		O=-N;
+	}
+	else
+	{
+		O=N;
+	}
+
+	J=end_angle2-start_angle2+N;
+	K=360-end_angle2;
+	L=360-start_angle2;
+	M=K-L;
+	R=-O;
+	S=J-O;
+
+	if (S < -360)
+	{
+		T=S+360;
+	}
+	else
+	{
+		T=S;
+	}
+
+	if (begin2<einde2)
+	{
+		U=M;
+	}
+	else
+	{
+		U=T;
+	}
+
+	if (U<0)
+	{
+		V=-U;
+	}
+	else
+	{
+		V=U;
+	}
+
+	W=U+V;
+
+	if (W==0)
+	{
+		hoek2=-V;
+	}
+	else
+	{
+		hoek2=T;
+	}
+
+	return -hoek2;
+
+}

Added: branches/DXFtoQET3_DB/src/DXF_control/dxf_corner_to_elmt.h
===================================================================
--- branches/DXFtoQET3_DB/src/DXF_control/dxf_corner_to_elmt.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/DXF_control/dxf_corner_to_elmt.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,56 @@
+#ifndef DXF_CORNER_TO_ELMT_H
+#define DXF_CORNER_TO_ELMT_H
+
+#include <QWidget>
+#include <QObject>
+
+#include "data.h"
+#include "src/dxf_load.h"
+#include "db/dbmanager.h"
+
+class dxf_corner_to_elmt : public QWidget
+{
+	Q_OBJECT
+	public:
+	explicit dxf_corner_to_elmt(QWidget *parent = 0);
+
+
+	double start_angle;
+	double start_angle2;
+
+	double end_angle;
+	double end_angle2;
+
+	double begin0;
+	double begin1;
+	double begin2;
+
+	double einde0;
+	double einde1;
+	double einde2;
+
+	double hoek2;
+
+	double N;
+	double O;
+	double J;
+	double K;
+	double L;
+	double M;
+	double R;
+	double S;
+	double T;
+	double U;
+	double V;
+	double W;
+
+	double QET_start_angle();
+	double QET_end_angle();
+	double QET_corner_angle();
+
+	signals:
+
+	public slots:
+};
+
+#endif // DXF_CORNER_TO_ELMT_H

Added: branches/DXFtoQET3_DB/src/DXF_control/dxf_layer_control.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/DXF_control/dxf_layer_control.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/DXF_control/dxf_layer_control.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,44 @@
+#include "dxf_layer_control.h"
+
+extern struct DXF_Layers DXF_Layer_list[DXF_layers_set];
+
+DXF_layer_control::DXF_layer_control(QWidget *parent) : QWidget(parent)
+{
+}
+
+QString DXF_layer_control::dxf_layer_ltype()
+{
+	Layer_count=0;
+	Layer_end=0;
+
+	Layer_end=DXF_layers_set;
+
+	if (layer_to_find=="")
+	{
+		layer_ltype="Continuous";
+	}
+
+	else
+	{
+
+		while (Layer_count<Layer_end)
+		{
+
+			if (DXF_Layer_list[Layer_count].DXF_Layer_naam==layer_to_find)
+			{
+				layer_ltype=DXF_Layer_list[Layer_count].DXF_Layer_linetype;
+				Layer_count=Layer_end;
+			}
+			else
+			{
+				Layer_count=Layer_count+1;
+			}
+
+
+		}
+	}
+
+
+
+	return layer_ltype;
+}

Added: branches/DXFtoQET3_DB/src/DXF_control/dxf_layer_control.h
===================================================================
--- branches/DXFtoQET3_DB/src/DXF_control/dxf_layer_control.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/DXF_control/dxf_layer_control.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,32 @@
+#ifndef DXF_LAYER_CONTROL_H
+#define DXF_LAYER_CONTROL_H
+
+//#include <QMainWindow>
+#include <QWidget>
+#include <QObject>
+
+#include "data.h"
+#include "src/dxf_load.h"
+#include "db/dbmanager.h"
+
+class DXF_layer_control : public QWidget // QMainWindow
+{
+	Q_OBJECT
+	public:
+	explicit DXF_layer_control(QWidget *parent = 0);
+
+	QString layer_to_find;
+	QString layer_ltype;
+
+	int Layer_count;
+	int Layer_end;
+
+	QString dxf_layer_ltype();
+
+	signals:
+
+	public slots:
+
+};
+
+#endif // DXF_LAYER_CONTROL_H

Added: branches/DXFtoQET3_DB/src/DXF_control/dxf_ltype_control.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/DXF_control/dxf_ltype_control.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/DXF_control/dxf_ltype_control.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,157 @@
+#include "dxf_ltype_control.h"
+
+DXF_Ltype_control::DXF_Ltype_control(QWidget *parent) : QWidget(parent)
+{
+
+
+}
+
+QString DXF_Ltype_control::Ltype_control()
+{
+
+	LTfound="normal";
+
+	if (FindLT == "" )
+	{
+		DXF_layer_control db_layer_control;
+
+		db_layer_control.layer_to_find=Layer;
+
+		DXF_Ltype_control db_ltype;
+
+		db_ltype.FindLT=db_layer_control.dxf_layer_ltype();
+
+
+	   LTfound=db_ltype.Ltype_control();
+
+	}
+
+	if (FindLT == "ByLayer" )
+	{
+		DXF_layer_control db_layer_control;
+
+		db_layer_control.layer_to_find=Layer;
+
+		DXF_Ltype_control db_ltype;
+
+		db_ltype.FindLT=db_layer_control.dxf_layer_ltype();
+
+
+	   LTfound=db_ltype.Ltype_control();
+
+	}
+
+	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";
+	}
+
+
+	return LTfound;
+}

Added: branches/DXFtoQET3_DB/src/DXF_control/dxf_ltype_control.h
===================================================================
--- branches/DXFtoQET3_DB/src/DXF_control/dxf_ltype_control.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/DXF_control/dxf_ltype_control.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,27 @@
+#ifndef DXF_LTYPE_CONTROL_H
+#define DXF_LTYPE_CONTROL_H
+
+//#include <QMainWindow>
+#include <QWidget>
+#include <QObject>
+#include <src/DXF_control/dxf_layer_control.h>
+
+class DXF_Ltype_control : public QWidget // QMainWindow
+{
+	Q_OBJECT
+	public:
+	explicit DXF_Ltype_control(QWidget *parent = 0);
+
+	QString LTfound;
+	QString FindLT;
+	QString Layer;
+
+	QString Ltype_control();
+
+	signals:
+
+	public slots:
+
+};
+
+#endif // DXF_LTYPE_CONTROL_H

Added: branches/DXFtoQET3_DB/src/DXF_control/dxf_text_control.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/DXF_control/dxf_text_control.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/DXF_control/dxf_text_control.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,62 @@
+#include "dxf_text_control.h"
+
+DXF_Text_control::DXF_Text_control(QWidget *parent) : QWidget(parent)
+{
+}
+
+
+QString DXF_Text_control::Text_control()
+{
+
+	if(TextToCheck.contains("<"))
+	{
+		TextToCheck.replace("<","&lt;");
+	}
+	if(TextToCheck.contains(">"))
+	{
+		TextToCheck.replace(">","&gt;");
+	}
+	if(TextToCheck.contains("&"))
+	{
+		TextToCheck.replace("&","-");
+	}
+	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/DXFtoQET3_DB/src/DXF_control/dxf_text_control.h
===================================================================
--- branches/DXFtoQET3_DB/src/DXF_control/dxf_text_control.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/DXF_control/dxf_text_control.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,25 @@
+#ifndef DXF_TEXT_CONTROL_H
+#define DXF_TEXT_CONTROL_H
+
+//#include <QMainWindow>
+#include <QWidget>
+#include <QObject>
+
+
+class DXF_Text_control : public QWidget // QMainWindow
+{
+	Q_OBJECT
+	public:
+	explicit DXF_Text_control(QWidget *parent = 0);
+
+	QString TextToCheck;
+
+	QString Text_control();
+
+	signals:
+
+	public slots:
+
+};
+
+#endif // DXF_TEXT_CONTROL_H

Added: branches/DXFtoQET3_DB/src/ELMT_base/baseelmt.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base/baseelmt.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base/baseelmt.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,367 @@
+#include "baseelmt.h"
+
+
+BaseELMT::BaseELMT(QWidget *parent) : QWidget(parent)
+{
+}
+
+QString BaseELMT::DefinitionStart()
+{
+	/* Base values */
+
+
+
+	Result="";
+
+	/* <definition width="40" version="0.4"
+	 * hotspot_x="18" hotspot_y="24" height="50"
+	 * link_type="master" type="element" orientation="dyyy"> */
+
+	Result.append("<definition");
+	Result.append(" width=");
+	Result.append(QChar(34));
+	Result.append(ELMT_definition_width);
+	Result.append(QChar(34));
+	Result.append(" version=");
+	Result.append(QChar(34));
+	Result.append(ELMT_definition_version);
+	Result.append(QChar(34));
+	Result.append(" hotspot_x=");
+	Result.append(QChar(34));
+	Result.append(ELMT_definition_hotspot_x);
+	Result.append(QChar(34));
+	Result.append(" hotspot_y=");
+	Result.append(QChar(34));
+	Result.append(ELMT_definition_hotspot_y);
+	Result.append(QChar(34));
+	Result.append(" height=");
+	Result.append(QChar(34));
+	Result.append(ELMT_definition_height);
+	Result.append(QChar(34));
+	Result.append(" link_type=");
+	Result.append(QChar(34));
+	Result.append(ELMT_definition_link_type);
+	Result.append(QChar(34));
+	Result.append(" type=");
+	Result.append(QChar(34));
+	Result.append(ELMT_definition_type);
+	Result.append(QChar(34));
+	Result.append(" orientation=");
+	Result.append(QChar(34));
+	Result.append(ELMT_definition_orientation);
+	Result.append(QChar(34));
+
+	Result.append(" >");
+	Result.append('\n');
+
+	return Result;
+
+}
+
+QString BaseELMT::DefinitionEnd()
+{
+
+	Result="";
+
+	/* </definition> */
+
+
+
+	Result.append("</definition>");
+	Result.append('\n');
+
+	return Result;
+
+}
+
+QString BaseELMT::Uuid()
+{
+
+	Result="";
+
+	/*  <uuid uuid="{687262D2-B8A1-4CD6-B56F-4547577EFD01}"/> */
+
+	Uuidstring=QUuid::createUuid();
+
+	Result.append("<uuid");
+	Result.append(" uuid=");
+	Result.append(QChar(34));
+	Result.append(Uuidstring.toString());
+	Result.append(QChar(34));
+
+	Result.append(" />");
+	Result.append('\n');
+
+	return Result;
+
+}
+
+QString BaseELMT::Names()
+{
+
+	/* Base values */
+
+	/*ELMT_Name_ar="ar";
+	ELMT_Name_de="de";
+	ELMT_Name_en="en";
+	ELMT_Name_it="it";
+	ELMT_Name_fr="fr";
+	ELMT_Name_pl="pl";
+	ELMT_Name_es="es";
+	ELMT_Name_nl="nl";
+	ELMT_Name_cs="cs";
+	ELMT_Name_be_nl="be_nl";*/
+
+	Result="";
+
+	/* <names>
+		<name lang="ar">قاطع أحادي الوجه</name>
+		<name lang="de">Lastschalter 2P</name>
+		<name lang="en">Circuit-breaker</name>
+		<name lang="it">Sezionatore 2P</name>
+		<name lang="fr">Disjoncteur mono</name>
+		<name lang="pl">Wyłącznik</name>
+		<name lang="es">Interruptor magnetotérmico</name>
+		<name lang="nl">Lastscheider 2</name>
+		<name lang="cs">Jistič 2</name>
+	   </names> */
+
+	Result.append("<names>\n");
+
+
+	if (ELMT_Name_en != "")
+	{
+		Result.append("    ");
+		Result.append("<name lang=");
+		Result.append(QChar(34));
+		Result.append(ELMT_Name_en);
+		Result.append(QChar(34));
+		Result.append(">");
+		Result.append(ELMT_Name_text_en);
+		Result.append("</name>\n");
+	}
+
+	if (ELMT_Name_fr != "-")
+	{
+
+		Result.append("    ");
+		Result.append("<name lang=");
+		Result.append(QChar(34));
+		Result.append(ELMT_Name_fr);
+		Result.append(QChar(34));
+		Result.append(">");
+		Result.append(ELMT_Name_text_fr);
+		Result.append("</name>\n");
+	}
+
+	if (ELMT_Name_be_nl != "")
+	{
+		Result.append("    ");
+		Result.append("<name lang=");
+		Result.append(QChar(34));
+		Result.append(ELMT_Name_be_nl);
+		Result.append(QChar(34));
+		Result.append(">");
+		Result.append(ELMT_Name_text_be_nl);
+		Result.append("</name>\n");
+	}
+
+	if (ELMT_Name_ar != "")
+	{
+		Result.append("    ");
+		Result.append("<name lang=");
+		Result.append(QChar(34));
+		Result.append(ELMT_Name_ar);
+		Result.append(QChar(34));
+		Result.append(">");
+		Result.append(ELMT_Name_text_ar);
+		Result.append("</name>\n");
+	}
+
+	if (ELMT_Name_de != "")
+	{
+		Result.append("    ");
+		Result.append("<name lang=");
+		Result.append(QChar(34));
+		Result.append(ELMT_Name_de);
+		Result.append(QChar(34));
+		Result.append(">");
+		Result.append(ELMT_Name_text_de);
+		Result.append("</name>\n");
+	}
+
+	if (ELMT_Name_it != "")
+	{
+		Result.append("    ");
+		Result.append("<name lang=");
+		Result.append(QChar(34));
+		Result.append(ELMT_Name_it);
+		Result.append(QChar(34));
+		Result.append(">");
+		Result.append(ELMT_Name_text_it);
+		Result.append("</name>\n");
+	}
+
+	if (ELMT_Name_pl != "")
+	{
+		Result.append("    ");
+		Result.append("<name lang=");
+		Result.append(QChar(34));
+		Result.append(ELMT_Name_pl);
+		Result.append(QChar(34));
+		Result.append(">");
+		Result.append(ELMT_Name_text_pl);
+		Result.append("</name>\n");
+	}
+
+	if (ELMT_Name_es != "")
+	{
+		Result.append("    ");
+		Result.append("<name lang=");
+		Result.append(QChar(34));
+		Result.append(ELMT_Name_es);
+		Result.append(QChar(34));
+		Result.append(">");
+		Result.append(ELMT_Name_text_es);
+		Result.append("</name>\n");
+	}
+
+	if (ELMT_Name_cs != "")
+	{
+		Result.append("    ");
+		Result.append("<name lang=");
+		Result.append(QChar(34));
+		Result.append(ELMT_Name_cs);
+		Result.append(QChar(34));
+		Result.append(">");
+		Result.append(ELMT_Name_text_cs);
+		Result.append("</name>\n");
+	}
+
+	if (ELMT_Name_nl != "")
+	{
+		Result.append("    ");
+		Result.append("<name lang=");
+		Result.append(QChar(34));
+		Result.append(ELMT_Name_nl);
+		Result.append(QChar(34));
+		Result.append(">");
+		Result.append(ELMT_Name_text_nl);
+		Result.append("</name>\n");
+	}
+
+	Result.append("</names>");
+	Result.append('\n');
+
+	return Result;
+
+}
+
+QString BaseELMT::KindInformation()
+{
+	/* Base values */
+
+	ELMT_kind_name="type";
+	ELMT_kind_show="1";
+	ELMT_kind_type="protection";
+
+	Result="";
+
+	/*	<kindInformations>
+		<kindInformation name="type" show="1">protection</kindInformation>
+		</kindInformations> */
+
+	Result.append("<kindInformations>\n");
+
+	Result.append("<kindInformation");
+	Result.append(" name=");
+	Result.append(QChar(34));
+	Result.append(ELMT_kind_name);
+	Result.append(QChar(34));
+	Result.append(" show=");
+	Result.append(QChar(34));
+	Result.append(ELMT_kind_show);
+	Result.append(QChar(34));
+	Result.append(">");
+	Result.append(ELMT_kind_type);
+	Result.append("</kindInformation>\n");
+
+	Result.append("</kindInformations>\n");
+
+	return Result;
+}
+
+QString BaseELMT::Informations()
+{
+
+	/* Base values */
+
+	Result="";
+
+	/*ELMT_informations_Author="The QElectroTech team";
+	ELMT_informations_License=" see http://qelectrotech.org/wiki/doc/elements_license";;
+	ELMT_converter_by=" Ronny Desmedt";
+	ELMT_converter_version=" V3.0 db";*/
+
+
+	/*		<informations>Author: The QElectroTech team
+			License: see http://qelectrotech.org/wiki/doc/elements_license
+			</informations> */
+
+
+	Result.append("<informations>\n");
+
+	Result.append("     ");
+	Result.append("Author: ");
+	Result.append(ELMT_informations_Author);
+	Result.append("\n");
+	Result.append("     ");
+	Result.append("License:");
+	Result.append(ELMT_informations_License);
+	Result.append("\n");
+	Result.append("     ");
+	Result.append("Converter version:");
+	Result.append(ELMT_converter_version);
+	Result.append("\n");
+	// Result.append("     ");
+	// Result.append("Converter by:");
+	// Result.append(ELMT_converter_by);
+	Result.append("\n");
+
+	Result.append("</informations>\n");
+
+	return Result;
+}
+
+QString BaseELMT::DescriptionStart()
+{
+	/* base var */
+
+	Result="";
+
+	/* <description> */
+
+
+
+	Result.append("<description>");
+	Result.append('\n');
+
+	return Result;
+}
+
+QString BaseELMT::DescriptionEnd()
+{
+	/*  base var */
+
+	Result="";
+
+	/* </description> */
+
+
+
+	Result.append("</description>");
+	Result.append('\n');
+
+	return Result;
+
+}

Added: branches/DXFtoQET3_DB/src/ELMT_base/baseelmt.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base/baseelmt.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base/baseelmt.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,78 @@
+#ifndef BASEELMT_H
+#define BASEELMT_H
+
+//#include <QMainWindow>
+#include <QWidget>
+#include <QtCore>
+#include <QObject>
+
+
+
+class BaseELMT : public QWidget // QMainWindow
+{
+	Q_OBJECT
+	public:
+	explicit BaseELMT(QWidget *parent = 0);
+
+	QString ELMT_definition_width;
+	QString ELMT_definition_version;
+	QString ELMT_definition_hotspot_x;
+	QString ELMT_definition_hotspot_y;
+	QString ELMT_definition_height;
+	QString ELMT_definition_link_type;
+	QString ELMT_definition_type;
+	QString ELMT_definition_orientation;
+
+	QString ELMT_uuid;
+
+	QString ELMT_Name_en;
+	QString ELMT_Name_fr;
+	QString ELMT_Name_de;
+	QString ELMT_Name_ar;
+	QString ELMT_Name_it;
+	QString ELMT_Name_pl;
+	QString ELMT_Name_nl;
+	QString ELMT_Name_be_nl;
+	QString ELMT_Name_es;
+	QString ELMT_Name_cs;
+
+	QString ELMT_Name_text_en;
+	QString ELMT_Name_text_fr;
+	QString ELMT_Name_text_de;
+	QString ELMT_Name_text_ar;
+	QString ELMT_Name_text_it;
+	QString ELMT_Name_text_pl;
+	QString ELMT_Name_text_nl;
+	QString ELMT_Name_text_be_nl;
+	QString ELMT_Name_text_es;
+	QString ELMT_Name_text_cs;
+
+	QString ELMT_kind_name;
+	QString ELMT_kind_show;
+	QString ELMT_kind_type;
+
+	QString ELMT_informations_Author;
+	QString ELMT_informations_License;
+	QString ELMT_converter_version;
+	QString ELMT_converter_by;
+
+	QString Result;
+
+	QString DefinitionStart();
+	QString DefinitionEnd();
+	QString Uuid();
+	QString Names();
+	QString KindInformation();
+	QString Informations();
+	QString DescriptionStart();
+	QString DescriptionEnd();
+
+	QUuid Uuidstring;
+
+	signals:
+
+	public slots:
+
+};
+
+#endif // BASEELMT_H

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_arc.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_arc.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_arc.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,99 @@
+#include "dxf_base_arc.h"
+
+dxf_base_arc::dxf_base_arc(QWidget *parent) :
+	QWidget(parent)
+{
+}
+
+QString dxf_base_arc::Create_arc()
+{
+
+/*  <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"/> */
+
+	Result_arc="";
+
+	DXF_layer_control New_Layer_Control;
+	DXF_Ltype_control New_LType_Control;
+	dxf_corner_to_elmt New_corner_control;
+
+	New_corner_control.start_angle=QET_start;
+	New_corner_control.end_angle=QET_end;
+
+	QET_start=New_corner_control.QET_start_angle();
+
+	QET_end=New_corner_control.QET_end_angle();
+
+	New_corner_control.begin2=New_corner_control.begin0;
+	New_corner_control.einde2=New_corner_control.einde0;
+	New_corner_control.start_angle2=New_corner_control.start_angle;
+	New_corner_control.end_angle2=New_corner_control.end_angle;
+
+	QET_angle=New_corner_control.QET_corner_angle();
+
+	New_Layer_Control.layer_to_find=QET_layer;
+
+	New_LType_Control.FindLT=New_Layer_Control.dxf_layer_ltype();
+
+	QET_line_style=New_LType_Control.Ltype_control();
+
+	Result_arc.append("     ");
+	Result_arc.append("<arc");
+
+	Result_arc.append(" width=");
+	Result_arc.append(QChar(34));
+	Result_arc.append(QString::number(QET_width,'f',2));
+	Result_arc.append(QChar(34));
+
+	Result_arc.append(" x=");
+	Result_arc.append(QChar(34));
+	Result_arc.append(QString::number(QET_x,'f',2));
+	Result_arc.append(QChar(34));
+
+	Result_arc.append(" y=");
+	Result_arc.append(QChar(34));
+	Result_arc.append(QString::number(-QET_y,'f',2));
+	Result_arc.append(QChar(34));
+
+	Result_arc.append(" antialias=");
+	Result_arc.append(QChar(34));
+	Result_arc.append(QET_antialias);
+	Result_arc.append(QChar(34));
+
+	Result_arc.append(" height=");
+	Result_arc.append(QChar(34));
+	Result_arc.append(QString::number(QET_height,'f',2));
+	Result_arc.append(QChar(34));
+
+	Result_arc.append(" style=");
+	Result_arc.append(QChar(34));
+	Result_arc.append("line-style:");
+	Result_arc.append(QET_line_style);
+	Result_arc.append(";");
+	Result_arc.append("line-weight:");
+	Result_arc.append(QET_line_weight);
+	Result_arc.append(";");
+	Result_arc.append("filling:");
+	Result_arc.append(QET_filling);
+	Result_arc.append(";");
+	Result_arc.append("color:");
+	Result_arc.append(QET_color);
+	Result_arc.append(QChar(34));
+
+	Result_arc.append(" start=");
+	Result_arc.append(QChar(34));
+	Result_arc.append(QString::number(QET_start,'f',0));
+	Result_arc.append(QChar(34));
+
+	Result_arc.append(" angle=");
+	Result_arc.append(QChar(34));
+	Result_arc.append(QString::number(QET_angle,'f',0));
+	Result_arc.append(QChar(34));
+
+	Result_arc.append(" />");
+	Result_arc.append('\n');
+
+	return Result_arc;
+}

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_arc.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_arc.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_arc.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,57 @@
+#ifndef DXF_BASE_ARC_H
+#define DXF_BASE_ARC_H
+
+//#include <QMainWindow>
+#include <QWidget>
+#include <QObject>
+
+#include "src/DXF_control/dxf_layer_control.h"
+#include "src/DXF_control/dxf_ltype_control.h"
+#include "src/DXF_control/dxf_text_control.h"
+#include "src/DXF_control/dxf_corner_to_elmt.h"
+
+class dxf_base_arc : public QWidget // QMainWindow
+{
+	Q_OBJECT
+	public:
+	explicit dxf_base_arc(QWidget *parent = 0);
+
+	QString Result_arc;
+
+
+
+	//QET xml var
+	double QET_x;		//10
+	double QET_y;		//20
+	double QET_width;	//40*2
+	double QET_height;	//40*2
+	double QET_start;	//50
+	double QET_end;		//51
+	double QET_angle;
+
+	QString QET_antialias;
+	QString QET_style;
+	QString QET_line_style;
+	QString QET_line_weight;
+	QString QET_filling;
+	QString QET_color;
+
+	QString QET_layer;	//8
+	QString QET_ltype;	//6
+	QString QET_handle;	//5
+	QString QET_softID;	//330
+
+
+
+
+
+	QString Create_arc();
+
+
+	signals:
+
+	public slots:
+
+};
+
+#endif // DXF_BASE_ARC_H

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_attrinute.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_attrinute.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_attrinute.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,47 @@
+#include "dxf_entitie_attrinute.h"
+
+extern struct ALG Max_alg;
+extern struct BLOCK Max_block;
+extern struct ENTITIE Max_entitie;
+extern struct DXF_base DXF_main_base[1];
+extern struct DXF_entities_attrib DXF_input_entities_attrib[DXF_LE_ATTRIB];
+
+dxf_entitie_attrinute::dxf_entitie_attrinute(QWidget *parent) : QWidget(parent)//: QMainWindow(parent)
+{
+
+}
+
+QString dxf_entitie_attrinute::dxf_entitie_make_attribute()
+{
+
+	dxf_attr dxb_attr;
+	DXF_Text_control db_txt_check2;
+
+	Result_attr ="";
+
+	Count_lines=0;
+
+	while (Count_lines<=Count_entitie_attr)
+	{
+
+	   dxb_attr.x=DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_10;					// x start
+	   dxb_attr.y=-DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_20;					// y start
+	   dxb_attr.rotation=DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_50;			//text rotation
+	   dxb_attr.size=DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_40;				//text height
+	   dxb_attr.tag=Entitie_tag; //DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_2;		// tag
+	   dxb_attr.rotate=Entitie_rotate;
+	   dxb_attr.color_attrib=Entitie_color;
+
+	   db_txt_check2.TextToCheck=DXF_input_entities_attrib[Count_lines].DXF_entities_attrib_code_1;	// value
+
+	   dxb_attr.text=db_txt_check2.Text_control();
+
+	   Result_attr.append(dxb_attr.Create_ATTR());
+
+	   Count_lines=Count_lines+1;
+
+
+	}
+
+	return Result_attr;
+}

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_attrinute.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_attrinute.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_attrinute.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,35 @@
+#ifndef DXF_ENTITIE_ATTRINUTE_H
+#define DXF_ENTITIE_ATTRINUTE_H
+
+//#include <QMainWindow>
+#include <QWidget>
+#include "src/dxf/dxf_attr.h"
+#include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
+#include "src/qet_base_types/baseelmt.h"
+#include "src/dxf_control/dxf_text_control.h"
+
+class dxf_entitie_attrinute : public QWidget //QMainWindow
+{
+	Q_OBJECT
+	public:
+	explicit dxf_entitie_attrinute(QWidget *parent = 0);
+
+	QString Result_attr;
+	QString Entitie_color;			// black
+	QString Entitie_line_weight;
+	QString Entitie_filling;
+	QString Entitie_antialias;
+	QString Entitie_rotate;			// true
+	QString Entitie_tag;			// label
+
+	int Count_lines;
+	int Count_entitie_attr;
+
+	QString dxf_entitie_make_attribute();
+	signals:
+
+	public slots:
+};
+
+#endif // DXF_ENTITIE_ATTRINUTE_H

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_circle.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_circle.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_circle.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,76 @@
+#include "dxf_base_circle.h"
+
+dxf_base_circle::dxf_base_circle(QWidget *parent) :
+	QWidget(parent)
+{
+}
+
+QString dxf_base_circle::Create_circle()
+{
+	/* <circle x="-28" y="-8" antialias="true"
+	 * style="line-style:normal;line-weight:thin;filling:none;color:black"
+	 * diameter="22"/> */
+
+	Result_circle="";
+
+	DXF_layer_control New_Layer_Control;
+	DXF_Ltype_control New_LType_Control;
+
+	New_Layer_Control.layer_to_find=QET_layer;
+
+	New_LType_Control.FindLT=New_Layer_Control.dxf_layer_ltype();
+
+	QET_line_style=New_LType_Control.Ltype_control();
+
+
+	Result_circle="     ";
+
+	Result_circle.append("<ellipse");
+
+	Result_circle.append(" x=");
+	Result_circle.append(QChar(34));
+	Result_circle.append(QString::number (QET_x-QET_diameter ,'f',2));
+	Result_circle.append(QChar(34));
+
+	Result_circle.append(" y=");
+	Result_circle.append(QChar(34));
+	Result_circle.append(QString::number (-(QET_y+QET_diameter) ,'f',2));
+	Result_circle.append(QChar(34));
+
+	Result_circle.append(" antialias=");
+	Result_circle.append(QChar(34));
+	Result_circle.append(QET_antialias);
+	Result_circle.append(QChar(34));
+
+	Result_circle.append(" height=");
+	Result_circle.append(QChar(34));
+	Result_circle.append(QString::number (QET_diameter*2 ,'f',2));
+	Result_circle.append(QChar(34));
+
+	Result_circle.append(" width=");
+	Result_circle.append(QChar(34));
+	Result_circle.append(QString::number (QET_diameter*2 ,'f',2));
+	Result_circle.append(QChar(34));
+
+	Result_circle.append(" style=");
+	Result_circle.append(QChar(34));
+	Result_circle.append("line-style:");
+	Result_circle.append(QET_line_style);
+	Result_circle.append(";");
+	Result_circle.append("line-weight:");
+	Result_circle.append(QET_line_weight);
+	Result_circle.append(";");
+	Result_circle.append("filling:");
+	Result_circle.append(QET_filling);
+	Result_circle.append(";");
+	Result_circle.append("color:");
+	Result_circle.append(QET_color);
+	Result_circle.append(";");
+	Result_circle.append(QChar(34));
+
+
+	Result_circle.append(" />");
+	Result_circle.append('\n');
+
+	return Result_circle;
+}

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_circle.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_circle.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_circle.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,46 @@
+#ifndef DXF_BASE_CIRCLE_H
+#define DXF_BASE_CIRCLE_H
+
+//#include <QMainWindow>
+#include <QWidget>
+#include <QObject>
+
+#include "src/DXF_control/dxf_layer_control.h"
+#include "src/DXF_control/dxf_ltype_control.h"
+#include "src/DXF_control/dxf_text_control.h"
+
+class dxf_base_circle : public QWidget // QMainWindow
+{
+	Q_OBJECT
+	public:
+	explicit dxf_base_circle(QWidget *parent = 0);
+
+	QString Result_circle;
+
+	//DXF var
+	double QET_x;				//10
+	double QET_y;				//20
+	double QET_diameter;		//40 radius
+
+	QString QET_layer;			//8
+	QString QET_ltype;			//6
+	QString QET_handle;			//5
+	QString QET_softID;			//330
+
+	//QET xml var
+	QString QET_antialias;
+	QString QET_line_style;
+	QString QET_line_weight;
+	QString QET_filling;
+	QString QET_color;
+
+
+	QString Create_circle();
+
+	signals:
+
+	public slots:
+
+};
+
+#endif // DXF_BASE_CIRCLE_H

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_ellipse.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_ellipse.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_ellipse.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,103 @@
+#include "dxf_base_ellipse.h"
+
+dxf_base_ellipse::dxf_base_ellipse(QWidget *parent) :
+	QWidget(parent)
+{
+}
+
+QString dxf_base_ellipse::Create_ellipse()
+{
+	/* <ellipse width="38"
+	 * x="-15" y="34"
+	 * antialias="true"
+	 * height="13"
+	 * style="line-style:normal;line-weight:normal;filling:none;color:black"/>*/
+	Result_ellipse="";
+
+	DXF_layer_control New_Layer_Control;
+	DXF_Ltype_control New_LType_Control;
+
+	New_Layer_Control.layer_to_find=QET_layer;
+
+	New_LType_Control.FindLT=New_Layer_Control.dxf_layer_ltype();
+
+	QET_line_style=New_LType_Control.Ltype_control();
+
+	QET_width=QET_major_radius_x*2;
+	QET_height=QET_major_radius_x*2*QET_ratio_minor_axis;
+
+	//QET_x=QET_center_x-(QET_width/2);
+	//QET_y=(QET_center_y-(QET_height/2));
+
+	QET_x=QET_center_x;
+	QET_y=QET_center_y;
+
+	// radians to degrees
+	start_angle=(180*(QET_Start_parameter/3.141592654));
+	end_angle=(180*(QET_end_parameter/3.141592654));
+
+	QET_angle=end_angle-start_angle;
+	QET_start=start_angle;
+
+
+	Result_ellipse.append("     ");
+	Result_ellipse.append("<arc");
+
+
+	Result_ellipse.append(" width=");
+	Result_ellipse.append(QChar(34));
+	Result_ellipse.append(QString::number(QET_width,'f',2));
+	Result_ellipse.append(QChar(34));
+
+	Result_ellipse.append(" x=");
+	Result_ellipse.append(QChar(34));
+	Result_ellipse.append(QString::number(QET_x,'f',2));
+	Result_ellipse.append(QChar(34));
+
+	Result_ellipse.append(" y=");
+	Result_ellipse.append(QChar(34));
+	Result_ellipse.append(QString::number(-QET_y,'f',2));
+	Result_ellipse.append(QChar(34));
+
+	Result_ellipse.append(" antialias=");
+	Result_ellipse.append(QChar(34));
+	Result_ellipse.append(QET_antialias);
+	Result_ellipse.append(QChar(34));
+
+	Result_ellipse.append(" height=");
+	Result_ellipse.append(QChar(34));
+	Result_ellipse.append(QString::number(QET_height,'f',2));
+	Result_ellipse.append(QChar(34));
+
+	Result_ellipse.append(" style=");
+	Result_ellipse.append(QChar(34));
+	Result_ellipse.append("line-style:");
+	Result_ellipse.append(QET_line_style);
+	Result_ellipse.append(";");
+	Result_ellipse.append("line-weight:");
+	Result_ellipse.append(QET_line_weight);
+	Result_ellipse.append(";");
+	Result_ellipse.append("filling:");
+	Result_ellipse.append(QET_filling);
+	Result_ellipse.append(";");
+	Result_ellipse.append("color:");
+	Result_ellipse.append(QET_color);
+	Result_ellipse.append(QChar(34));
+
+	Result_ellipse.append(" start=");
+	Result_ellipse.append(QChar(34));
+	Result_ellipse.append(QString::number(QET_start,'f',0));
+	Result_ellipse.append(QChar(34));
+
+	Result_ellipse.append(" angle=");
+	Result_ellipse.append(QChar(34));
+	Result_ellipse.append(QString::number(QET_angle,'f',0));
+	Result_ellipse.append(QChar(34));
+
+	Result_ellipse.append(" />");
+	Result_ellipse.append('\n');
+
+	return Result_ellipse;
+}
+
+

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_ellipse.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_ellipse.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_ellipse.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,73 @@
+#ifndef DXF_BASE_ELLIPSE_H
+#define DXF_BASE_ELLIPSE_H
+
+//#include <QMainWindow>
+#include <QWidget>
+#include <QObject>
+
+#include "src/DXF_control/dxf_layer_control.h"
+#include "src/DXF_control/dxf_ltype_control.h"
+#include "src/DXF_control/dxf_text_control.h"
+
+class dxf_base_ellipse : public QWidget // QMainWindow
+{
+	Q_OBJECT
+	public:
+	explicit dxf_base_ellipse(QWidget *parent = 0);
+
+	QString Result_ellipse;
+	/* <ellipse width="38"
+	 * x="-15" y="34"
+	 * antialias="true"
+	 * height="13"
+	 * style="line-style:normal;line-weight:normal;filling:none;color:black"/>*/
+
+	//QET xml var
+	double QET_x;
+	double QET_y;
+	double QET_center_x;			//10
+	double QET_center_y;			//20
+	double QET_major_radius_x;		//11
+	double QET_major_radius_y;		//21
+	double QET_width;
+	double QET_height;
+	double QET_start;
+	double QET_angle;
+	double QET_ratio_minor_axis;	//40
+	double QET_Start_parameter;		//41
+	double QET_end_parameter;		//42
+
+	//double QET_diameter;
+
+
+	QString QET_antialias;
+
+	QString QET_line_style;
+	QString QET_line_weight;
+	QString QET_filling;
+	QString QET_color;
+
+	QString QET_layer;			//8
+	QString QET_ltype;			//6
+	QString QET_handle;			//5
+	QString QET_softID;			//330
+
+	double major_lenght;
+	double minor_lenght;
+	double start_angle;
+	double end_angle;
+
+
+
+
+	QString Create_ellipse();
+
+
+
+	signals:
+
+	public slots:
+
+};
+
+#endif // DXF_BASE_ELLIPSE_H

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_input.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_input.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_input.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,79 @@
+#include "dxf_base_input.h"
+
+dxf_base_input::dxf_base_input(QWidget *parent) :
+	QWidget(parent)
+{
+}
+
+
+QString dxf_base_input::Create_input()
+{
+
+	/* QET_x="0";
+	QET_y="10";
+	QET_size="9";
+	QET_rotate="true";
+	QET_text="_";
+	QET_tag="label"; */
+
+	DXF_Text_control New_Text_control;
+
+
+	/* <input x="3" y="1" size="9" rotate="true" text="_" tagg="label"/>
+	   <input text="_" rotation="90" tagg="label" x="-20" y="-5" size="9" rotate="true"/>*/
+
+	Result.append("     ");
+	Result.append("<input");
+	Result.append(" x=");
+	Result.append(QChar(34));
+	Result.append(QString::number(QET_x,'f',2));
+	Result.append(QChar(34));
+
+	Result.append(" y=");
+	Result.append(QChar(34));
+	Result.append(QString::number(-QET_y,'f',2));
+	Result.append(QChar(34));
+
+	Result.append(" size=");
+	Result.append(QChar(34));
+	Result.append(QString::number(QET_size,'f',0));
+	Result.append(QChar(34));
+
+	Result.append(" rotation=");
+	Result.append(QChar(34));
+	Result.append(QString::number(QET_rotation,'f',0));
+	Result.append(QChar(34));
+
+	Result.append(" rotate=");
+	Result.append(QChar(34));
+	Result.append(QET_rotate);
+	Result.append(QChar(34));
+
+	Result.append(" color=");
+	Result.append(QChar(34));
+	Result.append(QET_color);
+	Result.append(QChar(34));
+
+	Result.append(" text=");
+	Result.append(QChar(34));
+
+	New_Text_control.TextToCheck=QET_text;
+	Result.append(New_Text_control.Text_control());
+	//Result.append(QET_text);
+	Result.append(QChar(34));
+
+	Result.append(" tagg=");
+	Result.append(QChar(34));
+	Result.append(QET_tag);
+	Result.append(QChar(34));
+
+	Result.append(" />");
+	Result.append('\n');
+
+
+	return Result;
+
+
+
+
+}

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_input.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_input.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_input.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,53 @@
+#ifndef DXF_BASE_INPUT_H
+#define DXF_BASE_INPUT_H
+
+//#include <QMainWindow>
+#include <QWidget>
+#include <QObject>
+
+#include "src/DXF_control/dxf_layer_control.h"
+#include "src/DXF_control/dxf_ltype_control.h"
+#include "src/DXF_control/dxf_text_control.h"
+
+class dxf_base_input : public QWidget // QMainWindow
+{
+	Q_OBJECT
+	public:
+	explicit dxf_base_input(QWidget *parent = 0);
+
+	QString Result;
+
+
+
+	//QET xml var
+	double QET_x;			//10
+	double QET_y;			//20
+	double QET_rotation;	//50
+	double QET_size;	//40
+
+	//int QET_size;
+	//QString QET_rotate;
+
+	QString QET_text;		//1
+	QString QET_tag;		//2
+	QString QET_color;
+	QString QET_text_style;	//7
+	QString QET_rotate;
+
+	QString QET_layer;			//8
+	QString QET_ltype;			//6
+	QString QET_handle;			//5
+	QString QET_softID;			//330
+
+
+
+
+	QString Create_input();
+
+	signals:
+
+	public slots:
+
+};
+
+#endif // DXF_BASE_INPUT_H

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_line.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_line.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_line.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,99 @@
+#include "dxf_base_line.h"
+
+dxf_base_line::dxf_base_line(QWidget *parent) :
+	QWidget(parent)
+{
+}
+
+QString dxf_base_line::CreateElmt()
+{
+
+	Result="";
+
+	DXF_layer_control New_Layer_Control;
+	DXF_Ltype_control New_LType_Control;
+
+	New_Layer_Control.layer_to_find=QET_layer;
+
+	New_LType_Control.FindLT=New_Layer_Control.dxf_layer_ltype();
+
+	QET_line_style=New_LType_Control.Ltype_control();
+
+	/*<line length1="1.5" length2="1.5" antialias="false"
+	 * end1="none" end2="none"
+	 * style="line-style:normal;line-weight:normal;filling:none;color:black"
+	 * y1="-20" x1="10" y2="-10" x2="10"/>*/
+
+
+	/* create qet elmt code */
+
+	Result.append("     ");
+	Result.append("<line");
+	Result.append(" lenght1=");
+	Result.append(QChar(34));
+	Result.append(QString::number(QET_lenght1,'f',2));
+	Result.append(QChar(34));
+
+	Result.append(" lenght2=");
+	Result.append(QChar(34));
+	Result.append(QString::number(QET_lenght2,'f',2));
+	Result.append(QChar(34));
+
+	Result.append(" antialias=");
+	Result.append(QChar(34));
+	Result.append(QET_antialias);
+	Result.append(QChar(34));
+
+	Result.append(" end1=");
+	Result.append(QChar(34));
+	Result.append(QET_end1);
+	Result.append(QChar(34));
+
+	Result.append(" end2=");
+	Result.append(QChar(34));
+	Result.append(QET_end2);
+	Result.append(QChar(34));
+
+	Result.append(" style=");
+	Result.append(QChar(34));
+	Result.append("line-style:");
+	Result.append(QET_line_style);
+	Result.append(";");
+	Result.append("line-weight:");
+	Result.append(QET_line_weight);
+	Result.append(";");
+	Result.append("filling:");
+	Result.append(QET_filling);
+	Result.append(";");
+	Result.append("color:");
+	Result.append(QET_color);
+	Result.append(QChar(34));
+
+	Result.append(" x1=");
+	Result.append(QChar(34));
+	Result.append(QString::number(QET_x1,'f',2));
+	Result.append(QChar(34));
+
+	Result.append(" y1=");
+	Result.append(QChar(34));
+	Result.append(QString::number(-QET_y1,'f',2));
+	Result.append(QChar(34));
+
+	Result.append(" x2=");
+	Result.append(QChar(34));
+	Result.append(QString::number(QET_x2,'f',2));
+	Result.append(QChar(34));
+
+	Result.append(" y2=");
+	Result.append(QChar(34));
+	Result.append(QString::number(-QET_y2,'f',2));
+	Result.append(QChar(34));
+
+	Result.append(" />");
+	Result.append('\n');
+
+
+
+
+	return Result;
+}

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_line.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_line.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_line.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,57 @@
+#ifndef DXF_BASE_LINE_H
+#define DXF_BASE_LINE_H
+
+//#include <QMainWindow>
+#include <QWidget>
+#include <QObject>
+
+#include "src/DXF_control/dxf_layer_control.h"
+#include "src/DXF_control/dxf_ltype_control.h"
+#include "src/DXF_control/dxf_text_control.h"
+
+class dxf_base_line : public QWidget //QMainWindow
+{
+	Q_OBJECT
+	public:
+	explicit dxf_base_line(QWidget *parent = 0);
+
+
+	//DXF var
+
+	double QET_x1;				//10
+	double QET_x2;				//11
+	double QET_y1;				//20
+	double QET_y2;				//21
+
+	QString QET_layer;			//8
+	QString QET_ltype;			//6
+	QString QET_handle;			//5
+	QString QET_softID;			//330
+
+	//int16_t color;			//62
+
+	//QET xml var
+	double QET_lenght1;
+	double QET_lenght2;
+	QString QET_antialias;
+	QString QET_end1;
+	QString QET_end2;
+	QString QET_line_style;
+	QString QET_line_weight;
+	QString QET_filling;
+	QString QET_color;
+
+
+
+	QString Result;
+
+
+	QString CreateElmt();
+
+	signals:
+
+	public slots:
+
+};
+
+#endif // DXF_BASE_LINE_H

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_polyline.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_polyline.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_polyline.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,96 @@
+#include "dxf_base_polyline.h"
+
+dxf_base_polyline::dxf_base_polyline(QWidget *parent) :
+	QWidget(parent)
+{
+}
+
+QString dxf_base_polyline::Create_polyline()
+{
+	/* creation of the xml code for a polygon */
+
+
+	/* <polygon style="line-style:normal;
+	 * line-weight:thin;filling:none;color:black"
+	 * closed="false"
+	 * y1="-100" y2="-90" y3="0" y4="65" y5="75" y6="-20"
+	 * antialias="false"
+	 * y7="-30" x1="-140" y8="15" x2="0" y9="10" x3="60"
+	 * x4="15" x5="-125" x6="-125" x7="-60" x8="-60"
+	 * x9="-5" y10="-75" x10="-20" y11="-75" x11="-20"/>*/
+
+	/* <polygon style="line-style:normal;
+	 * line-weight:thin;filling:none;color:black"
+	 * closed="false"
+	 * antialias="false"
+	 * x1="107" y1="-179" x2="107" y2="-179"
+	 * x3="107" y3="-179" x4="107" y4="-179" /> */
+
+	Result_polyline="";
+
+	DXF_layer_control New_Layer_Control;
+	DXF_Ltype_control New_LType_Control;
+
+	New_Layer_Control.layer_to_find=QET_layer;
+
+	New_LType_Control.FindLT=New_Layer_Control.dxf_layer_ltype();
+
+	QET_line_style=New_LType_Control.Ltype_control();
+
+	/* create qet elmt code */
+
+	Result_polyline.append("     ");
+	Result_polyline.append("<polygon");
+	Result_polyline.append(" style=");
+
+	Result_polyline.append(QChar(34));
+	Result_polyline.append("line-style:");
+	Result_polyline.append(QET_line_style);
+	Result_polyline.append(";");
+
+
+	Result_polyline.append("line-weight:");
+	Result_polyline.append(QET_line_weight);
+	Result_polyline.append(";");
+
+	Result_polyline.append("filling:");
+	Result_polyline.append(QET_filling);
+	Result_polyline.append(";");
+
+	Result_polyline.append("color:");
+	Result_polyline.append(QET_color);
+	Result_polyline.append(QChar(34));
+
+	Result_polyline.append(" closed=");
+	Result_polyline.append(QChar(34));
+	Result_polyline.append(QET_closed);
+	Result_polyline.append(QChar(34));
+
+	Result_polyline.append(" antialias=");
+	Result_polyline.append(QChar(34));
+	Result_polyline.append(QET_antialias);
+	Result_polyline.append(QChar(34));
+
+	for (count_segments=1; (count_segments<segments+1) and (count_segments<QET_L_POLYLINE);count_segments++)
+	{
+		Result_polyline.append(" x");
+		Result_polyline.append(QString::number(count_segments));
+		Result_polyline.append("=");
+		Result_polyline.append(QChar(34));
+		Result_polyline.append(QString::number(QET_x[count_segments-1],'f',0));
+		Result_polyline.append(QChar(34));
+
+		Result_polyline.append(" y");
+		Result_polyline.append(QString::number(count_segments));
+		Result_polyline.append("=");
+		Result_polyline.append(QChar(34));
+		Result_polyline.append(QString::number(-QET_y[count_segments-1],'f',0));
+		Result_polyline.append(QChar(34));
+	}
+
+	Result_polyline.append("/>");
+	Result_polyline.append('\n');
+
+	return Result_polyline;
+
+}

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_polyline.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_polyline.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_polyline.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,47 @@
+#ifndef DXF_BASE_POLYLINE_H
+#define DXF_BASE_POLYLINE_H
+
+//#include <QMainWindow>
+#include <QWidget>
+#include <QObject>
+
+#include "src/DXF_control/dxf_layer_control.h"
+#include "src/DXF_control/dxf_ltype_control.h"
+#include "src/DXF_control/dxf_text_control.h"
+
+class dxf_base_polyline : public QWidget // QMainWindow
+{
+	Q_OBJECT
+	public:
+	explicit dxf_base_polyline(QWidget *parent = 0);
+
+	QString Result_polyline;
+
+	QString QET_line_style;
+	QString QET_line_weight;
+	QString QET_filling;
+	QString QET_color;
+	QString QET_closed;
+	QString QET_antialias;
+
+	QString QET_layer;			//8
+	QString QET_ltype;			//6
+	QString QET_handle;			//5
+	QString QET_softID;			//330
+
+	double QET_x[QET_L_POLYLINE];
+	double QET_y[QET_L_POLYLINE];
+
+	int count_segments;
+	int segments;
+
+
+	QString Create_polyline();
+
+	signals:
+
+	public slots:
+
+};
+
+#endif // DXF_BASE_POLYLINE_H

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_rectangel.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_rectangel.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_rectangel.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,81 @@
+#include "dxf_base_rectangel.h"
+
+dxf_base_rectangel::dxf_base_rectangel(QWidget *parent) :
+	QWidget(parent)
+{
+}
+
+QString dxf_base_rectangel::Create_rectangel()
+{
+
+	/* <rect width="61" x="-30" y="-12"
+	 * antialias="false" height="36"
+	 * style="line-style:normal;line-weight:normal;filling:none;color:black"/> */
+
+
+
+	Result_rect="";
+
+	DXF_layer_control New_Layer_Control;
+	DXF_Ltype_control New_LType_Control;
+
+	New_Layer_Control.layer_to_find=QET_layer;
+
+	New_LType_Control.FindLT=New_Layer_Control.dxf_layer_ltype();
+
+	QET_line_style=New_LType_Control.Ltype_control();
+
+
+	Result_rect.append("     ");
+	Result_rect.append("<rect");
+
+	Result_rect.append(" width=");
+	Result_rect.append(QChar(34));
+	Result_rect.append(QString::number(QET_width,'f',2));
+	Result_rect.append(QChar(34));
+
+	Result_rect.append(" x=");
+	Result_rect.append(QChar(34));
+	Result_rect.append(QString::number(QET_x,'f',2));
+	Result_rect.append(QChar(34));
+
+	Result_rect.append(" y=");
+	Result_rect.append(QChar(34));
+	Result_rect.append(QString::number(-QET_y,'f',2));
+	Result_rect.append(QChar(34));
+
+	Result_rect.append(" antialias=");
+	Result_rect.append(QChar(34));
+	Result_rect.append(QET_antialias);
+	Result_rect.append(QChar(34));
+
+	Result_rect.append(" height=");
+	Result_rect.append(QChar(34));
+	Result_rect.append(QString::number(QET_height,'f',2));
+	Result_rect.append(QChar(34));
+
+	Result_rect.append(" style=");
+	Result_rect.append(QChar(34));
+	Result_rect.append("line-style:");
+	Result_rect.append(QET_line_style);
+	Result_rect.append(";");
+	Result_rect.append("line-weight:");
+	Result_rect.append(QET_line_weight);
+	Result_rect.append(";");
+	Result_rect.append("filling:");
+	Result_rect.append(QET_filling);
+	Result_rect.append(";");
+	Result_rect.append("color:");
+	Result_rect.append(QET_color);
+	Result_rect.append(QChar(34));
+
+
+
+	Result_rect.append(" />");
+	Result_rect.append('\n');
+
+
+
+	return Result_rect;
+
+}

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_rectangel.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_rectangel.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_rectangel.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,50 @@
+#ifndef DXF_BASE_RECTANGEL_H
+#define DXF_BASE_RECTANGEL_H
+
+//#include <QMainWindow>
+#include <QWidget>
+#include <QObject>
+
+#include "src/DXF_control/dxf_layer_control.h"
+#include "src/DXF_control/dxf_ltype_control.h"
+#include "src/DXF_control/dxf_text_control.h"
+
+class dxf_base_rectangel : public QWidget // QMainWindow
+{
+	Q_OBJECT
+	public:
+	explicit dxf_base_rectangel(QWidget *parent = 0);
+
+	//QET xml var
+	double QET_x;				//10
+	double QET_y;				//20
+	double QET_width;
+	double QET_height;
+	double QET_start;
+	double QET_angle;
+
+	QString QET_layer;			//8
+	QString QET_ltype;			//6
+	QString QET_handle;			//5
+	QString QET_softID;			//330
+
+	QString QET_antialias;
+	QString QET_style;
+	QString QET_line_style;
+	QString QET_line_weight;
+	QString QET_filling;
+	QString QET_color;
+
+	QString Result_rect;
+
+	QString Create_rectangel();
+
+
+
+	signals:
+
+	public slots:
+
+};
+
+#endif // DXF_BASE_RECTANGEL_H

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_terminal.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_terminal.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_terminal.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,38 @@
+#include "dxf_base_terminal.h"
+
+dxf_base_terminal::dxf_base_terminal(QWidget *parent) :
+	QWidget(parent)
+{
+}
+
+QString dxf_base_terminal::Create_terminal()
+{
+
+	/*QET_x="0";
+	QET_y="0";
+	QET_orientation="n";*/
+
+	 /* <terminal x="-10" y="-20" orientation="n"/> */
+
+	Result.append("     ");
+	Result.append("<terminal");
+	Result.append(" x=");
+	Result.append(QChar(34));
+	Result.append(QString::number(QET_x,'f',2));
+	Result.append(QChar(34));
+	Result.append(" y=");
+	Result.append(QChar(34));
+	Result.append(QString::number(-QET_y,'f',2));
+	Result.append(QChar(34));
+	Result.append(" orientation=");
+
+	Result.append(QChar(34));
+	Result.append("s");
+	Result.append(QChar(34));
+
+	Result.append(" />");
+	Result.append('\n');
+
+	return Result;
+
+}

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_terminal.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_terminal.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_terminal.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,33 @@
+#ifndef DXF_BASE_TERMINAL_H
+#define DXF_BASE_TERMINAL_H
+
+//#include <QMainWindow>
+#include <QWidget>
+#include <QObject>
+
+class dxf_base_terminal : public QWidget // QMainWindow
+{
+	Q_OBJECT
+	public:
+	explicit dxf_base_terminal(QWidget *parent = 0);
+
+	QString Result;
+
+
+
+	//QET xml var
+	double QET_x;
+	double QET_y;
+	QString QET_orientation;
+
+
+
+	QString Create_terminal();
+
+	signals:
+
+	public slots:
+
+};
+
+#endif // DXF_BASE_TERMINAL_H

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_text.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_text.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_text.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,62 @@
+#include "dxf_base_text.h"
+
+dxf_base_text::dxf_base_text(QWidget *parent) :
+	QWidget(parent)
+{
+}
+
+QString dxf_base_text::Create_text()
+
+{
+	/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+		<text x="-7" y="-8" size="3" text="HC-SR04"/>
+		<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+	Result_text="";
+
+	DXF_Text_control New_Text_control;
+
+
+
+	Result_text.append("     ");
+	Result_text.append("<text");
+
+	Result_text.append(" x=");
+	Result_text.append(QChar(34));
+	Result_text.append(QString::number(QET_x,'f',2));
+	Result_text.append(QChar(34));
+
+	Result_text.append(" y=");
+	Result_text.append(QChar(34));
+	Result_text.append(QString::number(-QET_y,'f',2));
+	Result_text.append(QChar(34));
+
+	Result_text.append(" size=");
+	Result_text.append(QChar(34));
+	Result_text.append(QString::number(QET_size,'f',0));
+	Result_text.append(QChar(34));
+
+	Result_text.append(" rotation=");
+	Result_text.append(QChar(34));
+	Result_text.append(QString::number(QET_rotation,'f',0));
+	Result_text.append(QChar(34));
+
+	Result_text.append(" color=");
+	Result_text.append(QChar(34));
+	Result_text.append(QET_color);
+	Result_text.append(QChar(34));
+
+	Result_text.append(" text=");
+	Result_text.append(QChar(34));
+	New_Text_control.TextToCheck=QET_text;
+	Result_text.append(New_Text_control.Text_control());
+	Result_text.append(QChar(34));
+
+
+
+	Result_text.append(" />");
+	Result_text.append('\n');
+
+	return Result_text;
+
+}

Added: branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_text.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_text.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_base_types/dxf_base_text.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,40 @@
+#ifndef DXF_BASE_TEXT_H
+#define DXF_BASE_TEXT_H
+
+//#include <QMainWindow>
+#include <QWidget>
+#include <QObject>
+
+#include "src/DXF_control/dxf_layer_control.h"
+#include "src/DXF_control/dxf_ltype_control.h"
+#include "src/DXF_control/dxf_text_control.h"
+
+class dxf_base_text : public QWidget // QMainWindow
+{
+	Q_OBJECT
+	public:
+	explicit dxf_base_text(QWidget *parent = 0);
+
+	//QET xml var
+	double QET_x;			//10
+	double QET_y;			//20
+	double QET_size;		//40
+	double QET_rotation;	//50
+
+
+	QString QET_text;		//1
+	QString QET_color;
+	QString QET_text_style;	//7
+
+
+	QString Result_text;
+
+	QString Create_text();
+
+	signals:
+
+	public slots:
+
+};
+
+#endif // DXF_BASE_TEXT_H

Added: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,588 @@
+#include "elmt_block_level2.h"
+
+#include <qsql.h>
+#include <QSqlDatabase>
+#include <QSqlQuery>
+#include <QSqlRecord>
+#include <QtSql>
+
+extern struct DXF_base DXF_main_base[DXF_base_set];
+extern struct DXF_Entities DXF_Entities_List;
+
+elmt_block_level2::elmt_block_level2(QWidget *parent) : QWidget(parent)
+{
+
+}
+
+QString elmt_block_level2::Insert_Block()
+{
+
+	dbManager Manage_Blocks;
+
+	DXF_main_base[0].QDXF_block_arc_color="green";
+	DXF_main_base[0].QDXF_block_circle_color="green";
+	DXF_main_base[0].QDXF_block_ellipse_color="green";
+	DXF_main_base[0].QDXF_block_input_color="green";
+	DXF_main_base[0].QDXF_block_line_color="green";
+	DXF_main_base[0].QDXF_block_lwpolyline_color="green";
+	DXF_main_base[0].QDXF_block_polyline_color="green";
+	DXF_main_base[0].QDXF_block_rectangel_color="green";
+	DXF_main_base[0].QDXF_block_terminal_color="green";
+	DXF_main_base[0].QDXF_block_text_color="green";
+	DXF_main_base[0].QDXF_block_solid_color="green";
+
+	xcount=0;
+	Logtext="";
+	rowcount=0;
+	DXF_Block_Name="";
+	DXF_Block_Value="";
+	Block_count=-1;
+
+	QSqlQuery NewQuery("SELECT * FROM dxf_blocks");
+
+
+
+
+	dxf_base_line New_DXF_Line;
+	dxf_base_circle New_DXF_Circle;
+	dxf_base_arc New_DXF_Arc;
+	dxf_base_text New_DXF_Text;
+	dxf_base_input New_DXF_Input;
+	dxf_base_terminal New_DXF_Terminal;
+	dxf_base_ellipse New_DXF_Ellipse;
+	dxf_base_polyline New_DXF_Polyline;
+	dxf_base_polyline New_DXF_LWPolyline;
+	dxf_base_polyline New_DXF_SOLID;
+	elmt_blocks New_DXF_blocks2;
+
+
+	Logtext.append("Converting DXF blocks\n");
+
+	end_block=0;
+
+	//while (NewQuery.next() and end_block==0)
+	//while (NewQuery.next())
+
+	while (NewQuery.next() and end_block==0)
+	{
+
+		QSqlRecord Record2=NewQuery.record();
+		Recordvalue=Record2.value("Command").toString();
+
+		if (Record2.value("Command_count").toInt()==0 and Record2.value("Command").toString()=="BLOCK")
+		{
+			Block_count++;
+			ELMT_ID_instruction=Record2.value("ID_instruction").toString();
+		}
+
+		rowcount++;
+
+		Rec_Command=Record2.value("Command").toString();
+		Rec_Blocknaam=Record2.value("dxf_2").toString();
+
+		DXF_Block_Name=Record2.value("dxf_2").toString();
+
+		if (Record2.value("Command").toString()=="BLOCK" and Record2.value("dxf_2").toString()==Block_name)
+		{
+			end_block=0;
+
+			while (end_block==0)
+			{
+				NewQuery.next();
+				QSqlRecord Record3=NewQuery.record();
+
+				if (Record3.value("Command").toString()=="LINE" and Record3.value("Command_count").toInt()==0)
+				{
+					/*<line length1="1.5" length2="1.5" antialias="false"
+					 * end1="none" end2="none"
+					 * style="line-style:normal;line-weight:normal;filling:none;color:black"
+					 * y1="-20" x1="10" y2="-10" x2="10"/>*/
+
+
+					New_DXF_Line.QET_x1=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_Line.QET_x2=(Record3.value("dxf_11").toDouble()*Block_scale_y)+Block_Y;
+					New_DXF_Line.QET_y1=(Record3.value("dxf_20").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_Line.QET_y2=(Record3.value("dxf_21").toDouble()*Block_scale_y)+Block_Y;
+
+					New_DXF_Line.QET_layer=Record3.value("dxf_8").toString();
+					New_DXF_Line.QET_ltype=Record3.value("dxf_6").toString();
+					New_DXF_Line.QET_handle=Record3.value("dxf_5").toString();
+					New_DXF_Line.QET_softID=Record3.value("dxf_330").toString();
+
+					New_DXF_Line.QET_lenght1=1.5;
+					New_DXF_Line.QET_lenght2=1.5;
+					New_DXF_Line.QET_antialias="false";
+					New_DXF_Line.QET_end1="none";
+					New_DXF_Line.QET_end2="none";
+
+					New_DXF_Line.QET_line_style="normal";
+					New_DXF_Line.QET_line_weight="thin";
+					New_DXF_Line.QET_filling="none";
+					New_DXF_Line.QET_color=DXF_main_base[0].QDXF_block_line_color;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Line.CreateElmt());
+					//DXF_Block_Value.append(New_DXF_Line.CreateElmt());
+
+				}
+
+				if (Record3.value("Command").toString()=="CIRCLE" and Record3.value("Command_count").toInt()==0)
+				{
+					/* <circle x="-28" y="-8" antialias="true"
+					 * style="line-style:normal;line-weight:thin;filling:none;color:black"
+					 * diameter="22"/> */
+
+					New_DXF_Circle.QET_x=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_Circle.QET_y=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+					New_DXF_Circle.QET_diameter=Record3.value(("dxf_40")).toDouble()*Block_scale_x;
+
+					New_DXF_Circle.QET_layer=Record3.value("dxf_8").toString();
+					New_DXF_Circle.QET_ltype=Record3.value("dxf_6").toString();
+					New_DXF_Circle.QET_handle=Record3.value("dxf_5").toString();
+					New_DXF_Circle.QET_softID=Record3.value("dxf_330").toString();
+
+					New_DXF_Circle.QET_antialias="false";
+					New_DXF_Circle.QET_line_style="normal";
+					New_DXF_Circle.QET_line_weight="thin";
+					New_DXF_Circle.QET_filling="none";
+					New_DXF_Circle.QET_color=DXF_main_base[0].QDXF_block_circle_color;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Circle.Create_circle());
+					//DXF_Block_Value.append(New_DXF_Circle.Create_circle());
+				}
+
+				if (Record3.value("Command").toString()=="ARC" and Record3.value("Command_count").toInt()==0)
+				{
+					/*  <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"/> */
+
+					New_DXF_Arc.QET_x=((Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X)-(Record3.value("dxf_40").toDouble()*Block_scale_x);
+					New_DXF_Arc.QET_y=((Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y)+(Record3.value("dxf_40").toDouble()*Block_scale_y);
+					New_DXF_Arc.QET_width=Record3.value("dxf_40").toDouble()*2*Block_scale_x;
+					New_DXF_Arc.QET_height=Record3.value("dxf_40").toDouble()*2*Block_scale_y;
+					New_DXF_Arc.QET_start=Record3.value("dxf_50").toDouble();
+					New_DXF_Arc.QET_end=Record3.value("dxf_51").toDouble();
+
+					New_DXF_Arc.QET_layer=Record3.value("dxf_8").toString();
+					New_DXF_Arc.QET_ltype=Record3.value("dxf_6").toString();
+					New_DXF_Arc.QET_handle=Record3.value("dxf_5").toString();
+					New_DXF_Arc.QET_softID=Record3.value("dxf_330").toString();
+
+
+					New_DXF_Arc.QET_antialias="false";
+					New_DXF_Arc.QET_line_style="normal";
+					New_DXF_Arc.QET_line_weight="thin";
+					New_DXF_Arc.QET_filling="none";
+					New_DXF_Arc.QET_color=DXF_main_base[0].QDXF_block_arc_color;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Arc.Create_arc());
+					//DXF_Block_Value.append(New_DXF_Arc.Create_arc());
+				}
+
+				if (Record3.value("Command").toString()=="TEXT" and Record3.value("Command_count").toInt()==0)
+				{
+					/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+						<text x="-7" y="-8" size="3" text="HC-SR04"/>
+						<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+					New_DXF_Text.QET_x=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_Text.QET_y=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+
+					New_DXF_Text.QET_rotation=Record3.value("dxf_50").toDouble();
+					New_DXF_Text.QET_text=Record3.value("dxf_1").toString();
+					New_DXF_Text.QET_size=Record3.value("dxf_40").toDouble();
+					New_DXF_Text.QET_text_style=Record3.value("dxf_7").toString();
+
+
+					//New_DXF_Text.QET_antialias="false";
+					//New_DXF_Text.QET_line_style="normal";
+					//New_DXF_Text.QET_line_weight="thin";
+					//New_DXF_Text.QET_filling="none";
+					New_DXF_Text.QET_color=DXF_main_base[0].QDXF_block_text_color;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Text.Create_text());
+					//DXF_Block_Value.append(New_DXF_Text.Create_text());
+				}
+
+				if (Record3.value("Command").toString()=="INPUT" and Record3.value("Command_count").toInt()==0)
+				{
+					/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+						<text x="-7" y="-8" size="3" text="HC-SR04"/>
+						<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+					New_DXF_Input.QET_x=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_Input.QET_y=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+
+					New_DXF_Input.QET_rotation=Record3.value("dxf_50").toDouble();
+					New_DXF_Input.QET_text=Record3.value("dxf_1").toString();
+					New_DXF_Input.QET_size=Record3.value("dxf_40").toDouble()*Block_scale_y;
+					New_DXF_Input.QET_text_style=Record3.value("dxf_7").toString();
+
+
+					//New_DXF_Text.QET_antialias="false";
+					//New_DXF_Text.QET_line_style="normal";
+					//New_DXF_Text.QET_line_weight="thin";
+					//New_DXF_Text.QET_filling="none";
+					New_DXF_Input.QET_rotate="true";
+					New_DXF_Input.QET_tag="none";
+
+					New_DXF_Input.QET_color=DXF_main_base[0].QDXF_block_input_color;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Input.Create_input());
+					//DXF_Block_Value.append(New_DXF_Input.Create_input());
+				}
+
+				if (Record3.value("Command").toString()=="ATTRIB" and Record3.value("Command_count").toInt()==0)
+				{
+					/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+						<text x="-7" y="-8" size="3" text="HC-SR04"/>
+						<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+					New_DXF_Input.QET_x=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_Input.QET_y=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+
+					New_DXF_Input.QET_rotation=Record3.value("dxf_50").toDouble();
+					New_DXF_Input.QET_text=Record3.value("dxf_1").toString();
+					New_DXF_Input.QET_size=Record3.value("dxf_40").toDouble()*Block_scale_y;
+					New_DXF_Input.QET_text_style=Record3.value("dxf_7").toString();
+
+
+					//New_DXF_Text.QET_antialias="false";
+					//New_DXF_Text.QET_line_style="normal";
+					//New_DXF_Text.QET_line_weight="thin";
+					//New_DXF_Text.QET_filling="none";
+					New_DXF_Input.QET_rotate="true";
+					New_DXF_Input.QET_tag="none";
+
+					New_DXF_Input.QET_color=DXF_main_base[0].QDXF_block_input_color;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Input.Create_input());
+					//DXF_Block_Value.append(New_DXF_Input.Create_input());
+				}
+
+				if (Record3.value("Command").toString()=="POINT" and Record3.value("Command_count").toInt()==0)
+				{
+					/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+						<text x="-7" y="-8" size="3" text="HC-SR04"/>
+						<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+					New_DXF_Terminal.QET_x=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_Terminal.QET_y=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+
+					New_DXF_Terminal.QET_orientation="north";//Record2.value("dxf_50").toDouble();
+					//New_DXF_Input.QET_text=Record2.value("dxf_1").toString();
+					//New_DXF_Input.QET_size=Record2.value("dxf_40").toDouble();
+					//New_DXF_Input.QET_text_style=Record2.value("dxf_7").toString();
+
+
+					//New_DXF_Text.QET_antialias="false";
+					//New_DXF_Text.QET_line_style="normal";
+					//New_DXF_Text.QET_line_weight="thin";
+					//New_DXF_Text.QET_filling="none";
+					//New_DXF_Input.QET_rotate="true";
+					//New_DXF_Input.QET_tag="label";
+
+					//New_DXF_Input.QET_color=DXF_main_base[0].QDXF_circle_color;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Terminal.Create_terminal());
+					//DXF_Block_Value.append(New_DXF_Terminal.Create_terminal());
+				}
+
+				if (Record3.value("Command").toString()=="ELLIPSE" and Record3.value("Command_count").toInt()==0)
+				{
+					/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+						<text x="-7" y="-8" size="3" text="HC-SR04"/>
+						<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+					New_DXF_Ellipse.QET_center_x=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_Ellipse.QET_center_y=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+					New_DXF_Ellipse.QET_major_radius_x=Record3.value("dxf_11").toDouble()*Block_scale_x;
+					New_DXF_Ellipse.QET_major_radius_y==Record3.value("dxf_21").toDouble()*Block_scale_y;
+
+					New_DXF_Ellipse.QET_end_parameter=Record3.value("dxf_42").toDouble();
+					New_DXF_Ellipse.QET_Start_parameter=Record3.value("dxf_41").toDouble();
+					New_DXF_Ellipse.QET_ratio_minor_axis=Record3.value("dxf_40").toDouble();
+
+					New_DXF_Ellipse.QET_layer=Record3.value("dxf_8").toString();
+					New_DXF_Ellipse.QET_ltype=Record3.value("dxf_6").toString();
+					New_DXF_Ellipse.QET_handle=Record3.value("dxf_5").toString();
+					New_DXF_Ellipse.QET_softID=Record3.value("dxf_330").toString();
+
+					//New_DXF_Terminal.QET_orientation="sud";//Record2.value("dxf_50").toDouble();
+					//New_DXF_Input.QET_text=Record2.value("dxf_1").toString();
+					//New_DXF_Input.QET_size=Record2.value("dxf_40").toDouble();
+					//New_DXF_Input.QET_text_style=Record2.value("dxf_7").toString();
+
+
+					New_DXF_Ellipse.QET_antialias="false";
+					New_DXF_Ellipse.QET_line_style="normal";
+					New_DXF_Ellipse.QET_line_weight="thin";
+					New_DXF_Ellipse.QET_filling="none";
+					//New_DXF_Ellipse.QET_rotate="true";
+					//New_DXF_Input.QET_tag="label";
+
+					New_DXF_Ellipse.QET_color=DXF_main_base[0].QDXF_block_ellipse_color;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Ellipse.Create_ellipse());
+					//DXF_Block_Value.append(New_DXF_Ellipse.Create_ellipse());
+				}
+
+				if (Record3.value("Command").toString()=="POLYLINE" and Record3.value("Command_count").toInt()==0)
+				{
+					New_DXF_Polyline.QET_layer=Record3.value("dxf_8").toString();
+					New_DXF_Polyline.QET_ltype=Record3.value("dxf_6").toString();
+					New_DXF_Polyline.QET_handle=Record3.value("dxf_5").toString();
+					New_DXF_Polyline.QET_softID=Record3.value("dxf_330").toString();
+
+					New_DXF_Polyline.QET_antialias="false";
+					New_DXF_Polyline.QET_line_style="normal";
+					New_DXF_Polyline.QET_line_weight="thin";
+					New_DXF_Polyline.QET_filling="none";
+
+					New_DXF_Polyline.QET_color=DXF_main_base[0].QDXF_block_polyline_color;
+
+					if (Record3.value("dxf_70").toInt()==1)
+					{
+						New_DXF_Polyline.QET_closed="true";
+					}
+					else
+					{
+						New_DXF_Polyline.QET_closed="false";
+					}
+
+					end_seqend=0;
+					count_vertex=0;
+
+					while (end_seqend==0 and count_vertex<QET_L_POLYLINE)
+					{
+						NewQuery.next();
+						QSqlRecord Record4=NewQuery.record();
+						//Recordvalue2=Record4.value("Command").toString();
+
+						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++;
+
+						}
+						if (Record4.value("Command").toString()=="SEQEND" and Record4.value("Command_count").toInt()==0)
+						{
+							end_seqend=1;
+						}
+
+					}
+
+					New_DXF_Polyline.segments=count_vertex;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Polyline.Create_polyline());
+					//DXF_Block_Value.append(New_DXF_Polyline.Create_polyline());
+
+
+				}
+
+				if (Record3.value("Command").toString()=="INSERT" and Record3.value("Command_count").toInt()==0)
+				{
+					New_DXF_blocks2.Block_name=Record3.value("dxf_2").toString();
+					New_DXF_blocks2.Block_X=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_blocks2.Block_Y=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+
+
+					New_DXF_blocks2.Block_scale_x=Record3.value("dxf_41").toDouble();
+					if (New_DXF_blocks2.Block_scale_x==0)
+					{
+						New_DXF_blocks2.Block_scale_x=1;
+					}
+					New_DXF_blocks2.Block_scale_y=Record3.value("dxf_42").toDouble();
+					if (New_DXF_blocks2.Block_scale_y==0)
+					{
+						New_DXF_blocks2.Block_scale_y=1;
+					}
+					New_DXF_blocks2.Block_rotation=Record3.value("dxf_43").toDouble();
+
+					Logtext.append("block : ");
+					Logtext.append(Record3.value("dxf_2").toString());
+					Logtext.append(" inside block :");
+					Logtext.append(FromBlock);
+					Logtext.append(" will not converted to elmt drawing parts");
+					Logtext.append(" \n");
+
+					New_DXF_blocks2.FromBlock=Record3.value("dxf_2").toString();
+
+					//DXF_Entities_List.DXF_Result.append(New_DXF_blocks2.Insert_Block());
+					//DXF_Entities_List.DXF_Result.append(New_DXF_blocks2.Insert_Block());
+
+				}
+
+				if (Record3.value("Command").toString()=="LWPOLYLINE" and Record3.value("Command_count").toInt()==0)
+				{
+
+					New_DXF_LWPolyline.QET_layer=Record3.value("dxf_8").toString();
+					New_DXF_LWPolyline.QET_ltype=Record3.value("dxf_6").toString();
+					New_DXF_LWPolyline.QET_handle=Record3.value("dxf_5").toString();
+					New_DXF_LWPolyline.QET_softID=Record3.value("dxf_330").toString();
+
+					New_DXF_LWPolyline.QET_antialias="false";
+					New_DXF_LWPolyline.QET_line_style="normal";
+					New_DXF_LWPolyline.QET_line_weight="thin";
+					New_DXF_LWPolyline.QET_filling="none";
+
+					New_DXF_LWPolyline.QET_color=DXF_main_base[0].QDXF_block_polyline_color;
+
+					if (Record3.value("dxf_70").toInt()==1)
+					{
+						New_DXF_LWPolyline.QET_closed="true";
+					}
+					else
+					{
+						New_DXF_LWPolyline.QET_closed="false";
+					}
+
+					end_lwpoly=0;
+					max_vertex=0;
+					count_vertex=0;
+
+					max_vertex=Record3.value("dxf_90").toInt();
+
+					if (max_vertex >=QET_L_POLYLINE)
+					{
+						Logtext.append("max_vertex :  ");
+						Logtext.append(QString::number(max_vertex));
+						Logtext.append(" > ");
+						Logtext.append(QString::number(QET_L_POLYLINE));
+						Logtext.append(" \n");
+					}
+
+					while (end_lwpoly==0 and count_vertex<max_vertex+1)
+					{
+						NewQuery.next();
+						QSqlRecord Record4=NewQuery.record();
+						//Recordvalue2=Record4.value("Command").toString();
+
+						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++;
+
+						}
+						if (count_vertex>max_vertex)
+						{
+							end_lwpoly=1;
+						}
+
+					}
+
+					New_DXF_LWPolyline.segments=count_vertex;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_LWPolyline.Create_polyline());
+					//DXF_Block_Value.append(New_DXF_LWPolyline.Create_polyline());
+
+
+				}
+
+
+				if (Record3.value("Command").toString()=="SOLID" and Record3.value("Command_count").toInt()==0)
+				{
+
+					New_DXF_SOLID.QET_layer=Record3.value("dxf_8").toString();
+					New_DXF_SOLID.QET_ltype=Record3.value("dxf_6").toString();
+					New_DXF_SOLID.QET_handle=Record3.value("dxf_5").toString();
+					New_DXF_SOLID.QET_softID=Record3.value("dxf_330").toString();
+
+					New_DXF_SOLID.QET_antialias="false";
+					New_DXF_SOLID.QET_line_style="normal";
+					New_DXF_SOLID.QET_line_weight="thin";
+					New_DXF_SOLID.QET_filling="red";
+
+					New_DXF_SOLID.QET_color=DXF_main_base[0].QDXF_block_solid_color;
+
+					if (Record2.value("dxf_70").toInt()==1)
+					{
+						New_DXF_SOLID.QET_closed="true";
+					}
+					else
+					{
+						New_DXF_SOLID.QET_closed="false";
+					}
+
+					end_lwpoly=0;
+					max_vertex=0;
+					count_vertex=0;
+
+					//max_vertex=Record2.value("dxf_90").toInt();
+					max_vertex=4;
+
+					if (max_vertex >=QET_L_POLYLINE)
+					{
+						Logtext.append("max_vertex :  ");
+						Logtext.append(QString::number(max_vertex));
+						Logtext.append(" > ");
+						Logtext.append(QString::number(QET_L_POLYLINE));
+						Logtext.append(" \n");
+					}
+
+					/*while (end_lwpoly==0 and count_vertex<max_vertex+1)
+					{
+						NewQuery.next();
+						QSqlRecord Record3=NewQuery.record();
+						Recordvalue2=Record3.value("Command").toString();
+						if (Record3.value("Command").toString()=="SOLID" and max_vertex<QET_L_POLYLINE)
+
+
+					{*/
+							New_DXF_SOLID.QET_x[0]=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+							New_DXF_SOLID.QET_y[0]=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+
+							New_DXF_SOLID.QET_x[1]=(Record3.value("dxf_11").toDouble()*Block_scale_x)+Block_X;
+							New_DXF_SOLID.QET_y[1]=(Record3.value("dxf_21").toDouble()*Block_scale_y)+Block_Y;
+
+							New_DXF_SOLID.QET_x[3]=(Record3.value("dxf_12").toDouble()*Block_scale_x)+Block_X;
+							New_DXF_SOLID.QET_y[3]=(Record3.value("dxf_22").toDouble()*Block_scale_y)+Block_Y;
+
+							New_DXF_SOLID.QET_x[2]=(Record3.value("dxf_13").toDouble()*Block_scale_x)+Block_X;
+							New_DXF_SOLID.QET_y[2]=(Record3.value("dxf_23").toDouble()*Block_scale_y)+Block_Y;
+							count_vertex=4;
+
+						/*}
+						if (count_vertex>max_vertex)
+						{
+							end_lwpoly=1;
+						}
+
+					}*/
+
+					New_DXF_SOLID.segments=count_vertex;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_SOLID.Create_polyline());
+					//DXF_Block_Value.append(New_DXF_SOLID.Create_polyline());
+
+
+				}
+
+				if (Record3.value("Command").toString()=="ENDBLK" and Record3.value("Command_count").toInt()==0)
+				{
+					end_block=1;
+				}
+			}
+
+
+			//Manage_Blocks.dbManager_create_elmt_block(&filename1,Block_count,DXF_Block_Name,DXF_Block_Value);
+
+			DXF_Block_Name="";
+			DXF_Block_Value="";
+
+		}
+		else
+		{
+			NewQuery.next();
+		}
+	}
+
+	//Logtext.append("Records BLOCK passed : ");
+	//Logtext.append(QString::number(rowcount));
+	Logtext.append(" \n");
+	return Logtext;
+
+}

Added: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_block_level2.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,88 @@
+#ifndef ELMT_BLOCK_LEVEL2_H
+#define ELMT_BLOCK_LEVEL2_H
+
+#include <QWidget>
+#include <QObject>
+
+
+#include "data.h"
+#include "src/dxf_load.h"
+#include "db/dbmanager.h"
+
+#include "src/DXF_control/dxf_layer_control.h"
+#include "src/DXF_control/dxf_ltype_control.h"
+#include "src/DXF_control/dxf_text_control.h"
+#include "src/ELMT_base_types/dxf_base_line.h"
+#include "src/ELMT_base_types/dxf_base_circle.h"
+#include "src/ELMT_base_types/dxf_base_arc.h"
+#include "src/ELMT_base_types/dxf_base_text.h"
+#include "src/ELMT_base_types/dxf_base_input.h"
+#include "src/ELMT_base_types/dxf_base_terminal.h"
+#include "src/ELMT_base_types/dxf_base_ellipse.h"
+#include "src/ELMT_base_types/dxf_base_rectangel.h"
+#include "src/ELMT_base_types/dxf_base_polyline.h"
+#include "src/ELMT_steps/elmt_blocks.h"
+
+class elmt_block_level2 : public QWidget
+{
+	Q_OBJECT
+	public:
+	explicit elmt_block_level2(QWidget *parent = 0);
+
+	int end_block;
+	int end_seqend;
+	int end_lwpoly;
+
+	int32_t count_vertex;
+	int32_t xcount;
+	int32_t rowcount;
+	int32_t max_vertex;
+	int32_t Block_count;
+
+
+	QString Logtext;
+	QString Recordvalue;
+
+	QString ELMT_ID_instruction;
+
+	QString Rec_Command;
+	QString Rec_Blocknaam;
+
+	QString filename1;
+
+	QString FromBlock;
+
+
+
+	double Block_X;				//10
+	double Block_Y;				//20
+	double Block_scale_x;		//41
+	double Block_scale_y;		//42
+	double Block_rotation;		//50
+
+	QString Block_name;			//2
+	QString Block_layer;		//8
+	QString Block_ltype;		//6
+	QString Block_handle;		//5
+	QString Block_softID;		//330
+
+	QString QET_antialias;
+	QString QET_line_style;
+	QString QET_line_weight;
+	QString QET_filling;
+	QString QET_color;
+
+	QString DXF_Block_Value;
+	QString DXF_Block_Name;
+
+
+
+	QString Insert_Block();
+
+
+	signals:
+
+	public slots:
+};
+
+#endif // ELMT_BLOCK_LEVEL2_H

Added: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,588 @@
+#include "elmt_blocks.h"
+
+#include <qsql.h>
+#include <QSqlDatabase>
+#include <QSqlQuery>
+#include <QSqlRecord>
+#include <QtSql>
+
+extern struct DXF_base DXF_main_base[DXF_base_set];
+extern struct DXF_Entities DXF_Entities_List;
+
+elmt_blocks::elmt_blocks(QWidget *parent) : QWidget(parent)
+{
+
+}
+
+QString elmt_blocks::Insert_Block()
+{
+
+	dbManager Manage_Blocks;
+
+	DXF_main_base[0].QDXF_block_arc_color="blue";
+	DXF_main_base[0].QDXF_block_circle_color="blue";
+	DXF_main_base[0].QDXF_block_ellipse_color="blue";
+	DXF_main_base[0].QDXF_block_input_color="blue";
+	DXF_main_base[0].QDXF_block_line_color="blue";
+	DXF_main_base[0].QDXF_block_lwpolyline_color="blue";
+	DXF_main_base[0].QDXF_block_polyline_color="blue";
+	DXF_main_base[0].QDXF_block_rectangel_color="blue";
+	DXF_main_base[0].QDXF_block_terminal_color="blue";
+	DXF_main_base[0].QDXF_block_text_color="blue";
+	DXF_main_base[0].QDXF_block_solid_color="blue";
+
+	xcount=0;
+	Logtext="";
+	rowcount=0;
+	DXF_Block_Name="";
+	DXF_Block_Value="";
+	Block_count=-1;
+
+	QSqlQuery NewQuery("SELECT * FROM dxf_blocks");
+
+
+
+
+	dxf_base_line New_DXF_Line;
+	dxf_base_circle New_DXF_Circle;
+	dxf_base_arc New_DXF_Arc;
+	dxf_base_text New_DXF_Text;
+	dxf_base_input New_DXF_Input;
+	dxf_base_terminal New_DXF_Terminal;
+	dxf_base_ellipse New_DXF_Ellipse;
+	dxf_base_polyline New_DXF_Polyline;
+	dxf_base_polyline New_DXF_LWPolyline;
+	dxf_base_polyline New_DXF_SOLID;
+	elmt_block_level2 New_DXF_blocks2;
+
+
+	Logtext.append("Converting DXF blocks\n");
+
+	end_block=0;
+
+	//while (NewQuery.next() and end_block==0)
+	//while (NewQuery.next())
+
+	while (NewQuery.next() and end_block==0)
+	{
+
+		QSqlRecord Record2=NewQuery.record();
+		Recordvalue=Record2.value("Command").toString();
+
+		if (Record2.value("Command_count").toInt()==0 and Record2.value("Command").toString()=="BLOCK")
+		{
+			Block_count++;
+			ELMT_ID_instruction=Record2.value("ID_instruction").toString();
+		}
+
+		rowcount++;
+
+		Rec_Command=Record2.value("Command").toString();
+		Rec_Blocknaam=Record2.value("dxf_2").toString();
+
+		DXF_Block_Name=Record2.value("dxf_2").toString();
+
+		if (Record2.value("Command").toString()=="BLOCK" and Record2.value("dxf_2").toString()==Block_name)
+		{
+			end_block=0;
+
+			while (end_block==0)
+			{
+				NewQuery.next();
+				QSqlRecord Record3=NewQuery.record();
+
+				if (Record3.value("Command").toString()=="LINE" and Record3.value("Command_count").toInt()==0)
+				{
+					/*<line length1="1.5" length2="1.5" antialias="false"
+					 * end1="none" end2="none"
+					 * style="line-style:normal;line-weight:normal;filling:none;color:black"
+					 * y1="-20" x1="10" y2="-10" x2="10"/>*/
+
+
+					New_DXF_Line.QET_x1=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_Line.QET_x2=(Record3.value("dxf_11").toDouble()*Block_scale_y)+Block_Y;
+					New_DXF_Line.QET_y1=(Record3.value("dxf_20").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_Line.QET_y2=(Record3.value("dxf_21").toDouble()*Block_scale_y)+Block_Y;
+
+					New_DXF_Line.QET_layer=Record3.value("dxf_8").toString();
+					New_DXF_Line.QET_ltype=Record3.value("dxf_6").toString();
+					New_DXF_Line.QET_handle=Record3.value("dxf_5").toString();
+					New_DXF_Line.QET_softID=Record3.value("dxf_330").toString();
+
+					New_DXF_Line.QET_lenght1=1.5;
+					New_DXF_Line.QET_lenght2=1.5;
+					New_DXF_Line.QET_antialias="false";
+					New_DXF_Line.QET_end1="none";
+					New_DXF_Line.QET_end2="none";
+
+					New_DXF_Line.QET_line_style="normal";
+					New_DXF_Line.QET_line_weight="thin";
+					New_DXF_Line.QET_filling="none";
+					New_DXF_Line.QET_color=DXF_main_base[0].QDXF_block_line_color;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Line.CreateElmt());
+					//DXF_Block_Value.append(New_DXF_Line.CreateElmt());
+
+				}
+
+				if (Record3.value("Command").toString()=="CIRCLE" and Record3.value("Command_count").toInt()==0)
+				{
+					/* <circle x="-28" y="-8" antialias="true"
+					 * style="line-style:normal;line-weight:thin;filling:none;color:black"
+					 * diameter="22"/> */
+
+					New_DXF_Circle.QET_x=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_Circle.QET_y=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+					New_DXF_Circle.QET_diameter=Record3.value(("dxf_40")).toDouble()*Block_scale_x;
+
+					New_DXF_Circle.QET_layer=Record3.value("dxf_8").toString();
+					New_DXF_Circle.QET_ltype=Record3.value("dxf_6").toString();
+					New_DXF_Circle.QET_handle=Record3.value("dxf_5").toString();
+					New_DXF_Circle.QET_softID=Record3.value("dxf_330").toString();
+
+					New_DXF_Circle.QET_antialias="false";
+					New_DXF_Circle.QET_line_style="normal";
+					New_DXF_Circle.QET_line_weight="thin";
+					New_DXF_Circle.QET_filling="none";
+					New_DXF_Circle.QET_color=DXF_main_base[0].QDXF_block_circle_color;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Circle.Create_circle());
+					//DXF_Block_Value.append(New_DXF_Circle.Create_circle());
+				}
+
+				if (Record3.value("Command").toString()=="ARC" and Record3.value("Command_count").toInt()==0)
+				{
+					/*  <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"/> */
+
+					New_DXF_Arc.QET_x=((Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X)-(Record3.value("dxf_40").toDouble()*Block_scale_x);
+					New_DXF_Arc.QET_y=((Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y)+(Record3.value("dxf_40").toDouble()*Block_scale_y);
+					New_DXF_Arc.QET_width=Record3.value("dxf_40").toDouble()*2*Block_scale_x;
+					New_DXF_Arc.QET_height=Record3.value("dxf_40").toDouble()*2*Block_scale_y;
+					New_DXF_Arc.QET_start=Record3.value("dxf_50").toDouble();
+					New_DXF_Arc.QET_end=Record3.value("dxf_51").toDouble();
+
+					New_DXF_Arc.QET_layer=Record3.value("dxf_8").toString();
+					New_DXF_Arc.QET_ltype=Record3.value("dxf_6").toString();
+					New_DXF_Arc.QET_handle=Record3.value("dxf_5").toString();
+					New_DXF_Arc.QET_softID=Record3.value("dxf_330").toString();
+
+
+					New_DXF_Arc.QET_antialias="false";
+					New_DXF_Arc.QET_line_style="normal";
+					New_DXF_Arc.QET_line_weight="thin";
+					New_DXF_Arc.QET_filling="none";
+					New_DXF_Arc.QET_color=DXF_main_base[0].QDXF_block_arc_color;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Arc.Create_arc());
+					//DXF_Block_Value.append(New_DXF_Arc.Create_arc());
+				}
+
+				if (Record3.value("Command").toString()=="TEXT" and Record3.value("Command_count").toInt()==0)
+				{
+					/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+						<text x="-7" y="-8" size="3" text="HC-SR04"/>
+						<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+					New_DXF_Text.QET_x=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_Text.QET_y=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+
+					New_DXF_Text.QET_rotation=Record3.value("dxf_50").toDouble();
+					New_DXF_Text.QET_text=Record3.value("dxf_1").toString();
+					New_DXF_Text.QET_size=Record3.value("dxf_40").toDouble();
+					New_DXF_Text.QET_text_style=Record3.value("dxf_7").toString();
+
+
+					//New_DXF_Text.QET_antialias="false";
+					//New_DXF_Text.QET_line_style="normal";
+					//New_DXF_Text.QET_line_weight="thin";
+					//New_DXF_Text.QET_filling="none";
+					New_DXF_Text.QET_color=DXF_main_base[0].QDXF_block_text_color;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Text.Create_text());
+					//DXF_Block_Value.append(New_DXF_Text.Create_text());
+				}
+
+				if (Record3.value("Command").toString()=="INPUT" and Record3.value("Command_count").toInt()==0)
+				{
+					/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+						<text x="-7" y="-8" size="3" text="HC-SR04"/>
+						<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+					New_DXF_Input.QET_x=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_Input.QET_y=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+
+					New_DXF_Input.QET_rotation=Record3.value("dxf_50").toDouble();
+					New_DXF_Input.QET_text=Record3.value("dxf_1").toString();
+					New_DXF_Input.QET_size=Record3.value("dxf_40").toDouble()*Block_scale_y;
+					New_DXF_Input.QET_text_style=Record3.value("dxf_7").toString();
+
+
+					//New_DXF_Text.QET_antialias="false";
+					//New_DXF_Text.QET_line_style="normal";
+					//New_DXF_Text.QET_line_weight="thin";
+					//New_DXF_Text.QET_filling="none";
+					New_DXF_Input.QET_rotate="true";
+					New_DXF_Input.QET_tag="none";
+
+					New_DXF_Input.QET_color=DXF_main_base[0].QDXF_block_input_color;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Input.Create_input());
+					//DXF_Block_Value.append(New_DXF_Input.Create_input());
+				}
+
+				if (Record3.value("Command").toString()=="ATTRIB" and Record3.value("Command_count").toInt()==0)
+				{
+					/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+						<text x="-7" y="-8" size="3" text="HC-SR04"/>
+						<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+					New_DXF_Input.QET_x=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_Input.QET_y=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+
+					New_DXF_Input.QET_rotation=Record3.value("dxf_50").toDouble();
+					New_DXF_Input.QET_text=Record3.value("dxf_1").toString();
+					New_DXF_Input.QET_size=Record3.value("dxf_40").toDouble()*Block_scale_y;
+					New_DXF_Input.QET_text_style=Record3.value("dxf_7").toString();
+
+
+					//New_DXF_Text.QET_antialias="false";
+					//New_DXF_Text.QET_line_style="normal";
+					//New_DXF_Text.QET_line_weight="thin";
+					//New_DXF_Text.QET_filling="none";
+					New_DXF_Input.QET_rotate="true";
+					New_DXF_Input.QET_tag="none";
+
+					New_DXF_Input.QET_color=DXF_main_base[0].QDXF_block_input_color;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Input.Create_input());
+					//DXF_Block_Value.append(New_DXF_Input.Create_input());
+				}
+
+				if (Record3.value("Command").toString()=="POINT" and Record3.value("Command_count").toInt()==0)
+				{
+					/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+						<text x="-7" y="-8" size="3" text="HC-SR04"/>
+						<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+					New_DXF_Terminal.QET_x=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_Terminal.QET_y=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+
+					New_DXF_Terminal.QET_orientation="north";//Record2.value("dxf_50").toDouble();
+					//New_DXF_Input.QET_text=Record2.value("dxf_1").toString();
+					//New_DXF_Input.QET_size=Record2.value("dxf_40").toDouble();
+					//New_DXF_Input.QET_text_style=Record2.value("dxf_7").toString();
+
+
+					//New_DXF_Text.QET_antialias="false";
+					//New_DXF_Text.QET_line_style="normal";
+					//New_DXF_Text.QET_line_weight="thin";
+					//New_DXF_Text.QET_filling="none";
+					//New_DXF_Input.QET_rotate="true";
+					//New_DXF_Input.QET_tag="label";
+
+					//New_DXF_Input.QET_color=DXF_main_base[0].QDXF_circle_color;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Terminal.Create_terminal());
+					//DXF_Block_Value.append(New_DXF_Terminal.Create_terminal());
+				}
+
+				if (Record3.value("Command").toString()=="ELLIPSE" and Record3.value("Command_count").toInt()==0)
+				{
+					/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+						<text x="-7" y="-8" size="3" text="HC-SR04"/>
+						<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+					New_DXF_Ellipse.QET_center_x=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_Ellipse.QET_center_y=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+					New_DXF_Ellipse.QET_major_radius_x=Record3.value("dxf_11").toDouble()*Block_scale_x;
+					New_DXF_Ellipse.QET_major_radius_y==Record3.value("dxf_21").toDouble()*Block_scale_y;
+
+					New_DXF_Ellipse.QET_end_parameter=Record3.value("dxf_42").toDouble();
+					New_DXF_Ellipse.QET_Start_parameter=Record3.value("dxf_41").toDouble();
+					New_DXF_Ellipse.QET_ratio_minor_axis=Record3.value("dxf_40").toDouble();
+
+					New_DXF_Ellipse.QET_layer=Record3.value("dxf_8").toString();
+					New_DXF_Ellipse.QET_ltype=Record3.value("dxf_6").toString();
+					New_DXF_Ellipse.QET_handle=Record3.value("dxf_5").toString();
+					New_DXF_Ellipse.QET_softID=Record3.value("dxf_330").toString();
+
+					//New_DXF_Terminal.QET_orientation="sud";//Record2.value("dxf_50").toDouble();
+					//New_DXF_Input.QET_text=Record2.value("dxf_1").toString();
+					//New_DXF_Input.QET_size=Record2.value("dxf_40").toDouble();
+					//New_DXF_Input.QET_text_style=Record2.value("dxf_7").toString();
+
+
+					New_DXF_Ellipse.QET_antialias="false";
+					New_DXF_Ellipse.QET_line_style="normal";
+					New_DXF_Ellipse.QET_line_weight="thin";
+					New_DXF_Ellipse.QET_filling="none";
+					//New_DXF_Ellipse.QET_rotate="true";
+					//New_DXF_Input.QET_tag="label";
+
+					New_DXF_Ellipse.QET_color=DXF_main_base[0].QDXF_block_ellipse_color;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Ellipse.Create_ellipse());
+					//DXF_Block_Value.append(New_DXF_Ellipse.Create_ellipse());
+				}
+
+				if (Record3.value("Command").toString()=="POLYLINE" and Record3.value("Command_count").toInt()==0)
+				{
+					New_DXF_Polyline.QET_layer=Record3.value("dxf_8").toString();
+					New_DXF_Polyline.QET_ltype=Record3.value("dxf_6").toString();
+					New_DXF_Polyline.QET_handle=Record3.value("dxf_5").toString();
+					New_DXF_Polyline.QET_softID=Record3.value("dxf_330").toString();
+
+					New_DXF_Polyline.QET_antialias="false";
+					New_DXF_Polyline.QET_line_style="normal";
+					New_DXF_Polyline.QET_line_weight="thin";
+					New_DXF_Polyline.QET_filling="none";
+
+					New_DXF_Polyline.QET_color=DXF_main_base[0].QDXF_block_polyline_color;
+
+					if (Record3.value("dxf_70").toInt()==1)
+					{
+						New_DXF_Polyline.QET_closed="true";
+					}
+					else
+					{
+						New_DXF_Polyline.QET_closed="false";
+					}
+
+					end_seqend=0;
+					count_vertex=0;
+
+					while (end_seqend==0 and count_vertex<QET_L_POLYLINE)
+					{
+						NewQuery.next();
+						QSqlRecord Record4=NewQuery.record();
+						//Recordvalue2=Record4.value("Command").toString();
+
+						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++;
+
+						}
+						if (Record4.value("Command").toString()=="SEQEND" and Record4.value("Command_count").toInt()==0)
+						{
+							end_seqend=1;
+						}
+
+					}
+
+					New_DXF_Polyline.segments=count_vertex;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_Polyline.Create_polyline());
+					//DXF_Block_Value.append(New_DXF_Polyline.Create_polyline());
+
+
+				}
+
+				if (Record3.value("Command").toString()=="INSERT" and Record3.value("Command_count").toInt()==0)
+				{
+					New_DXF_blocks2.Block_name=Record3.value("dxf_2").toString();
+					New_DXF_blocks2.Block_X=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+					New_DXF_blocks2.Block_Y=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+
+
+					New_DXF_blocks2.Block_scale_x=Record3.value("dxf_41").toDouble();
+					if (New_DXF_blocks2.Block_scale_x==0)
+					{
+						New_DXF_blocks2.Block_scale_x=1;
+					}
+					New_DXF_blocks2.Block_scale_y=Record3.value("dxf_42").toDouble();
+					if (New_DXF_blocks2.Block_scale_y==0)
+					{
+						New_DXF_blocks2.Block_scale_y=1;
+					}
+					New_DXF_blocks2.Block_rotation=Record3.value("dxf_43").toDouble();
+
+					Logtext.append("block : ");
+					Logtext.append(Record3.value("dxf_2").toString());
+					Logtext.append(" inside block :");
+					Logtext.append(FromBlock);
+					Logtext.append(" will be converted as a drawing part");
+					Logtext.append(" \n");
+
+					New_DXF_blocks2.FromBlock=Record3.value("dxf_2").toString();
+
+					Logtext.append(New_DXF_blocks2.Insert_Block());
+					//DXF_Entities_List.DXF_Result.append(New_DXF_blocks2.Insert_Block());
+
+				}
+
+				if (Record3.value("Command").toString()=="LWPOLYLINE" and Record3.value("Command_count").toInt()==0)
+				{
+
+					New_DXF_LWPolyline.QET_layer=Record3.value("dxf_8").toString();
+					New_DXF_LWPolyline.QET_ltype=Record3.value("dxf_6").toString();
+					New_DXF_LWPolyline.QET_handle=Record3.value("dxf_5").toString();
+					New_DXF_LWPolyline.QET_softID=Record3.value("dxf_330").toString();
+
+					New_DXF_LWPolyline.QET_antialias="false";
+					New_DXF_LWPolyline.QET_line_style="normal";
+					New_DXF_LWPolyline.QET_line_weight="thin";
+					New_DXF_LWPolyline.QET_filling="none";
+
+					New_DXF_LWPolyline.QET_color=DXF_main_base[0].QDXF_block_polyline_color;
+
+					if (Record3.value("dxf_70").toInt()==1)
+					{
+						New_DXF_LWPolyline.QET_closed="true";
+					}
+					else
+					{
+						New_DXF_LWPolyline.QET_closed="false";
+					}
+
+					end_lwpoly=0;
+					max_vertex=0;
+					count_vertex=0;
+
+					max_vertex=Record3.value("dxf_90").toInt();
+
+					if (max_vertex >=QET_L_POLYLINE)
+					{
+						Logtext.append("max_vertex :  ");
+						Logtext.append(QString::number(max_vertex));
+						Logtext.append(" > ");
+						Logtext.append(QString::number(QET_L_POLYLINE));
+						Logtext.append(" \n");
+					}
+
+					while (end_lwpoly==0 and count_vertex<max_vertex+1)
+					{
+						NewQuery.next();
+						QSqlRecord Record4=NewQuery.record();
+						//Recordvalue2=Record4.value("Command").toString();
+
+						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++;
+
+						}
+						if (count_vertex>max_vertex)
+						{
+							end_lwpoly=1;
+						}
+
+					}
+
+					New_DXF_LWPolyline.segments=count_vertex;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_LWPolyline.Create_polyline());
+					//DXF_Block_Value.append(New_DXF_LWPolyline.Create_polyline());
+
+
+				}
+
+
+				if (Record3.value("Command").toString()=="SOLID" and Record3.value("Command_count").toInt()==0)
+				{
+
+					New_DXF_SOLID.QET_layer=Record3.value("dxf_8").toString();
+					New_DXF_SOLID.QET_ltype=Record3.value("dxf_6").toString();
+					New_DXF_SOLID.QET_handle=Record3.value("dxf_5").toString();
+					New_DXF_SOLID.QET_softID=Record3.value("dxf_330").toString();
+
+					New_DXF_SOLID.QET_antialias="false";
+					New_DXF_SOLID.QET_line_style="normal";
+					New_DXF_SOLID.QET_line_weight="thin";
+					New_DXF_SOLID.QET_filling="red";
+
+					New_DXF_SOLID.QET_color=DXF_main_base[0].QDXF_block_solid_color;
+
+					if (Record2.value("dxf_70").toInt()==1)
+					{
+						New_DXF_SOLID.QET_closed="true";
+					}
+					else
+					{
+						New_DXF_SOLID.QET_closed="false";
+					}
+
+					end_lwpoly=0;
+					max_vertex=0;
+					count_vertex=0;
+
+					//max_vertex=Record2.value("dxf_90").toInt();
+					max_vertex=4;
+
+					if (max_vertex >=QET_L_POLYLINE)
+					{
+						Logtext.append("max_vertex :  ");
+						Logtext.append(QString::number(max_vertex));
+						Logtext.append(" > ");
+						Logtext.append(QString::number(QET_L_POLYLINE));
+						Logtext.append(" \n");
+					}
+
+					/*while (end_lwpoly==0 and count_vertex<max_vertex+1)
+					{
+						NewQuery.next();
+						QSqlRecord Record3=NewQuery.record();
+						Recordvalue2=Record3.value("Command").toString();
+						if (Record3.value("Command").toString()=="SOLID" and max_vertex<QET_L_POLYLINE)
+
+
+					{*/
+							New_DXF_SOLID.QET_x[0]=(Record3.value("dxf_10").toDouble()*Block_scale_x)+Block_X;
+							New_DXF_SOLID.QET_y[0]=(Record3.value("dxf_20").toDouble()*Block_scale_y)+Block_Y;
+
+							New_DXF_SOLID.QET_x[1]=(Record3.value("dxf_11").toDouble()*Block_scale_x)+Block_X;
+							New_DXF_SOLID.QET_y[1]=(Record3.value("dxf_21").toDouble()*Block_scale_y)+Block_Y;
+
+							New_DXF_SOLID.QET_x[3]=(Record3.value("dxf_12").toDouble()*Block_scale_x)+Block_X;
+							New_DXF_SOLID.QET_y[3]=(Record3.value("dxf_22").toDouble()*Block_scale_y)+Block_Y;
+
+							New_DXF_SOLID.QET_x[2]=(Record3.value("dxf_13").toDouble()*Block_scale_x)+Block_X;
+							New_DXF_SOLID.QET_y[2]=(Record3.value("dxf_23").toDouble()*Block_scale_y)+Block_Y;
+							count_vertex=4;
+
+						/*}
+						if (count_vertex>max_vertex)
+						{
+							end_lwpoly=1;
+						}
+
+					}*/
+
+					New_DXF_SOLID.segments=count_vertex;
+
+					DXF_Entities_List.DXF_Result.append(New_DXF_SOLID.Create_polyline());
+					//DXF_Block_Value.append(New_DXF_SOLID.Create_polyline());
+
+
+				}
+
+				if (Record3.value("Command").toString()=="ENDBLK" and Record3.value("Command_count").toInt()==0)
+				{
+					end_block=1;
+				}
+			}
+
+
+			//Manage_Blocks.dbManager_create_elmt_block(&filename1,Block_count,DXF_Block_Name,DXF_Block_Value);
+
+			DXF_Block_Name="";
+			DXF_Block_Value="";
+
+		}
+		else
+		{
+			NewQuery.next();
+		}
+	}
+
+	//Logtext.append("Records BLOCK passed : ");
+	//Logtext.append(QString::number(rowcount));
+	Logtext.append(" \n");
+	return Logtext;
+
+}

Added: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_blocks.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,88 @@
+#ifndef ELMT_BLOCKS_H
+#define ELMT_BLOCKS_H
+
+#include <QWidget>
+#include <QObject>
+
+
+#include "data.h"
+#include "src/dxf_load.h"
+#include "db/dbmanager.h"
+
+#include "src/DXF_control/dxf_layer_control.h"
+#include "src/DXF_control/dxf_ltype_control.h"
+#include "src/DXF_control/dxf_text_control.h"
+#include "src/ELMT_base_types/dxf_base_line.h"
+#include "src/ELMT_base_types/dxf_base_circle.h"
+#include "src/ELMT_base_types/dxf_base_arc.h"
+#include "src/ELMT_base_types/dxf_base_text.h"
+#include "src/ELMT_base_types/dxf_base_input.h"
+#include "src/ELMT_base_types/dxf_base_terminal.h"
+#include "src/ELMT_base_types/dxf_base_ellipse.h"
+#include "src/ELMT_base_types/dxf_base_rectangel.h"
+#include "src/ELMT_base_types/dxf_base_polyline.h"
+#include "src/ELMT_steps/elmt_block_level2.h"
+
+class elmt_blocks : public QWidget
+{
+	Q_OBJECT
+	public:
+	explicit elmt_blocks(QWidget *parent = 0);
+
+	int end_block;
+	int end_seqend;
+	int end_lwpoly;
+
+	int32_t count_vertex;
+	int32_t xcount;
+	int32_t rowcount;
+	int32_t max_vertex;
+	int32_t Block_count;
+
+
+	QString Logtext;
+	QString Recordvalue;
+
+	QString ELMT_ID_instruction;
+
+	QString Rec_Command;
+	QString Rec_Blocknaam;
+
+	QString filename1;
+
+	QString FromBlock;
+
+
+
+	double Block_X;				//10
+	double Block_Y;				//20
+	double Block_scale_x;		//41
+	double Block_scale_y;		//42
+	double Block_rotation;		//50
+
+	QString Block_name;			//2
+	QString Block_layer;		//8
+	QString Block_ltype;		//6
+	QString Block_handle;		//5
+	QString Block_softID;		//330
+
+	QString QET_antialias;
+	QString QET_line_style;
+	QString QET_line_weight;
+	QString QET_filling;
+	QString QET_color;
+
+	QString DXF_Block_Value;
+	QString DXF_Block_Name;
+
+
+
+	QString Insert_Block();
+
+	signals:
+
+	public slots:
+
+};
+
+#endif // ELMT_BLOCKS_H

Added: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,594 @@
+#include "elmt_entities.h"
+
+#include <qsql.h>
+#include <QSqlDatabase>
+#include <QSqlQuery>
+#include <QSqlRecord>
+#include <QtSql>
+
+extern struct DXF_base DXF_main_base[DXF_base_set];
+extern struct DXF_Entities DXF_Entities_List;
+
+elmt_entities::elmt_entities(QWidget *parent) : QWidget(parent)
+{
+
+}
+
+void elmt_entities::Open_SQL_DB (QString ELMT_filename)
+{
+
+	dbManager mydb2;
+	mydb2.dbManager1(ELMT_filename);
+
+
+}
+
+void elmt_entities::Close_SQL_DB (QString ELMT_filename)
+{
+
+	dbManager mydb2;
+	mydb2.dbManager1(ELMT_filename);
+
+
+}
+
+QString elmt_entities::Get_Entities (QString ELMT_filename)
+{
+
+	DXF_main_base[0].QDXF_entitie_arc_color="black";
+	DXF_main_base[0].QDXF_entitie_circle_color="black";
+	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_rectangel_color="black";
+	DXF_main_base[0].QDXF_entitie_terminal_color="black";
+	DXF_main_base[0].QDXF_entitie_text_color="black";
+	DXF_main_base[0].QDXF_entitie_solid_color="black";
+
+	xcount=0;
+	Logtext="";
+	rowcount=0;
+
+	QSqlQuery NewQuery("SELECT * FROM dxf_entities");
+
+
+
+
+
+	dxf_base_line New_DXF_Line;
+	dxf_base_circle New_DXF_Circle;
+	dxf_base_arc New_DXF_Arc;
+	dxf_base_text New_DXF_Text;
+	dxf_base_input New_DXF_Input;
+	dxf_base_terminal New_DXF_Terminal;
+	dxf_base_ellipse New_DXF_Ellipse;
+	dxf_base_polyline New_DXF_Polyline;
+	dxf_base_polyline New_DXF_LWPolyline;
+	dxf_base_polyline New_DXF_SOLID;
+	elmt_blocks New_DXF_blocks;
+
+	// basic part for creating a correct ELMT file
+
+	//DXF_Entities_List.DXF_Result.clear();
+
+	Logtext.append("Insert basic ELMT items\n");
+
+	/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+		<text x="-7" y="-8" size="3" text="HC-SR04"/>
+		<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+	New_DXF_Input.QET_x=0;
+	New_DXF_Input.QET_y=0;
+
+	New_DXF_Input.QET_rotation=90;
+	New_DXF_Input.QET_text="converted";
+	New_DXF_Input.QET_size=1;
+	New_DXF_Input.QET_text_style="default"	;
+
+
+	//New_DXF_Text.QET_antialias="false";
+	//New_DXF_Text.QET_line_style="normal";
+	//New_DXF_Text.QET_line_weight="thin";
+	//New_DXF_Text.QET_filling="none";
+	New_DXF_Input.QET_rotate="true";
+	New_DXF_Input.QET_tag="label";
+
+	New_DXF_Input.QET_color=DXF_main_base[0].QDXF_entitie_text_color;
+
+
+	DXF_Entities_List.DXF_Result.append(New_DXF_Input.Create_input());
+
+	New_DXF_Terminal.QET_x=10;
+	New_DXF_Terminal.QET_y=-10;
+	New_DXF_Terminal.QET_orientation="sud";
+
+	DXF_Entities_List.DXF_Result.append(New_DXF_Terminal.Create_terminal());
+
+
+	Logtext.append("Converting DXF entities\n");
+
+
+	while (NewQuery.next())
+	{
+
+		QSqlRecord Record2=NewQuery.record();
+		Recordvalue=Record2.value("Command").toString();
+
+		if (Record2.value("Command_count").toInt()==0)
+		{
+
+			ELMT_ID_instruction=Record2.value("ID_instruction").toString();
+		}
+
+		rowcount++;
+
+		if (Record2.value("Command").toString()=="LINE" and Record2.value("Command_count").toInt()==0)
+		{
+			/*<line length1="1.5" length2="1.5" antialias="false"
+			 * end1="none" end2="none"
+			 * style="line-style:normal;line-weight:normal;filling:none;color:black"
+			 * y1="-20" x1="10" y2="-10" x2="10"/>*/
+
+
+			New_DXF_Line.QET_x1=Record2.value("dxf_10").toDouble();
+			New_DXF_Line.QET_x2=Record2.value("dxf_11").toDouble();
+			New_DXF_Line.QET_y1=Record2.value("dxf_20").toDouble();
+			New_DXF_Line.QET_y2=Record2.value("dxf_21").toDouble();
+
+			New_DXF_Line.QET_layer=Record2.value("dxf_8").toString();
+			New_DXF_Line.QET_ltype=Record2.value("dxf_6").toString();
+			New_DXF_Line.QET_handle=Record2.value("dxf_5").toString();
+			New_DXF_Line.QET_softID=Record2.value("dxf_330").toString();
+
+			New_DXF_Line.QET_lenght1=1.5;
+			New_DXF_Line.QET_lenght2=1.5;
+			New_DXF_Line.QET_antialias="false";
+			New_DXF_Line.QET_end1="none";
+			New_DXF_Line.QET_end2="none";
+
+			New_DXF_Line.QET_line_style="normal";
+			New_DXF_Line.QET_line_weight="thin";
+			New_DXF_Line.QET_filling="none";
+			New_DXF_Line.QET_color=DXF_main_base[0].QDXF_entitie_line_color;
+
+
+			DXF_Entities_List.DXF_Result.append(New_DXF_Line.CreateElmt());
+
+		}
+
+		if (Record2.value("Command").toString()=="CIRCLE" and Record2.value("Command_count").toInt()==0)
+		{
+			/* <circle x="-28" y="-8" antialias="true"
+			 * style="line-style:normal;line-weight:thin;filling:none;color:black"
+			 * diameter="22"/> */
+
+			New_DXF_Circle.QET_x=Record2.value("dxf_10").toDouble();
+			New_DXF_Circle.QET_y=Record2.value("dxf_20").toDouble();
+			New_DXF_Circle.QET_diameter=Record2.value(("dxf_40")).toDouble();
+
+			New_DXF_Circle.QET_layer=Record2.value("dxf_8").toString();
+			New_DXF_Circle.QET_ltype=Record2.value("dxf_6").toString();
+			New_DXF_Circle.QET_handle=Record2.value("dxf_5").toString();
+			New_DXF_Circle.QET_softID=Record2.value("dxf_330").toString();
+
+			New_DXF_Circle.QET_antialias="false";
+			New_DXF_Circle.QET_line_style="normal";
+			New_DXF_Circle.QET_line_weight="thin";
+			New_DXF_Circle.QET_filling="none";
+			New_DXF_Circle.QET_color=DXF_main_base[0].QDXF_entitie_circle_color;
+
+
+			DXF_Entities_List.DXF_Result.append(New_DXF_Circle.Create_circle());
+		}
+
+		if (Record2.value("Command").toString()=="ARC" and Record2.value("Command_count").toInt()==0)
+		{
+			/*  <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"/> */
+
+			New_DXF_Arc.QET_x=Record2.value("dxf_10").toDouble()-Record2.value("dxf_40").toDouble();
+			New_DXF_Arc.QET_y=Record2.value("dxf_20").toDouble()+Record2.value("dxf_40").toDouble();
+			New_DXF_Arc.QET_width=Record2.value("dxf_40").toDouble()*2;
+			New_DXF_Arc.QET_height=Record2.value("dxf_40").toDouble()*2;
+			New_DXF_Arc.QET_start=Record2.value("dxf_50").toDouble();
+			New_DXF_Arc.QET_end=Record2.value("dxf_51").toDouble();
+
+			New_DXF_Arc.QET_layer=Record2.value("dxf_8").toString();
+			New_DXF_Arc.QET_ltype=Record2.value("dxf_6").toString();
+			New_DXF_Arc.QET_handle=Record2.value("dxf_5").toString();
+			New_DXF_Arc.QET_softID=Record2.value("dxf_330").toString();
+
+
+			New_DXF_Arc.QET_antialias="false";
+			New_DXF_Arc.QET_line_style="normal";
+			New_DXF_Arc.QET_line_weight="thin";
+			New_DXF_Arc.QET_filling="none";
+			New_DXF_Arc.QET_color=DXF_main_base[0].QDXF_entitie_circle_color;
+
+			DXF_Entities_List.DXF_Result.append(New_DXF_Arc.Create_arc());
+		}
+
+		if (Record2.value("Command").toString()=="TEXT" and Record2.value("Command_count").toInt()==0)
+		{
+			/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+				<text x="-7" y="-8" size="3" text="HC-SR04"/>
+				<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+			New_DXF_Text.QET_x=Record2.value("dxf_10").toDouble();
+			New_DXF_Text.QET_y=Record2.value("dxf_20").toDouble();
+
+			New_DXF_Text.QET_rotation=Record2.value("dxf_50").toDouble();
+			New_DXF_Text.QET_text=Record2.value("dxf_1").toString();
+			New_DXF_Text.QET_size=Record2.value("dxf_40").toDouble();
+			New_DXF_Text.QET_text_style=Record2.value("dxf_7").toString();
+
+
+			//New_DXF_Text.QET_antialias="false";
+			//New_DXF_Text.QET_line_style="normal";
+			//New_DXF_Text.QET_line_weight="thin";
+			//New_DXF_Text.QET_filling="none";
+			New_DXF_Text.QET_color=DXF_main_base[0].QDXF_entitie_circle_color;
+
+
+			DXF_Entities_List.DXF_Result.append(New_DXF_Text.Create_text());
+		}
+
+		if (Record2.value("Command").toString()=="INPUT" and Record2.value("Command_count").toInt()==0)
+		{
+			/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+				<text x="-7" y="-8" size="3" text="HC-SR04"/>
+				<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+			New_DXF_Input.QET_x=Record2.value("dxf_10").toDouble();
+			New_DXF_Input.QET_y=Record2.value("dxf_20").toDouble();
+
+			New_DXF_Input.QET_rotation=Record2.value("dxf_50").toDouble();
+			New_DXF_Input.QET_text=Record2.value("dxf_1").toString();
+			New_DXF_Input.QET_size=Record2.value("dxf_40").toDouble();
+			New_DXF_Input.QET_text_style=Record2.value("dxf_7").toString();
+
+
+			//New_DXF_Text.QET_antialias="false";
+			//New_DXF_Text.QET_line_style="normal";
+			//New_DXF_Text.QET_line_weight="thin";
+			//New_DXF_Text.QET_filling="none";
+			New_DXF_Input.QET_rotate="true";
+			New_DXF_Input.QET_tag="none";
+
+			New_DXF_Input.QET_color=DXF_main_base[0].QDXF_entitie_input_color;
+
+
+			DXF_Entities_List.DXF_Result.append(New_DXF_Input.Create_input());
+		}
+
+		if (Record2.value("Command").toString()=="ATTRIB" and Record2.value("Command_count").toInt()==0)
+		{			/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+				<text x="-7" y="-8" size="3" text="HC-SR04"/>
+				<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+			New_DXF_Input.QET_x=Record2.value("dxf_10").toDouble();
+			New_DXF_Input.QET_y=Record2.value("dxf_20").toDouble();
+
+			New_DXF_Input.QET_rotation=Record2.value("dxf_50").toDouble();
+			New_DXF_Input.QET_text=Record2.value("dxf_1").toString();
+			New_DXF_Input.QET_size=Record2.value("dxf_40").toDouble();
+			New_DXF_Input.QET_text_style=Record2.value("dxf_7").toString();
+
+
+			//New_DXF_Text.QET_antialias="false";
+			//New_DXF_Text.QET_line_style="normal";
+			//New_DXF_Text.QET_line_weight="thin";
+			//New_DXF_Text.QET_filling="none";
+			New_DXF_Input.QET_rotate="true";
+			New_DXF_Input.QET_tag="none";
+
+			New_DXF_Input.QET_color=DXF_main_base[0].QDXF_entitie_input_color;
+
+
+			DXF_Entities_List.DXF_Result.append(New_DXF_Input.Create_input());
+		}
+
+		if (Record2.value("Command").toString()=="POINT" and Record2.value("Command_count").toInt()==0)
+		{
+			/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+				<text x="-7" y="-8" size="3" text="HC-SR04"/>
+				<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+			New_DXF_Terminal.QET_x=Record2.value("dxf_10").toDouble();
+			New_DXF_Terminal.QET_y=Record2.value("dxf_20").toDouble();
+
+			New_DXF_Terminal.QET_orientation="sud";//Record2.value("dxf_50").toDouble();
+			//New_DXF_Input.QET_text=Record2.value("dxf_1").toString();
+			//New_DXF_Input.QET_size=Record2.value("dxf_40").toDouble();
+			//New_DXF_Input.QET_text_style=Record2.value("dxf_7").toString();
+
+
+			//New_DXF_Text.QET_antialias="false";
+			//New_DXF_Text.QET_line_style="normal";
+			//New_DXF_Text.QET_line_weight="thin";
+			//New_DXF_Text.QET_filling="none";
+			//New_DXF_Input.QET_rotate="true";
+			//New_DXF_Input.QET_tag="label";
+
+			//New_DXF_Input.QET_color=DXF_main_base[0].QDXF_circle_color;
+
+
+			DXF_Entities_List.DXF_Result.append(New_DXF_Terminal.Create_terminal());
+		}
+
+		if (Record2.value("Command").toString()=="ELLIPSE" and Record2.value("Command_count").toInt()==0)
+		{
+			/*  <text x="-11" y="3" size="6" rotation="90" text="Vcc"/>
+				<text x="-7" y="-8" size="3" text="HC-SR04"/>
+				<text x="-50" y="-45" text="Test" color="white" size="9"/>*/
+
+			New_DXF_Ellipse.QET_center_x=Record2.value("dxf_10").toDouble();
+			New_DXF_Ellipse.QET_center_y=Record2.value("dxf_20").toDouble();
+			New_DXF_Ellipse.QET_major_radius_x=Record2.value("dxf_11").toDouble();
+			New_DXF_Ellipse.QET_major_radius_y==Record2.value("dxf_21").toDouble();
+
+			New_DXF_Ellipse.QET_end_parameter=Record2.value("dxf_42").toDouble();
+			New_DXF_Ellipse.QET_Start_parameter=Record2.value("dxf_41").toDouble();
+			New_DXF_Ellipse.QET_ratio_minor_axis=Record2.value("dxf_40").toDouble();
+
+			New_DXF_Ellipse.QET_layer=Record2.value("dxf_8").toString();
+			New_DXF_Ellipse.QET_ltype=Record2.value("dxf_6").toString();
+			New_DXF_Ellipse.QET_handle=Record2.value("dxf_5").toString();
+			New_DXF_Ellipse.QET_softID=Record2.value("dxf_330").toString();
+
+			//New_DXF_Terminal.QET_orientation="sud";//Record2.value("dxf_50").toDouble();
+			//New_DXF_Input.QET_text=Record2.value("dxf_1").toString();
+			//New_DXF_Input.QET_size=Record2.value("dxf_40").toDouble();
+			//New_DXF_Input.QET_text_style=Record2.value("dxf_7").toString();
+
+
+			New_DXF_Ellipse.QET_antialias="false";
+			New_DXF_Ellipse.QET_line_style="normal";
+			New_DXF_Ellipse.QET_line_weight="thin";
+			New_DXF_Ellipse.QET_filling="none";
+			//New_DXF_Ellipse.QET_rotate="true";
+			//New_DXF_Input.QET_tag="label";
+
+			New_DXF_Ellipse.QET_color=DXF_main_base[0].QDXF_entitie_ellipse_color;
+
+
+			DXF_Entities_List.DXF_Result.append(New_DXF_Ellipse.Create_ellipse());
+		}
+
+		if (Record2.value("Command").toString()=="POLYLINE" and Record2.value("Command_count").toInt()==0)
+		{
+			New_DXF_Polyline.QET_layer=Record2.value("dxf_8").toString();
+			New_DXF_Polyline.QET_ltype=Record2.value("dxf_6").toString();
+			New_DXF_Polyline.QET_handle=Record2.value("dxf_5").toString();
+			New_DXF_Polyline.QET_softID=Record2.value("dxf_330").toString();
+
+			New_DXF_Polyline.QET_antialias="false";
+			New_DXF_Polyline.QET_line_style="normal";
+			New_DXF_Polyline.QET_line_weight="thin";
+			New_DXF_Polyline.QET_filling="none";
+
+			New_DXF_Polyline.QET_color=DXF_main_base[0].QDXF_entitie_polyline_color;
+
+			if (Record2.value("dxf_70").toInt()==1)
+			{
+				New_DXF_Polyline.QET_closed="true";
+			}
+			else
+			{
+				New_DXF_Polyline.QET_closed="false";
+			}
+
+			end_seqend=0;
+			count_vertex=0;
+
+			while (end_seqend==0 and count_vertex<QET_L_POLYLINE)
+			{
+				NewQuery.next();
+				QSqlRecord Record3=NewQuery.record();
+				Recordvalue2=Record3.value("Command").toString();
+
+				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++;
+
+				}
+				if (Record3.value("Command").toString()=="SEQEND" and Record3.value("Command_count").toInt()==0)
+				{
+					end_seqend=1;
+				}
+
+			}
+
+			New_DXF_Polyline.segments=count_vertex;
+
+			DXF_Entities_List.DXF_Result.append(New_DXF_Polyline.Create_polyline());
+
+
+		}
+
+
+		if (Record2.value("Command").toString()=="INSERT" and Record2.value("Command_count").toInt()==0)
+		{
+
+			New_DXF_blocks.Block_name=Record2.value("dxf_2").toString();
+			New_DXF_blocks.Block_X=Record2.value("dxf_10").toDouble();
+			New_DXF_blocks.Block_Y=Record2.value("dxf_20").toDouble();
+
+
+			New_DXF_blocks.Block_scale_x=Record2.value("dxf_41").toDouble();
+			if (New_DXF_blocks.Block_scale_x==0)
+			{
+				New_DXF_blocks.Block_scale_x=1;
+			}
+			New_DXF_blocks.Block_scale_y=Record2.value("dxf_42").toDouble();
+			if (New_DXF_blocks.Block_scale_y==0)
+			{
+				New_DXF_blocks.Block_scale_y=1;
+			}
+			New_DXF_blocks.Block_rotation=Record2.value("dxf_43").toDouble();
+
+			New_DXF_blocks.FromBlock="Inserted from entitie ";
+
+			Logtext.append("block : ");
+			Logtext.append(Record2.value("dxf_2").toString());
+			Logtext.append(" will be converted as a drawing part");
+			Logtext.append(" \n");
+
+			Logtext.append(New_DXF_blocks.Insert_Block());
+		}
+
+		if (Record2.value("Command").toString()=="LWPOLYLINE" and Record2.value("Command_count").toInt()==0)
+		{
+
+			New_DXF_LWPolyline.QET_layer=Record2.value("dxf_8").toString();
+			New_DXF_LWPolyline.QET_ltype=Record2.value("dxf_6").toString();
+			New_DXF_LWPolyline.QET_handle=Record2.value("dxf_5").toString();
+			New_DXF_LWPolyline.QET_softID=Record2.value("dxf_330").toString();
+
+			New_DXF_LWPolyline.QET_antialias="false";
+			New_DXF_LWPolyline.QET_line_style="normal";
+			New_DXF_LWPolyline.QET_line_weight="thin";
+			New_DXF_LWPolyline.QET_filling="none";
+
+			New_DXF_LWPolyline.QET_color=DXF_main_base[0].QDXF_entitie_polyline_color;
+
+			if (Record2.value("dxf_70").toInt()==1)
+			{
+				New_DXF_LWPolyline.QET_closed="true";
+			}
+			else
+			{
+				New_DXF_LWPolyline.QET_closed="false";
+			}
+
+			end_lwpoly=0;
+			max_vertex=0;
+			count_vertex=0;
+
+			max_vertex=Record2.value("dxf_90").toInt();
+
+			if (max_vertex >=QET_L_POLYLINE)
+			{
+				Logtext.append("max_vertex :  ");
+				Logtext.append(QString::number(max_vertex));
+				Logtext.append(" > ");
+				Logtext.append(QString::number(QET_L_POLYLINE));
+				Logtext.append(" \n");
+			}
+
+			while (end_lwpoly==0 and count_vertex<max_vertex+1)
+			{
+				NewQuery.next();
+				QSqlRecord Record3=NewQuery.record();
+				Recordvalue2=Record3.value("Command").toString();
+
+				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++;
+
+				}
+				if (count_vertex>max_vertex)
+				{
+					end_lwpoly=1;
+				}
+
+			}
+
+			New_DXF_LWPolyline.segments=count_vertex;
+
+			DXF_Entities_List.DXF_Result.append(New_DXF_LWPolyline.Create_polyline());
+
+
+		}
+
+		if (Record2.value("Command").toString()=="SOLID" and Record2.value("Command_count").toInt()==0)
+		{
+
+			New_DXF_SOLID.QET_layer=Record2.value("dxf_8").toString();
+			New_DXF_SOLID.QET_ltype=Record2.value("dxf_6").toString();
+			New_DXF_SOLID.QET_handle=Record2.value("dxf_5").toString();
+			New_DXF_SOLID.QET_softID=Record2.value("dxf_330").toString();
+
+			New_DXF_SOLID.QET_antialias="false";
+			New_DXF_SOLID.QET_line_style="normal";
+			New_DXF_SOLID.QET_line_weight="thin";
+			New_DXF_SOLID.QET_filling="none";
+
+			New_DXF_SOLID.QET_color=DXF_main_base[0].QDXF_entitie_solid_color;
+
+			if (Record2.value("dxf_70").toInt()==1)
+			{
+				New_DXF_SOLID.QET_closed="true";
+			}
+			else
+			{
+				New_DXF_SOLID.QET_closed="false";
+			}
+
+			end_lwpoly=0;
+			max_vertex=0;
+			count_vertex=0;
+
+			//max_vertex=Record2.value("dxf_90").toInt();
+			max_vertex=4;
+
+			if (max_vertex >=QET_L_POLYLINE)
+			{
+				Logtext.append("max_vertex :  ");
+				Logtext.append(QString::number(max_vertex));
+				Logtext.append(" > ");
+				Logtext.append(QString::number(QET_L_POLYLINE));
+				Logtext.append(" \n");
+			}
+
+			/*while (end_lwpoly==0 and count_vertex<max_vertex+1)
+			{
+				NewQuery.next();
+				QSqlRecord Record3=NewQuery.record();
+				Recordvalue2=Record3.value("Command").toString();
+
+				if (Record3.value("Command").toString()=="SOLID" and max_vertex<QET_L_POLYLINE)*/
+				//{
+					New_DXF_SOLID.QET_x[0]=Record2.value("dxf_10").toDouble();
+					New_DXF_SOLID.QET_y[0]=Record2.value("dxf_20").toDouble();
+
+					New_DXF_SOLID.QET_x[1]=Record2.value("dxf_11").toDouble();
+					New_DXF_SOLID.QET_y[1]=Record2.value("dxf_21").toDouble();
+
+					New_DXF_SOLID.QET_x[3]=Record2.value("dxf_12").toDouble();
+					New_DXF_SOLID.QET_y[3]=Record2.value("dxf_22").toDouble();
+
+					New_DXF_SOLID.QET_x[2]=Record2.value("dxf_13").toDouble();
+					New_DXF_SOLID.QET_y[2]=Record2.value("dxf_23").toDouble();
+					count_vertex=3;
+
+				/*}
+				if (count_vertex>max_vertex)
+				{
+					end_lwpoly=1;
+				}
+
+			}*/
+
+			New_DXF_SOLID.segments=count_vertex;
+
+			DXF_Entities_List.DXF_Result.append(New_DXF_SOLID.Create_polyline());
+
+
+		}
+
+	}
+
+	Logtext.append("Records ENTITIE passed : ");
+	Logtext.append(QString::number(rowcount));
+	Logtext.append(" \n");
+	return Logtext;
+}

Added: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_entities.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,58 @@
+#ifndef ELMT_ENTITIES_H
+#define ELMT_ENTITIES_H
+
+#include <QWidget>
+#include <QObject>
+
+#include "data.h"
+#include "src/dxf_load.h"
+#include "db/dbmanager.h"
+
+#include "src/DXF_control/dxf_layer_control.h"
+#include "src/DXF_control/dxf_ltype_control.h"
+#include "src/DXF_control/dxf_text_control.h"
+#include "src/ELMT_base_types/dxf_base_line.h"
+#include "src/ELMT_base_types/dxf_base_circle.h"
+#include "src/ELMT_base_types/dxf_base_arc.h"
+#include "src/ELMT_base_types/dxf_base_text.h"
+#include "src/ELMT_base_types/dxf_base_input.h"
+#include "src/ELMT_base_types/dxf_base_terminal.h"
+#include "src/ELMT_base_types/dxf_base_ellipse.h"
+#include "src/ELMT_base_types/dxf_base_rectangel.h"
+#include "src/ELMT_base_types/dxf_base_polyline.h"
+#include "src/ELMT_steps/elmt_blocks.h"
+
+class elmt_entities : public QWidget
+{
+	Q_OBJECT
+	public:
+	explicit elmt_entities(QWidget *parent = 0);
+
+	int32_t xcount;
+	int32_t rowcount;
+
+	int end_seqend;
+	int end_lwpoly;
+
+
+	int32_t count_vertex;
+	int32_t max_vertex;
+
+	QString Logtext;
+	QString Recordvalue;
+	QString Recordvalue2;
+
+	QString ELMT_ID_instruction;
+
+
+	void Open_SQL_DB (QString ELMT_filename);
+	void Close_SQL_DB (QString ELMT_filename);
+
+	QString Get_Entities (QString ELMT_filename);
+
+	signals:
+
+	public slots:
+};
+
+#endif // ELMT_ENTITIES_H

Added: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_header_steps.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_header_steps.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_header_steps.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,134 @@
+#include "elmt_header_steps.h"
+#include <qsql.h>
+#include <QSqlDatabase>
+#include <QSqlQuery>
+#include <QSqlRecord>
+#include <QtSql>
+
+extern struct DXF_var DXF_variable;
+
+ELMT_header_steps::ELMT_header_steps(QWidget *parent) : QWidget(parent)
+{
+
+}
+
+void ELMT_header_steps::Open_SQL_DB (QString ELMT_filename)
+{
+
+	dbManager mydb2;
+	mydb2.dbManager1(ELMT_filename);
+
+
+}
+
+void ELMT_header_steps::Close_SQL_DB (QString ELMT_filename)
+{
+
+	dbManager mydb2;
+	mydb2.dbManager1(ELMT_filename);
+
+
+}
+
+QString ELMT_header_steps::GetHeader_info (QString ELMT_filename)
+{
+
+	QSqlQueryModel model;
+	model.setQuery("SELECT * FROM dxf_header");
+
+	rowcount=model.rowCount();
+
+	for (int xx=0;xx<rowcount;xx++)
+	{
+		QSqlRecord record=model.record(xx);
+
+		if(record.value("Command").toString()=="$ACADVER")
+		{
+			DXF_variable.DXF_ACADVER=record.value("dxf_1").toString();
+		}
+
+		if(record.value("Command").toString()=="$ACADMAINTVER")
+		{
+			DXF_variable.DXF_ACADMAINTVER=record.value("dxf_70").toString();
+		}
+
+		if(record.value("Command").toString()=="$INSBASE")
+		{
+			DXF_variable.DXF_INSBASE_X=record.value("dxf_10").toString();
+			DXF_variable.DXF_INSBASE_Y=record.value("dxf_20").toString();
+		}
+
+		if(record.value("Command").toString()=="$EXTMIN")
+		{
+			DXF_variable.DXF_EXTMIN_X=record.value("dxf_10").toString();
+			DXF_variable.DXF_EXTMIN_Y=record.value("dxf_20").toString();
+		}
+
+		if(record.value("Command").toString()=="$EXTMAX")
+		{
+			DXF_variable.DXF_EXTMAX_X=record.value("dxf_10").toString();
+			DXF_variable.DXF_EXTMAX_Y=record.value("dxf_20").toString();
+		}
+
+		if(record.value("Command").toString()=="$TEXTSIZE")
+		{
+			DXF_variable.DXF_TEXTSIZE=record.value("dxf_40").toString();
+		}
+
+		if(record.value("Command").toString()=="$TEXTSTYLE")
+		{
+			DXF_variable.DXF_TEXTSTYLE=record.value("dxf_7").toString();
+		}
+
+		if(record.value("Command").toString()=="$LIMMIN")
+		{
+			DXF_variable.DXF_LIMMIN_X=record.value("dxf_10").toString();
+			DXF_variable.DXF_LIMMIN_Y=record.value("dxf_20").toString();
+		}
+
+		if(record.value("Command").toString()=="$LIMMAX")
+		{
+			DXF_variable.DXF_LIMMAX_X=record.value("dxf_10").toString();
+			DXF_variable.DXF_LIMMAX_Y=record.value("dxf_20").toString();
+		}
+
+	}
+
+	return Logtext;
+
+}
+
+QString ELMT_header_steps::Calc_Width()
+{
+	DXF_LIMMAX_X=DXF_variable.DXF_LIMMAX_X.toDouble();
+	DXF_LIMMIN_X=DXF_variable.DXF_LIMMIN_X.toDouble();
+
+	if (DXF_LIMMIN_X <0)
+	{
+		DXF_LIMMIN_X=-DXF_LIMMIN_X;
+	}
+	if (DXF_LIMMAX_X <0)
+	{
+		DXF_LIMMAX_X=-DXF_LIMMAX_X;
+	}
+
+	return (QString::number(DXF_LIMMIN_X+DXF_LIMMAX_X));
+}
+
+QString ELMT_header_steps::Calc_Height()
+{
+	DXF_LIMMAX_Y=DXF_variable.DXF_LIMMAX_Y.toDouble();
+	DXF_LIMMIN_Y=DXF_variable.DXF_LIMMIN_Y.toDouble();
+
+	if (DXF_LIMMIN_Y <0)
+	{
+		DXF_LIMMIN_Y=-DXF_LIMMIN_Y;
+	}
+	if (DXF_LIMMAX_Y <0)
+	{
+		DXF_LIMMAX_Y=-DXF_LIMMAX_Y;
+	}
+
+	return (QString::number(DXF_LIMMIN_Y+DXF_LIMMAX_Y));
+}
+

Added: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_header_steps.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_header_steps.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_header_steps.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,48 @@
+#ifndef ELMT_HEADER_STEPS_H
+#define ELMT_HEADER_STEPS_H
+
+#include <QWidget>
+#include <QObject>
+
+#include "data.h"
+#include "src/dxf_load.h"
+#include "db/dbmanager.h"
+
+class ELMT_header_steps : public QWidget
+{
+	Q_OBJECT
+	public:
+	explicit ELMT_header_steps(QWidget *parent = 0);
+
+	QString QsqlString;
+	QString ResultCommand;
+	QString Logtext;
+
+	double DXF_LIMMIN_X;
+	double DXF_LIMMAX_X;
+
+	double DXF_LIMMIN_Y;
+	double DXF_LIMMAX_Y;
+
+	double DXF_width;
+	double DXF_height;
+
+
+	int rowcount;
+
+	void Open_SQL_DB (QString ELMT_filename);
+	void Close_SQL_DB (QString ELMT_filename);
+
+	QString GetHeader_info(QString ELMT_filename);
+
+	QString Calc_Width();
+	QString Calc_Height();
+
+
+
+	signals:
+
+	public slots:
+};
+
+#endif // ELMT_HEADER_STEPS_H

Added: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_tables.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_tables.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_tables.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,98 @@
+#include "elmt_tables.h"
+//#include "dxftoqet3db.h"
+#include "ui_dxftoqet3db.h"
+#include <qsql.h>
+#include <QSqlDatabase>
+#include <QSqlQuery>
+#include <QSqlRecord>
+#include <QtSql>
+
+extern struct DXF_Layers DXF_Layer_list[DXF_layers_set];
+
+elmt_tables::elmt_tables(QWidget *parent) : QWidget(parent)
+{
+
+}
+
+QString elmt_tables::Get_Tables_Layers(QString ELMT_filename)
+{
+
+	QSqlQuery NewQuery("SELECT * FROM dxf_tables");
+
+
+	xcount=0;
+	Logtext="";
+	rowcount=0;
+
+
+
+	while (NewQuery.next())
+	//for (int xx=0;xx<rowcount;xx++)
+	{
+		QSqlRecord record=NewQuery.record();
+
+		rowcount++;
+
+		if(record.value("Command").toString()=="LAYER" and xcount < DXF_layers_set)
+		{
+			DXF_Layer_list[xcount].DXF_Layer_naam=record.value("dxf_2").toString();
+			DXF_Layer_list[xcount].DXF_Layer_linetype=record.value("dxf_6").toString();
+			DXF_Layer_list[xcount].DXF_Layer_color=record.value("dxf_62").toString();
+			//xx=rowcount+1;
+			xcount++;
+		}
+		else
+		{
+
+
+			if (xcount > DXF_layers_set)
+			{
+
+				Logtext.append("============================================================================\n");
+				Logtext.append("layer table to small \n");
+				Logtext.append(QString::number(rowcount));
+				Logtext.append(" > ");
+				Logtext.append(QString::number(DXF_layers_set));
+				Logtext.append(" \n");
+				Logtext.append("send email to programmer with copie of this log       \n");
+				Logtext.append("============================================================================\n");
+				//xcount--;
+				//xx=rowcount+1;
+			}
+
+		}
+
+
+
+	}
+
+	if (xcount <DXF_layers_set)
+	{
+		Logtext.append(QString::number(rowcount));
+		Logtext.append(" Tables records processed\n");
+		Logtext.append("============================================================================\n");
+		Logtext.append("Layers info loaded\n");
+		//Logtext.append("send email to programmer with copie of this log       \n");
+		Logtext.append("============================================================================\n");
+
+		//QObject::connect(Logtext,SIGNAL(QString),,SLOT(insertPlainText()))
+	}
+	return Logtext;
+}
+
+void elmt_tables::Open_SQL_DB (QString ELMT_filename)
+{
+	dbManager mydb2;
+	mydb2.dbManager1(ELMT_filename);
+}
+
+void elmt_tables::Close_SQL_DB (QString ELMT_filename)
+{
+	dbManager mydb2;
+	mydb2.dbManager1(ELMT_filename);
+}
+
+void elmt_tables::GetTable_info (QString ELMT_filename)
+{
+
+}

Added: branches/DXFtoQET3_DB/src/ELMT_steps/elmt_tables.h
===================================================================
--- branches/DXFtoQET3_DB/src/ELMT_steps/elmt_tables.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/ELMT_steps/elmt_tables.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,36 @@
+#ifndef ELMT_TABLES_H
+#define ELMT_TABLES_H
+
+#include <QWidget>
+#include <QObject>
+
+#include "data.h"
+#include "src/dxf_load.h"
+#include "db/dbmanager.h"
+
+class elmt_tables : public QWidget
+{
+	Q_OBJECT
+	public:
+	explicit elmt_tables(QWidget *parent = 0);
+
+	int xcount;
+	int rowcount;
+
+	QString Logtext;
+
+	void Open_SQL_DB (QString ELMT_filename);
+	void Close_SQL_DB (QString ELMT_filename);
+
+	void GetTable_info (QString ELMT_filename);
+
+	QString Get_Tables_Layers(QString ELMT_filename);
+
+	signals:
+
+	void Log();
+
+	public slots:
+};
+
+#endif // ELMT_TABLES_H

Added: branches/DXFtoQET3_DB/src/dxf_load.cpp
===================================================================
--- branches/DXFtoQET3_DB/src/dxf_load.cpp	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/dxf_load.cpp	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,50 @@
+#include "dxf_load.h"
+
+extern struct DXF_base DXF_main_base[DXF_base_set];
+
+dxf_load::dxf_load(QWidget *parent) : QWidget(parent)
+{
+
+}
+
+void dxf_load::dxf_header_split()
+{
+
+	// init extern variable
+	//extern DXF_base DXF_main_base[1];
+
+	// dxf split
+
+	DXF_main_base[0].dxf_input = DXF_main_base[0].dxf_text_all.split("\n");
+	DXF_main_base[0].dxf_line_count=DXF_main_base[0].dxf_input.count();
+
+
+	return;
+
+}
+
+void dxf_load::dxf_csv_split()
+{
+
+	DXF_main_base[0].dxf_input = DXF_main_base[0].dxf_text_all.split("\n");
+	DXF_main_base[0].dxf_csv_line_count=DXF_main_base[0].dxf_input.count();
+
+
+	return;
+}
+
+int dxf_load::dxf_check_file()
+{
+
+	dxf_check=DXF_main_base[0].dxf_input[0];
+
+	if (dxf_check.contains("AC"))
+	{
+		return 0; // BINAIRI
+	}
+	else
+	{
+		return 1; // ASCII
+	}
+
+}

Added: branches/DXFtoQET3_DB/src/dxf_load.h
===================================================================
--- branches/DXFtoQET3_DB/src/dxf_load.h	                        (rev 0)
+++ branches/DXFtoQET3_DB/src/dxf_load.h	2016-12-20 17:55:57 UTC (rev 4816)
@@ -0,0 +1,27 @@
+#ifndef DXF_LOAD_H
+#define DXF_LOAD_H
+
+#include "data.h"
+#include <QObject>
+
+class dxf_load : public QWidget
+{
+	Q_OBJECT
+	public:
+	explicit dxf_load(QWidget *parent = 0);
+
+
+	QString dxf_check;
+
+
+
+	void dxf_header_split();
+	void dxf_csv_split();
+	int dxf_check_file();
+
+	signals:
+
+	public slots:
+};
+
+#endif // DXF_LOAD_H

Added: branches/DXFtoQET3_DB/src/icon/document-open dxf-csv.png
===================================================================
(Binary files differ)

Index: branches/DXFtoQET3_DB/src/icon/document-open dxf-csv.png
===================================================================
--- branches/DXFtoQET3_DB/src/icon/document-open dxf-csv.png	2016-12-20 17:51:38 UTC (rev 4815)
+++ branches/DXFtoQET3_DB/src/icon/document-open dxf-csv.png	2016-12-20 17:55:57 UTC (rev 4816)

Property changes on: branches/DXFtoQET3_DB/src/icon/document-open dxf-csv.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: branches/DXFtoQET3_DB/src/icon/document-save-as elmt.png
===================================================================
(Binary files differ)

Index: branches/DXFtoQET3_DB/src/icon/document-save-as elmt.png
===================================================================
--- branches/DXFtoQET3_DB/src/icon/document-save-as elmt.png	2016-12-20 17:51:38 UTC (rev 4815)
+++ branches/DXFtoQET3_DB/src/icon/document-save-as elmt.png	2016-12-20 17:55:57 UTC (rev 4816)

Property changes on: branches/DXFtoQET3_DB/src/icon/document-save-as elmt.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: branches/DXFtoQET3_DB/src/icon/document-save-as qet.png
===================================================================
(Binary files differ)

Index: branches/DXFtoQET3_DB/src/icon/document-save-as qet.png
===================================================================
--- branches/DXFtoQET3_DB/src/icon/document-save-as qet.png	2016-12-20 17:51:38 UTC (rev 4815)
+++ branches/DXFtoQET3_DB/src/icon/document-save-as qet.png	2016-12-20 17:55:57 UTC (rev 4816)

Property changes on: branches/DXFtoQET3_DB/src/icon/document-save-as qet.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property


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