[qet] [4368] update dxftoqet : still working on nested symbols (acad blocks)

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


Revision: 4368
Author:   rdsivd
Date:     2016-03-02 23:40:35 +0100 (Wed, 02 Mar 2016)
Log Message:
-----------
update dxftoqet : still working on nested symbols (acad blocks)

Modified Paths:
--------------
    branches/dxftoqet2/DXFtoQET.pro
    branches/dxftoqet2/csv_create_elmt.cpp
    branches/dxftoqet2/csv_create_elmt.h
    branches/dxftoqet2/dxf_create_elmt.cpp
    branches/dxftoqet2/dxf_create_elmt.h
    branches/dxftoqet2/dxftoqet_mainwindow.cpp
    branches/dxftoqet2/dxftoqet_mainwindow.h
    branches/dxftoqet2/dxftoqet_mainwindow.ui
    branches/dxftoqet2/main.cpp
    branches/dxftoqet2/src/csv_build_table.cpp
    branches/dxftoqet2/src/csv_build_table.h
    branches/dxftoqet2/src/dxf/dxf_polyline.h
    branches/dxftoqet2/src/dxf_block/dxf_block_arc.cpp
    branches/dxftoqet2/src/dxf_block/dxf_block_arc.h
    branches/dxftoqet2/src/dxf_block/dxf_block_attdef.cpp
    branches/dxftoqet2/src/dxf_block/dxf_block_attdef.h
    branches/dxftoqet2/src/dxf_block/dxf_block_attribute.cpp
    branches/dxftoqet2/src/dxf_block/dxf_block_attribute.h
    branches/dxftoqet2/src/dxf_block/dxf_block_circle.cpp
    branches/dxftoqet2/src/dxf_block/dxf_block_circle.h
    branches/dxftoqet2/src/dxf_block/dxf_block_ellipse.cpp
    branches/dxftoqet2/src/dxf_block/dxf_block_ellipse.h
    branches/dxftoqet2/src/dxf_block/dxf_block_entitie_insert.cpp
    branches/dxftoqet2/src/dxf_block/dxf_block_entitie_insert.h
    branches/dxftoqet2/src/dxf_block/dxf_block_insert.cpp
    branches/dxftoqet2/src/dxf_block/dxf_block_insert.h
    branches/dxftoqet2/src/dxf_block/dxf_block_lines.cpp
    branches/dxftoqet2/src/dxf_block/dxf_block_lines.h
    branches/dxftoqet2/src/dxf_block/dxf_block_lwpolyline.cpp
    branches/dxftoqet2/src/dxf_block/dxf_block_lwpolyline.h
    branches/dxftoqet2/src/dxf_block/dxf_block_polyline.cpp
    branches/dxftoqet2/src/dxf_block/dxf_block_polyline.h
    branches/dxftoqet2/src/dxf_block/dxf_block_text.cpp
    branches/dxftoqet2/src/dxf_block/dxf_block_text.h
    branches/dxftoqet2/src/dxf_control/dxf_layer_control.cpp
    branches/dxftoqet2/src/dxf_control/dxf_layer_control.h
    branches/dxftoqet2/src/dxf_data.h
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_arc.cpp
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_arc.h
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_attdef.cpp
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_attdef.h
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_attrinute.cpp
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_attrinute.h
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_circle.cpp
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_circle.h
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_ellipse.cpp
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_ellipse.h
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_input.h
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_insert.cpp
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_insert.h
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_line.cpp
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_line.h
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_lwpolyline.cpp
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_lwpolyline.h
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_point.cpp
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_point.h
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_polyline.cpp
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_polyline.h
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_terminal.h
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_text.cpp
    branches/dxftoqet2/src/dxf_entitie/dxf_entitie_text.h
    branches/dxftoqet2/src/dxf_load.cpp
    branches/dxftoqet2/src/dxf_load.h
    branches/dxftoqet2/src/dxf_split.cpp
    branches/dxftoqet2/src/dxf_split.h
    branches/dxftoqet2/src/qet_base_types/baseelmt.cpp
    branches/dxftoqet2/src/split_csv.cpp
    branches/dxftoqet2/src/split_csv.h

Added Paths:
-----------
    branches/dxftoqet2/src/dxf_table_size.cpp
    branches/dxftoqet2/src/dxf_table_size.h

Modified: branches/dxftoqet2/DXFtoQET.pro
===================================================================
--- branches/dxftoqet2/DXFtoQET.pro	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/DXFtoQET.pro	2016-03-02 22:40:35 UTC (rev 4368)
@@ -70,7 +70,8 @@
     src/dxf_entitie/dxf_entitie_point.cpp \
     src/dxf_entitie/dxf_entitie_input.cpp \
     src/dxf_entitie/dxf_entitie_terminal.cpp \
-    src/dxf_block/dxf_block_entitie_insert.cpp
+    src/dxf_block/dxf_block_entitie_insert.cpp \
+    src/dxf_table_size.cpp
 
 HEADERS  += dxftoqet_mainwindow.h \
     src/dxf_data.h \
@@ -128,7 +129,8 @@
     src/dxf_entitie/dxf_entitie_point.h \
     src/dxf_entitie/dxf_entitie_input.h \
     src/dxf_entitie/dxf_entitie_terminal.h \
-    src/dxf_block/dxf_block_entitie_insert.h
+    src/dxf_block/dxf_block_entitie_insert.h \
+    src/dxf_table_size.h
 
 FORMS    += dxftoqet_mainwindow.ui
 

Modified: branches/dxftoqet2/csv_create_elmt.cpp
===================================================================
--- branches/dxftoqet2/csv_create_elmt.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/csv_create_elmt.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,5 +1,8 @@
 #include "csv_create_elmt.h"
 
+extern struct ALG Max_alg;
+extern struct BLOCK Max_block;
+extern struct ENTITIE Max_entitie;
 extern struct DXF_base DXF_main_base[1];
 
 csv_create_elmt::csv_create_elmt(QWidget *parent): QWidget(parent)

Modified: branches/dxftoqet2/csv_create_elmt.h
===================================================================
--- branches/dxftoqet2/csv_create_elmt.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/csv_create_elmt.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -4,6 +4,7 @@
 //#include <QMainWindow>
 #include <QWidget>
 #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"
 

Modified: branches/dxftoqet2/dxf_create_elmt.cpp
===================================================================
--- branches/dxftoqet2/dxf_create_elmt.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/dxf_create_elmt.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,5 +1,9 @@
 #include "dxf_create_elmt.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_header DXF_input_header[500];
 extern struct DXF_table_block_record DXF_input_table_block_record[500];
@@ -15,23 +19,23 @@
 extern struct DXF_entities_insert DXF_input_entities_insert[1000];
 extern struct DXF_entities_polyline DXF_input_entities_polyline[1000];
 extern struct DXF_entities_seqend DXF_input_entities_seqend[1000];
-extern struct DXF_entities_vertex DXF_input_entities_vertex[5000];
+extern struct DXF_entities_vertex DXF_input_entities_vertex[50000];
 extern struct DXF_entities_lwpolyline DXF_input_entities_lwpolyline[1000];
 
-extern struct DXF_block_line DXF_input_block_line[100][50];
-extern struct DXF_block_arc DXF_input_block_arc[100][50];
-extern struct DXF_block_attdef DXF_input_block_attdef[100][50];
-extern struct DXF_block_attrib DXF_input_block_attrib[100][50];
-extern struct DXF_block_circle DXF_input_block_circle[100][50];
-extern struct DXF_block_ellipse DXF_input_block_ellipse[100][50];
-extern struct DXF_block_attdef DXF_input_block_attdef[100][50];
-extern struct DXF_block_attrib DXF_input_block_attrib[100][50];
-extern struct DXF_block_lwpolyline DXF_input_block_lwpolyline[100][50];
-extern struct DXF_block_point DXF_input_block_point[100][50];
-extern struct DXF_block_polyline DXF_input_block_polyline[100][50];
-extern struct DXF_block_seqend DXF_input_block_seqend[100][50];
-extern struct DXF_block_text DXF_input_block_text[100][50];
-extern struct DXF_block_vertex DXF_input_block_vertex[100][500];
+extern struct DXF_block_line DXF_input_block_line[200][5000];
+extern struct DXF_block_arc DXF_input_block_arc[200][100];
+extern struct DXF_block_attdef DXF_input_block_attdef[200][100];
+extern struct DXF_block_attrib DXF_input_block_attrib[200][100];
+extern struct DXF_block_circle DXF_input_block_circle[200][100];
+extern struct DXF_block_ellipse DXF_input_block_ellipse[200][100];
+extern struct DXF_block_attdef DXF_input_block_attdef[200][100];
+extern struct DXF_block_attrib DXF_input_block_attrib[200][100];
+extern struct DXF_block_lwpolyline DXF_input_block_lwpolyline[200][100];
+extern struct DXF_block_point DXF_input_block_point[200][100];
+extern struct DXF_block_polyline DXF_input_block_polyline[200][100];
+extern struct DXF_block_seqend DXF_input_block_seqend[200][100];
+extern struct DXF_block_text DXF_input_block_text[200][100];
+extern struct DXF_block_vertex DXF_input_block_vertex[200][500];
 
 DXF_create_elmt::DXF_create_elmt(QWidget *parent) : QWidget(parent)//:
 	//QMainWindow(parent)
@@ -350,7 +354,10 @@
 
 	/* INSERT */
 
-	Make_entitie_insert.Count_entitie_insert=DXF_main_base[0].DXF_entities_insert_count;
+	Make_entitie_insert.Count_entitie_insert=DXF_main_base[0].dxf_block_item_count;
+	Make_entitie_insert.Flag_Block_insert=0;
+	Make_entitie_insert.Flag_Entitie_block_insert=1;
+
 	//Make_entitie_insert.Insert_block_nr
 	Result.append(Make_entitie_insert.dxf_entitie_make_insert());
 

Modified: branches/dxftoqet2/dxf_create_elmt.h
===================================================================
--- branches/dxftoqet2/dxf_create_elmt.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/dxf_create_elmt.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #include <QWidget>
 
 #include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
 #include "src/qet_base_types/baseelmt.h"
 #include "dxftoqet_mainwindow.h"
 #include "ui_dxftoqet_mainwindow.h"
@@ -29,6 +30,7 @@
 #include "src/dxf_block/dxf_block_attdef.h"
 #include "src/dxf_block/dxf_block_attribute.h"
 #include "src/dxf_block/dxf_block_text.h"
+#include "src/dxf_block/dxf_block_insert.h"
 
 #include "src/dxf_entitie/dxf_entitie_line.h"
 #include "src/dxf_entitie/dxf_entitie_arc.h"
@@ -78,7 +80,7 @@
 	//QString Make_Block_POLYLINE();
 	//QString Make_Block_LWPOLYLINE();
 	//QString Make_Block_TEXT();
-	QString Make_Block_INSERT();
+	//QString Make_Block_INSERT();
 
 	QString Result;
 	QString Result_line;

Modified: branches/dxftoqet2/dxftoqet_mainwindow.cpp
===================================================================
--- branches/dxftoqet2/dxftoqet_mainwindow.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/dxftoqet_mainwindow.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -4,8 +4,10 @@
 
 /* init extern variable */
 
+struct ALG Max_alg;
+struct BLOCK Max_block;
+struct ENTITIE Max_entitie;
 
-
 struct DXF_header DXF_input_header[500];
 struct DXF_classes DXF_input_classes[1000];
 struct DXF_tables DXF_input_tables[20];
@@ -18,53 +20,54 @@
 struct DXF_table_ucs DXF_input_table_ucs[100];
 struct DXF_table_view DXF_input_table_view[100];
 struct DXF_table_vport DXF_input_table_vport[100];
-struct DXF_block DXF_input_block[100];
+struct DXF_block DXF_input_block[200];
+struct DXF_end_block DXF_input_end_block[200];
 
-struct DXF_block_3dface DXF_input_block_3dface[100][50];
-struct DXF_block_3dsolid DXF_input_block_3dsolid[100][50];
-struct DXF_block_acad_proxy_entity DXF_input_block_proxy_entity[100][50];
-struct DXF_block_arc DXF_input_block_arc[100][50];
-struct DXF_block_attdef DXF_input_block_attdef[100][50];
-struct DXF_block_attrib DXF_input_block_attrib[100][50];
-struct DXF_block_body DXF_input_block_body[100][50];
-struct DXF_block_circle DXF_input_block_circle[100][50];
-struct DXF_block_dimension DXF_input_block_dimension[100][50];
-struct DXF_block_ellipse DXF_input_block_ellipse[100][50];
-struct DXF_block_hatch DXF_input_block_hatch[100][50];
-struct DXF_block_helix DXF_input_block_helix[100][50];
-struct DXF_block_image DXF_input_block_image[100][50];
-struct DXF_block_insert DXF_input_block_insert[100][50];
-struct DXF_block_leader DXF_input_block_leader[100][50];
-struct DXF_block_light DXF_input_block_light[100][50];
-struct DXF_block_line DXF_input_block_line[100][50];
-struct DXF_block_lwpolyline DXF_input_block_lwpolyline[100][50];
-struct DXF_block_mesh DXF_input_block_mesh[100][50];
-struct DXF_block_mline DXF_input_block_mline[100][50];
-struct DXF_block_mleaderstyle DXF_input_block_mleaderstyle[100][50];
-struct DXF_block_mleader DXF_input_block_mleader[100][50];
-struct DXF_block_mtext DXF_input_block_mtext[100][50];
-struct DXF_block_oleframe DXF_input_DXF_block_oleframe[100][50];
-struct DXF_block_ole2frame DXF_input_block_ole2frame[100][50];
-struct DXF_block_point DXF_input_block_point[100][50];
-struct DXF_block_polyline DXF_input_block_polyline[100][50];
-struct DXF_block_ray DXF_input_block_ray[100][50];
-struct DXF_block_region DXF_input_block_region[100][50];
-struct DXF_block_section DXF_input_block_section[100][50];
-struct DXF_block_seqend DXF_input_block_seqend[100][50];
-struct DXF_block_shape DXF_input_block_shape[100][50];
-struct DXF_block_solid DXF_input_block_solid[100][50];
-struct DXF_block_spline DXF_input_block_spline[100][50];
-struct DXF_block_sun DXF_input_block_sun[100][50];
-struct DXF_block_surface DXF_input_block_surface[100][50];
-struct DXF_block_table DXF_input_block_table[100][50];
-struct DXF_block_text DXF_input_block_text[100][50];
-struct DXF_block_tolerance DXF_input_block_tolerance[100][50];
-struct DXF_block_trace DXF_input_block_trace[100][50];
-struct DXF_block_underlay DXF_input_block_underlay[100][50];
-struct DXF_block_vertex DXF_input_block_vertex[100][500];
-struct DXF_block_viewport DXF_input_block_viewport[100][50];
-struct DXF_block_wipeout DXF_input_block_wipeout[100][50];
-struct DXF_block_xline DXF_input_block_xline[100][50];
+struct DXF_block_3dface DXF_input_block_3dface[200][100];
+struct DXF_block_3dsolid DXF_input_block_3dsolid[200][100];
+struct DXF_block_acad_proxy_entity DXF_input_block_proxy_entity[200][100];
+struct DXF_block_arc DXF_input_block_arc[200][100];
+struct DXF_block_attdef DXF_input_block_attdef[200][100];
+struct DXF_block_attrib DXF_input_block_attrib[200][100];
+struct DXF_block_body DXF_input_block_body[200][100];
+struct DXF_block_circle DXF_input_block_circle[200][100];
+struct DXF_block_dimension DXF_input_block_dimension[200][100];
+struct DXF_block_ellipse DXF_input_block_ellipse[200][100];
+struct DXF_block_hatch DXF_input_block_hatch[200][100];
+struct DXF_block_helix DXF_input_block_helix[200][100];
+struct DXF_block_image DXF_input_block_image[200][100];
+struct DXF_block_insert DXF_input_block_insert[200][100];
+struct DXF_block_leader DXF_input_block_leader[200][100];
+struct DXF_block_light DXF_input_block_light[200][100];
+struct DXF_block_line DXF_input_block_line[200][5000];
+struct DXF_block_lwpolyline DXF_input_block_lwpolyline[200][100];
+struct DXF_block_mesh DXF_input_block_mesh[200][100];
+struct DXF_block_mline DXF_input_block_mline[200][100];
+struct DXF_block_mleaderstyle DXF_input_block_mleaderstyle[200][100];
+struct DXF_block_mleader DXF_input_block_mleader[200][100];
+struct DXF_block_mtext DXF_input_block_mtext[200][100];
+struct DXF_block_oleframe DXF_input_DXF_block_oleframe[200][100];
+struct DXF_block_ole2frame DXF_input_block_ole2frame[200][100];
+struct DXF_block_point DXF_input_block_point[200][100];
+struct DXF_block_polyline DXF_input_block_polyline[200][100];
+struct DXF_block_ray DXF_input_block_ray[200][100];
+struct DXF_block_region DXF_input_block_region[200][100];
+struct DXF_block_section DXF_input_block_section[200][100];
+struct DXF_block_seqend DXF_input_block_seqend[200][100];
+struct DXF_block_shape DXF_input_block_shape[200][100];
+struct DXF_block_solid DXF_input_block_solid[200][100];
+struct DXF_block_spline DXF_input_block_spline[200][100];
+struct DXF_block_sun DXF_input_block_sun[200][100];
+struct DXF_block_surface DXF_input_block_surface[200][100];
+struct DXF_block_table DXF_input_block_table[200][100];
+struct DXF_block_text DXF_input_block_text[200][100];
+struct DXF_block_tolerance DXF_input_block_tolerance[200][100];
+struct DXF_block_trace DXF_input_block_trace[200][100];
+struct DXF_block_underlay DXF_input_block_underlay[200][100];
+struct DXF_block_vertex DXF_input_block_vertex[200][500];
+struct DXF_block_viewport DXF_input_block_viewport[200][100];
+struct DXF_block_wipeout DXF_input_block_wipeout[200][100];
+struct DXF_block_xline DXF_input_block_xline[200][100];
 
 struct DXF_entities_3dface DXF_input_entities_3dface[1000];
 struct DXF_entities_3dsolid DXF_input_entities_3dsolid[1000];
@@ -107,13 +110,13 @@
 struct DXF_entities_tolerance DXF_input_entities_tolerance[1000];
 struct DXF_entities_trace DXF_input_entities_trace[1000];
 struct DXF_entities_underlay DXF_input_entities_underlay[1000];
-struct DXF_entities_vertex DXF_input_entities_vertex[5000];
+struct DXF_entities_vertex DXF_input_entities_vertex[50000];
 struct DXF_entities_viewport DXF_input_entities_viewport[1000];
 struct DXF_entities_wipeout DXF_input_entities_wipeout[1000];
 struct DXF_entities_xline DXF_input_entities_xline[1000];
 
 
-struct DXF_end_block DXF_input_end_block[100];
+
 //extern struct DXF_file_input DXF_input_entities[100];
 //extern struct DXF_file_input DXF_input_thumbnailimage[100];
 struct DXF_base DXF_main_base[1];
@@ -191,6 +194,113 @@
 
 	on_Open_config_file_clicked();
 
+	Max_entitie.DXF_entities_3dface=1000;
+	Max_entitie.DXF_entities_3dsolid=1000;
+	Max_entitie.DXF_entities_acad_proxy_entity=1000;
+	Max_entitie.DXF_entities_arc=1000;
+	Max_entitie.DXF_entities_attdef=1000;
+	Max_entitie.DXF_entities_attrib=1000;
+	Max_entitie.DXF_entities_body=1000;
+	Max_entitie.DXF_entities_circle=1000;
+	Max_entitie.DXF_entities_dimension=1000;
+	Max_entitie.DXF_entities_ellipse=1000;
+	Max_entitie.DXF_entities_hatch=1000;
+	Max_entitie.DXF_entities_helix=1000;
+	Max_entitie.DXF_entities_image=1000;
+	Max_entitie.DXF_entities_insert=1000;
+	Max_entitie.DXF_entities_leader=1000;
+	Max_entitie.DXF_entities_light=1000;
+	Max_entitie.DXF_entities_line=100000;
+	Max_entitie.DXF_entities_lwpolyline=1000;
+	Max_entitie.DXF_entities_mesh=1000;
+	Max_entitie.DXF_entities_mline=1000;
+	Max_entitie.DXF_entities_mleaderstyle=1000;
+	Max_entitie.DXF_entities_mleader=1000;
+	Max_entitie.DXF_entities_mtext=1000;
+	Max_entitie.DXF_entities_oleframe=1000;
+	Max_entitie.DXF_entities_ole2frame=1000;
+	Max_entitie.DXF_entities_point=1000;
+	Max_entitie.DXF_entities_polyline=1000;
+	Max_entitie.DXF_entities_ray=1000;
+	Max_entitie.DXF_entities_region=1000;
+	Max_entitie.DXF_entities_section=100;
+	Max_entitie.DXF_entities_seqend=1000;
+	Max_entitie.DXF_entities_shape=1000;
+	Max_entitie.DXF_entities_solid=1000;
+	Max_entitie.DXF_entities_spline=1000;
+	Max_entitie.DXF_entities_sun=1000;
+	Max_entitie.DXF_entities_surface=1000;
+	Max_entitie.DXF_entities_table=1000;
+	Max_entitie.DXF_entities_text=1000;
+	Max_entitie.DXF_entities_tolerance=1000;
+	Max_entitie.DXF_entities_trace=1000;
+	Max_entitie.DXF_entities_underlay=1000;
+	Max_entitie.DXF_entities_vertex=50000;
+	Max_entitie.DXF_entities_viewport=1000;
+	Max_entitie.DXF_entities_wipeout=1000;
+	Max_entitie.DXF_entities_xline=1000;
+
+	Max_block.DXF_block_3dface=100;
+	Max_block.DXF_block_3dsolid=100;
+	Max_block.DXF_block_acad_proxy_entity=100;
+	Max_block.DXF_block_arc=100;
+	Max_block.DXF_block_attdef=100;
+	Max_block.DXF_block_attrib=100;
+	Max_block.DXF_block_body=100;
+	Max_block.DXF_block_circle=100;
+	Max_block.DXF_block_dimension=100;
+	Max_block.DXF_block_ellipse=100;
+	Max_block.DXF_block_hatch=100;
+	Max_block.DXF_block_helix=100;
+	Max_block.DXF_block_image=100;
+	Max_block.DXF_block_insert=100;
+	Max_block.DXF_block_leader=100;
+	Max_block.DXF_block_light=100;
+	Max_block.DXF_block_line=5000;
+	Max_block.DXF_block_lwpolyline=100;
+	Max_block.DXF_block_mesh=100;
+	Max_block.DXF_block_mline=100;
+	Max_block.DXF_block_mleaderstyle=100;
+	Max_block.DXF_block_mleader=100;
+	Max_block.DXF_block_mtext=100;
+	Max_block.DXF_block_oleframe=100;
+	Max_block.DXF_block_ole2frame=100;
+	Max_block.DXF_block_point=100;
+	Max_block.DXF_block_polyline=100;
+	Max_block.DXF_block_ray=100;
+	Max_block.DXF_block_region=100;
+	Max_block.DXF_block_section=100;
+	Max_block.DXF_block_seqend=100;
+	Max_block.DXF_block_shape=100;
+	Max_block.DXF_block_solid=100;
+	Max_block.DXF_block_spline=100;
+	Max_block.DXF_block_sun=100;
+	Max_block.DXF_block_surface=100;
+	Max_block.DXF_block_table=100;
+	Max_block.DXF_block_text=100;
+	Max_block.DXF_block_tolerance=100;
+	Max_block.DXF_block_trace=100;
+	Max_block.DXF_block_underlay=100;
+	Max_block.DXF_block_vertex=500;
+	Max_block.DXF_block_viewport=100;
+	Max_block.DXF_block_wipeout=100;
+	Max_block.DXF_block_xline=100;
+
+	Max_alg.DXF_header=500;
+	Max_alg.DXF_classes=1000;
+	Max_alg.DXF_tables=20;
+	Max_alg.DXF_table_appid=100;
+	Max_alg.DXF_table_block_record=500;
+	Max_alg.DXF_table_dimstyle=500;
+	Max_alg.DXF_table_layer=100;
+	Max_alg.DXF_table_ltype=100;
+	Max_alg.DXF_table_style=100;
+	Max_alg.DXF_table_ucs=100;
+	Max_alg.DXF_table_view=100;
+	Max_alg.DXF_table_vport=100;
+	Max_alg.DXF_input_block=200;
+	Max_alg.DXF_input_end_block=200;
+	Max_alg.DXF_entities=100000;
 }
 
 DXFtoQET_MainWindow::~DXFtoQET_MainWindow()
@@ -214,6 +324,8 @@
 void DXFtoQET_MainWindow::on_actionOpen_triggered()
 {
 
+	Clear_view();
+
 	main_sw1=0;
 	main_sw2=0;
 	main_sw3=0;
@@ -404,6 +516,7 @@
 
 void DXFtoQET_MainWindow::on_load_into_tables_clicked()
 {
+	//Clear_view();
 
 	DXF_main_base[0].DXF_file_loaded_into_table=1;
 
@@ -459,7 +572,7 @@
 
 			ui->DXF_3DFACE->setText(QString::number(DXF_main_base[0].DXF_entities_3dface_count));
 
-			if (DXF_main_base[0].DXF_entities_3dface_count>999)
+			if (DXF_main_base[0].DXF_entities_3dface_count>(Max_entitie.DXF_entities_3dface-1))
 			{
 
 				ui->DXF_3DFACE->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -471,7 +584,7 @@
 
 			ui->DXF_3DSOLID->setText(QString::number(DXF_main_base[0].DXF_entities_3dsolid_count));
 
-			if (DXF_main_base[0].DXF_entities_3dsolid_count>999)
+			if (DXF_main_base[0].DXF_entities_3dsolid_count>(Max_entitie.DXF_entities_3dsolid-1))
 			{
 
 				ui->DXF_3DSOLID->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -483,7 +596,7 @@
 
 			ui->DXF_ACAD_PROXY_ENTITY->setText(QString::number(DXF_main_base[0].DXF_entities_acad_proxy_entity_count));
 
-			if (DXF_main_base[0].DXF_entities_acad_proxy_entity_count>999)
+			if (DXF_main_base[0].DXF_entities_acad_proxy_entity_count>(Max_entitie.DXF_entities_acad_proxy_entity-1))
 			{
 
 				ui->DXF_ACAD_PROXY_ENTITY->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -495,7 +608,7 @@
 
 			ui->DXF_ARC->setText(QString::number(DXF_main_base[0].DXF_entities_arc_count));
 
-			if (DXF_main_base[0].DXF_entities_arc_count>999)
+			if (DXF_main_base[0].DXF_entities_arc_count>(Max_entitie.DXF_entities_arc-1))
 			{
 
 				ui->DXF_ARC->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -507,7 +620,7 @@
 
 			ui->DXF_ATTDEF->setText(QString::number(DXF_main_base[0].DXF_entities_attdef_count));
 
-			if (DXF_main_base[0].DXF_entities_attdef_count>999)
+			if (DXF_main_base[0].DXF_entities_attdef_count>(Max_entitie.DXF_entities_attdef-1))
 			{
 
 				ui->DXF_ATTDEF->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -519,7 +632,7 @@
 
 			ui->DXF_ATTRIB->setText(QString::number(DXF_main_base[0].DXF_entities_attrib_count));
 
-			if (DXF_main_base[0].DXF_entities_attrib_count>999)
+			if (DXF_main_base[0].DXF_entities_attrib_count>(Max_entitie.DXF_entities_attrib-1))
 			{
 
 				ui->DXF_ATTRIB->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -531,7 +644,7 @@
 
 			ui->DXF_BODY->setText(QString::number(DXF_main_base[0].DXF_entities_body_count));
 
-			if (DXF_main_base[0].DXF_entities_body_count>999)
+			if (DXF_main_base[0].DXF_entities_body_count>Max_entitie.DXF_entities_body-1)
 			{
 
 				ui->DXF_BODY->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -544,7 +657,7 @@
 			ui->DXF_CIRCLE->setText(QString::number(DXF_main_base[0].DXF_entities_circle_count));
 
 
-			if (DXF_main_base[0].DXF_entities_circle_count>999)
+			if (DXF_main_base[0].DXF_entities_circle_count>(Max_entitie.DXF_entities_circle-1))
 			{
 
 				ui->DXF_CIRCLE->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -557,7 +670,7 @@
 			ui->DXF_DIMENSIONS->setText(QString::number(DXF_main_base[0].DXF_entities_dimension_count));
 
 
-			if (DXF_main_base[0].DXF_entities_dimension_count>999)
+			if (DXF_main_base[0].DXF_entities_dimension_count>(Max_entitie.DXF_entities_dimension-1))
 			{
 
 				ui->DXF_DIMENSIONS->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -570,7 +683,7 @@
 			ui->DXF_ELLIPSE->setText(QString::number(DXF_main_base[0].DXF_entities_ellipse_count));
 
 
-			if (DXF_main_base[0].DXF_entities_ellipse_count>999)
+			if (DXF_main_base[0].DXF_entities_ellipse_count>(Max_entitie.DXF_entities_ellipse-1))
 			{
 
 				ui->DXF_ELLIPSE->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -583,7 +696,7 @@
 			ui->DXF_HATCH->setText(QString::number(DXF_main_base[0].DXF_entities_hatch_count));
 
 
-			if (DXF_main_base[0].DXF_entities_hatch_count>999)
+			if (DXF_main_base[0].DXF_entities_hatch_count>(Max_entitie.DXF_entities_hatch-1))
 			{
 
 				ui->DXF_HATCH->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -596,7 +709,7 @@
 			ui->DXF_HELIX->setText(QString::number(DXF_main_base[0].DXF_entities_helix_count));
 
 
-			if (DXF_main_base[0].DXF_entities_helix_count>999)
+			if (DXF_main_base[0].DXF_entities_helix_count>(Max_entitie.DXF_entities_helix-1))
 			{
 
 				ui->DXF_HELIX->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -609,7 +722,7 @@
 			ui->DXF_IMAGE->setText(QString::number(DXF_main_base[0].DXF_entities_image_count));
 
 
-			if (DXF_main_base[0].DXF_entities_image_count>999)
+			if (DXF_main_base[0].DXF_entities_image_count>(Max_entitie.DXF_entities_image-1))
 			{
 
 				ui->DXF_IMAGE->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -622,7 +735,7 @@
 			ui->DXF_INSERT->setText(QString::number(DXF_main_base[0].DXF_entities_insert_count));
 
 
-			if (DXF_main_base[0].DXF_entities_insert_count>999)
+			if (DXF_main_base[0].DXF_entities_insert_count>(Max_entitie.DXF_entities_insert-1))
 			{
 
 				ui->DXF_INSERT->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -635,7 +748,7 @@
 			ui->DXF_LEADER->setText(QString::number(DXF_main_base[0].DXF_entities_leader_count));
 
 
-			if (DXF_main_base[0].DXF_entities_leader_count>999)
+			if (DXF_main_base[0].DXF_entities_leader_count>(Max_entitie.DXF_entities_leader-1))
 			{
 
 				ui->DXF_LEADER->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -648,7 +761,7 @@
 			ui->DXF_LIGHT->setText(QString::number(DXF_main_base[0].DXF_entities_light_count));
 
 
-			if (DXF_main_base[0].DXF_entities_light_count>999)
+			if (DXF_main_base[0].DXF_entities_light_count>(Max_entitie.DXF_entities_light-1))
 			{
 
 				ui->DXF_LIGHT->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -660,7 +773,7 @@
 
 			ui->DXF_LINE->setText(QString::number(DXF_main_base[0].DXF_entities_line_count));
 
-			if (DXF_main_base[0].DXF_entities_line_count>99999)
+			if (DXF_main_base[0].DXF_entities_line_count>(Max_entitie.DXF_entities_line-1))
 			{
 
 				ui->DXF_LINE->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -672,7 +785,7 @@
 
 			ui->DXF_LWPOLYLINE->setText(QString::number(DXF_main_base[0].DXF_entities_lwpolyline_count));
 
-			if (DXF_main_base[0].DXF_entities_lwpolyline_count>999)
+			if (DXF_main_base[0].DXF_entities_lwpolyline_count>(Max_entitie.DXF_entities_lwpolyline-1))
 			{
 
 				ui->DXF_LWPOLYLINE->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -684,7 +797,7 @@
 
 			ui->DXF_MESH->setText(QString::number(DXF_main_base[0].DXF_entities_mesh_count));
 
-			if (DXF_main_base[0].DXF_entities_mesh_count>999)
+			if (DXF_main_base[0].DXF_entities_mesh_count>(Max_entitie.DXF_entities_mesh-1))
 			{
 
 				ui->DXF_MESH->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -696,7 +809,7 @@
 
 			ui->DXF_MLINE->setText(QString::number(DXF_main_base[0].DXF_entities_mline_count));
 
-			if (DXF_main_base[0].DXF_entities_mline_count>999)
+			if (DXF_main_base[0].DXF_entities_mline_count>(Max_entitie.DXF_entities_mline-1))
 			{
 
 				ui->DXF_MLINE->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -708,7 +821,7 @@
 
 			ui->DXF_MLEADER->setText(QString::number(DXF_main_base[0].DXF_entities_mleader_count));
 
-			if (DXF_main_base[0].DXF_entities_mleader_count>999)
+			if (DXF_main_base[0].DXF_entities_mleader_count>(Max_entitie.DXF_entities_mleader-1))
 			{
 
 				ui->DXF_MLEADER->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -720,7 +833,7 @@
 
 			ui->DXF_MLEADERSTYLE->setText(QString::number(DXF_main_base[0].DXF_entities_mleaderstyle_count));
 
-			if (DXF_main_base[0].DXF_entities_mleaderstyle_count>999)
+			if (DXF_main_base[0].DXF_entities_mleaderstyle_count>(Max_entitie.DXF_entities_mleaderstyle-1))
 			{
 
 				ui->DXF_MLEADERSTYLE->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -732,7 +845,7 @@
 
 			ui->DXF_MTEXT->setText(QString::number(DXF_main_base[0].DXF_entities_mtext_count));
 
-			if (DXF_main_base[0].DXF_entities_mtext_count>999)
+			if (DXF_main_base[0].DXF_entities_mtext_count>(Max_entitie.DXF_entities_mtext-1))
 			{
 
 				ui->DXF_MTEXT->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -744,7 +857,7 @@
 
 			ui->DXF_OLEFRAME->setText(QString::number(DXF_main_base[0].DXF_entities_oleframe_count));
 
-			if (DXF_main_base[0].DXF_entities_oleframe_count>999)
+			if (DXF_main_base[0].DXF_entities_oleframe_count>(Max_entitie.DXF_entities_oleframe-1))
 			{
 
 				ui->DXF_OLEFRAME->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -756,7 +869,7 @@
 
 			ui->DXF_OLE2FRAME->setText(QString::number(DXF_main_base[0].DXF_entities_ole2frame_count));
 
-			if (DXF_main_base[0].DXF_entities_ole2frame_count>999)
+			if (DXF_main_base[0].DXF_entities_ole2frame_count>(Max_entitie.DXF_entities_ole2frame-1))
 			{
 
 				ui->DXF_OLE2FRAME->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -768,7 +881,7 @@
 
 			ui->DXF_POINT->setText(QString::number(DXF_main_base[0].DXF_entities_point_count));
 
-			if (DXF_main_base[0].DXF_entities_point_count>999)
+			if (DXF_main_base[0].DXF_entities_point_count>(Max_entitie.DXF_entities_point-1))
 			{
 
 				ui->DXF_POINT->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -780,7 +893,7 @@
 
 			ui->DXF_POLYLINE->setText(QString::number(DXF_main_base[0].DXF_entities_polyline_count));
 
-			if (DXF_main_base[0].DXF_entities_polyline_count>999)
+			if (DXF_main_base[0].DXF_entities_polyline_count>(Max_entitie.DXF_entities_polyline-1))
 			{
 
 				ui->DXF_POLYLINE->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -792,7 +905,7 @@
 
 			ui->DXF_RAY->setText(QString::number(DXF_main_base[0].DXF_entities_ray_count));
 
-			if (DXF_main_base[0].DXF_entities_ray_count>999)
+			if (DXF_main_base[0].DXF_entities_ray_count>(Max_entitie.DXF_entities_ray-1))
 			{
 
 				ui->DXF_RAY->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -804,7 +917,7 @@
 
 			ui->DXF_REGION->setText(QString::number(DXF_main_base[0].DXF_entities_region_count));
 
-			if (DXF_main_base[0].DXF_entities_region_count>999)
+			if (DXF_main_base[0].DXF_entities_region_count>(Max_entitie.DXF_entities_region-1))
 			{
 
 				ui->DXF_REGION->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -816,7 +929,7 @@
 
 			ui->DXF_SECTION->setText(QString::number(DXF_main_base[0].DXF_entities_section_count));
 
-			if (DXF_main_base[0].DXF_entities_section_count>999)
+			if (DXF_main_base[0].DXF_entities_section_count>(Max_entitie.DXF_entities_section-1))
 			{
 
 				ui->DXF_SECTION->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -828,7 +941,7 @@
 
 			ui->DXF_SEQEND->setText(QString::number(DXF_main_base[0].DXF_entities_seqend_count));
 
-			if (DXF_main_base[0].DXF_entities_seqend_count>999)
+			if (DXF_main_base[0].DXF_entities_seqend_count>(Max_entitie.DXF_entities_seqend-1))
 			{
 
 				ui->DXF_SEQEND->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -840,7 +953,7 @@
 
 			ui->DXF_SHAPE->setText(QString::number(DXF_main_base[0].DXF_entities_shape_count));
 
-			if (DXF_main_base[0].DXF_entities_shape_count>999)
+			if (DXF_main_base[0].DXF_entities_shape_count>(Max_entitie.DXF_entities_shape-1))
 			{
 
 				ui->DXF_SHAPE->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -852,7 +965,7 @@
 
 			ui->DXF_SOLID->setText(QString::number(DXF_main_base[0].DXF_entities_solid_count));
 
-			if (DXF_main_base[0].DXF_entities_solid_count>999)
+			if (DXF_main_base[0].DXF_entities_solid_count>(Max_entitie.DXF_entities_solid-1))
 			{
 
 				ui->DXF_SOLID->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -864,7 +977,7 @@
 
 			ui->DXF_SPLINE->setText(QString::number(DXF_main_base[0].DXF_entities_spline_count));
 
-			if (DXF_main_base[0].DXF_entities_spline_count>999)
+			if (DXF_main_base[0].DXF_entities_spline_count>(Max_entitie.DXF_entities_spline-1))
 			{
 
 				ui->DXF_SPLINE->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -876,7 +989,7 @@
 
 			ui->DXF_SUN->setText(QString::number(DXF_main_base[0].DXF_entities_sun_count));
 
-			if (DXF_main_base[0].DXF_entities_sun_count>999)
+			if (DXF_main_base[0].DXF_entities_sun_count>(Max_entitie.DXF_entities_sun-1))
 			{
 
 				ui->DXF_SUN->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -888,7 +1001,7 @@
 
 			ui->DXF_SURFACE->setText(QString::number(DXF_main_base[0].DXF_entities_surface_count));
 
-			if (DXF_main_base[0].DXF_entities_surface_count>999)
+			if (DXF_main_base[0].DXF_entities_surface_count>(Max_entitie.DXF_entities_surface-1))
 			{
 
 				ui->DXF_SURFACE->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -900,7 +1013,7 @@
 
 			ui->DXF_TABLE->setText(QString::number(DXF_main_base[0].DXF_entities_table_count));
 
-			if (DXF_main_base[0].DXF_entities_table_count>999)
+			if (DXF_main_base[0].DXF_entities_table_count>(Max_entitie.DXF_entities_table-1))
 			{
 
 				ui->DXF_TABLE->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -912,7 +1025,7 @@
 
 			ui->DXF_TEXT->setText(QString::number(DXF_main_base[0].DXF_entities_text_count));
 
-			if (DXF_main_base[0].DXF_entities_text_count>999)
+			if (DXF_main_base[0].DXF_entities_text_count>(Max_entitie.DXF_entities_leader-1))
 			{
 
 				ui->DXF_TEXT->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -924,7 +1037,7 @@
 
 			ui->DXF_TOLERANCE->setText(QString::number(DXF_main_base[0].DXF_entities_tolerance_count));
 
-			if (DXF_main_base[0].DXF_entities_tolerance_count>999)
+			if (DXF_main_base[0].DXF_entities_tolerance_count>(Max_entitie.DXF_entities_tolerance-1))
 			{
 
 				ui->DXF_TOLERANCE->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -936,7 +1049,7 @@
 
 			ui->DXF_TRACE->setText(QString::number(DXF_main_base[0].DXF_entities_trace_count));
 
-			if (DXF_main_base[0].DXF_entities_trace_count>999)
+			if (DXF_main_base[0].DXF_entities_trace_count>(Max_entitie.DXF_entities_trace-1))
 			{
 
 				ui->DXF_TRACE->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -948,7 +1061,7 @@
 
 			ui->DXF_UNDERLAY->setText(QString::number(DXF_main_base[0].DXF_entities_underlay_count));
 
-			if (DXF_main_base[0].DXF_entities_underlay_count>999)
+			if (DXF_main_base[0].DXF_entities_underlay_count>(Max_entitie.DXF_entities_underlay-1))
 			{
 
 				ui->DXF_UNDERLAY->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -960,7 +1073,7 @@
 
 			ui->DXF_VERTEX->setText(QString::number(DXF_main_base[0].DXF_entities_vertex_count));
 
-			if (DXF_main_base[0].DXF_entities_vertex_count>4999)
+			if (DXF_main_base[0].DXF_entities_vertex_count>(Max_entitie.DXF_entities_vertex-1))
 			{
 
 				ui->DXF_VERTEX->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -972,7 +1085,7 @@
 
 			ui->DXF_VIEWPORT->setText(QString::number(DXF_main_base[0].DXF_entities_viewport_count));
 
-			if (DXF_main_base[0].DXF_entities_viewport_count>999)
+			if (DXF_main_base[0].DXF_entities_viewport_count>(Max_entitie.DXF_entities_viewport-1))
 			{
 
 				ui->DXF_VIEWPORT->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -984,7 +1097,7 @@
 
 			ui->DXF_WIPEOUT->setText(QString::number(DXF_main_base[0].DXF_entities_wipeout_count));
 
-			if (DXF_main_base[0].DXF_entities_wipeout_count>999)
+			if (DXF_main_base[0].DXF_entities_wipeout_count>(Max_entitie.DXF_entities_wipeout-1))
 			{
 
 				ui->DXF_WIPEOUT->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -996,7 +1109,7 @@
 
 			ui->DXF_XLINE->setText(QString::number(DXF_main_base[0].DXF_entities_xline_count));
 
-			if (DXF_main_base[0].DXF_entities_xline_count>999)
+			if (DXF_main_base[0].DXF_entities_xline_count>(Max_entitie.DXF_entities_xline-1))
 			{
 
 				ui->DXF_XLINE->setStyleSheet("QLineEdit { background-color:rgb(255,0,0)}");
@@ -1280,9 +1393,22 @@
 void DXFtoQET_MainWindow::DXF_Block_table()
 {
 
-	model3=new QStandardItemModel(100,46,this);
+	model3=new QStandardItemModel(200,46,this);
 	ui->Block_Items_2->setModel(model3);
 
+	QModelIndex index3;
+	for(int row= 0; row < 200; row++)
+	{
+		for(int col= 0; col < 46; col++)
+		{
+			index3 = model3->index(row,col,QModelIndex());
+			model3->setData(index3,QString(" "));
+
+		}
+	}
+
+	ui->Block_Items_2->show();
+
 	List3.append("Block n°");
 
 	List3.append("3dface");
@@ -1343,7 +1469,7 @@
 
 	int blockcount =0;
 
-	for (int row2=0; row2<99;row2++)
+	for (int row2=0; row2<199;row2++)
 	{
 
 			QModelIndex index = model3->index(row2,0,QModelIndex());
@@ -1691,3 +1817,37 @@
 
 }
 
+void DXFtoQET_MainWindow::Clear_view()
+{
+
+	model5=new QStandardItemModel(200,46,this);
+	ui->Block_Items_2->setModel(model5);
+
+
+
+	QModelIndex index5;
+	for(int row= 0; row < 200; row++)
+	{
+		for(int col= 0; col < 46; col++)
+		{
+			index5 = model5->index(row,col,QModelIndex());
+			model5->setData(index5,QString(" "));
+
+		}
+	}
+
+	//ui->Block_Items_2->QTableView.reset();
+
+	ui->Block_Items_2->show();
+
+	ui->ELMT_result->clear();
+
+	ui->dxf_file_loaded->clear();
+
+}
+
+void DXFtoQET_MainWindow::Clear_struct()
+{
+
+	//DXF_input_table_block_record[].
+}

Modified: branches/dxftoqet2/dxftoqet_mainwindow.h
===================================================================
--- branches/dxftoqet2/dxftoqet_mainwindow.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/dxftoqet_mainwindow.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,7 +1,7 @@
 #ifndef DXFTOQET_MAINWINDOW_H
 #define DXFTOQET_MAINWINDOW_H
 
-//#include <QMainWindow>
+
 #include <QWidget>
 #include <QObject>
 #include <QMessageBox>
@@ -9,6 +9,7 @@
 #include <QTableView>
 
 #include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
 #include "src/dxf_load.h"
 #include "src/dxf_split.h"
 #include "src/split_csv.h"
@@ -80,6 +81,7 @@
 	QStandardItemModel *model2;
 	QStandardItemModel *model3;
 	QAbstractItemModel *model4;
+	QAbstractItemModel *model5;
 
 	QStringList List2;
 	QStringList List3;
@@ -87,6 +89,8 @@
 	void CSV_Load_QTable();
 	void CSV_Load_settings();
 	void DXF_Block_table();
+	void Clear_view();
+	void Clear_struct();
 
 	protected:
 	void changeEvent(QEvent *e);

Modified: branches/dxftoqet2/dxftoqet_mainwindow.ui
===================================================================
--- branches/dxftoqet2/dxftoqet_mainwindow.ui	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/dxftoqet_mainwindow.ui	2016-03-02 22:40:35 UTC (rev 4368)
@@ -478,7 +478,7 @@
             <enum>QTabWidget::Rounded</enum>
            </property>
            <property name="currentIndex">
-            <number>6</number>
+            <number>0</number>
            </property>
            <widget class="QWidget" name="tab_ELMT">
             <property name="sizePolicy">
@@ -759,7 +759,7 @@
               <string notr="true">BACKGROUND:rgb(225, 225, 225)</string>
              </property>
              <property name="currentIndex">
-              <number>0</number>
+              <number>3</number>
              </property>
              <widget class="QWidget" name="tab_dxf_sections">
               <attribute name="title">

Modified: branches/dxftoqet2/main.cpp
===================================================================
--- branches/dxftoqet2/main.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/main.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,6 +1,7 @@
 #include "dxftoqet_mainwindow.h"
 #include <QApplication>
 #include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
 
 //extern int dxf();
 //extern struct DXF_base DXF_main_base[1];

Modified: branches/dxftoqet2/src/csv_build_table.cpp
===================================================================
--- branches/dxftoqet2/src/csv_build_table.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/csv_build_table.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -2,6 +2,9 @@
 
 //extern int dxf ();
 
+extern struct ALG Max_alg;
+extern struct BLOCK Max_block;
+extern struct ENTITIE Max_entitie;
 extern struct DXF_header DXF_input_header[500];
 extern struct DXF_classes DXF_input_classes[1000];
 extern struct DXF_tables DXF_input_tables[20];

Modified: branches/dxftoqet2/src/csv_build_table.h
===================================================================
--- branches/dxftoqet2/src/csv_build_table.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/csv_build_table.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -6,6 +6,7 @@
 //#include <QMainWindow>
 
 #include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
 #include "dxftoqet_mainwindow.h"
 
 /*namespace Ui

Modified: branches/dxftoqet2/src/dxf/dxf_polyline.h
===================================================================
--- branches/dxftoqet2/src/dxf/dxf_polyline.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf/dxf_polyline.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -24,8 +24,8 @@
 
 	int16_t closed; //70
 
-	double x_vector[500];
-	double y_vector[500];
+	double x_vector[50000];
+	double y_vector[50000];
 
 	QString Result_polyline;
 

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_arc.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_arc.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_arc.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,7 +1,10 @@
 #include "dxf_block_arc.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_block_arc DXF_input_block_arc[100][50];
+extern struct DXF_block_arc DXF_input_block_arc[200][100];
 
 dxf_block_arc::dxf_block_arc(QWidget *parent) : QWidget(parent)
 {

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_arc.h
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_arc.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_arc.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #include <QWidget>
 #include "src/dxf/dxf_arc.h"
 #include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
 #include "src/qet_base_types/baseelmt.h"
 
 class dxf_block_arc : public QWidget // QMainWindow

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_attdef.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_attdef.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_attdef.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,7 +1,10 @@
 #include "dxf_block_attdef.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_block_attdef DXF_input_block_attdef[100][50];
+extern struct DXF_block_attdef DXF_input_block_attdef[200][100];
 
 dxf_block_attdef::dxf_block_attdef(QWidget *parent) : QWidget(parent)
 {

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_attdef.h
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_attdef.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_attdef.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #include <QWidget>
 #include "dxf/dxf_attdef.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"
 

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_attribute.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_attribute.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_attribute.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,7 +1,10 @@
 #include "dxf_block_attribute.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_block_attrib DXF_input_block_attrib[100][50];
+extern struct DXF_block_attrib DXF_input_block_attrib[200][100];
 
 dxf_block_attribute::dxf_block_attribute(QWidget *parent) : QWidget(parent)
 {

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_attribute.h
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_attribute.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_attribute.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #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"
 

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_circle.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_circle.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_circle.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,7 +1,10 @@
 #include "dxf_block_circle.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_block_circle DXF_input_block_circle[100][50];
+extern struct DXF_block_circle DXF_input_block_circle[200][100];
 
 dxf_block_circle::dxf_block_circle(QWidget *parent) : QWidget(parent)
 {

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_circle.h
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_circle.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_circle.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #include <QWidget>
 #include "src/dxf/dxf_circle.h"
 #include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
 #include "src/qet_base_types/baseelmt.h"
 
 class dxf_block_circle : public QWidget // QMainWindow

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_ellipse.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_ellipse.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_ellipse.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,7 +1,10 @@
 #include "dxf_block_ellipse.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_block_ellipse DXF_input_block_ellipse[100][50];
+extern struct DXF_block_ellipse DXF_input_block_ellipse[200][100];
 
 dxf_block_ellipse::dxf_block_ellipse(QWidget *parent) : QWidget(parent)
 {

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_ellipse.h
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_ellipse.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_ellipse.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #include <QWidget>
 #include "src/dxf/dxf_ellipse.h"
 #include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
 #include "src/qet_base_types/baseelmt.h"
 
 class dxf_block_ellipse : public QWidget // QMainWindow

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_entitie_insert.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_entitie_insert.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_entitie_insert.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,21 +1,24 @@
 #include "dxf_block_entitie_insert.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_block_line DXF_input_block_line[100][50];
-extern struct DXF_block_arc DXF_input_block_arc[100][50];
-extern struct DXF_block_attdef DXF_input_block_attdef[100][50];
-extern struct DXF_block_attrib DXF_input_block_attrib[100][50];
-extern struct DXF_block_circle DXF_input_block_circle[100][50];
-extern struct DXF_block_ellipse DXF_input_block_ellipse[100][50];
-extern struct DXF_block_attdef DXF_input_block_attdef[100][50];
-extern struct DXF_block_attrib DXF_input_block_attrib[100][50];
-extern struct DXF_block_lwpolyline DXF_input_block_lwpolyline[100][50];
-extern struct DXF_block_point DXF_input_block_point[100][50];
-extern struct DXF_block_polyline DXF_input_block_polyline[100][50];
-extern struct DXF_block_seqend DXF_input_block_seqend[100][50];
-extern struct DXF_block_text DXF_input_block_text[100][50];
-extern struct DXF_block_vertex DXF_input_block_vertex[100][500];
+extern struct DXF_block_line DXF_input_block_line[200][100];
+extern struct DXF_block_arc DXF_input_block_arc[200][100];
+extern struct DXF_block_attdef DXF_input_block_attdef[200][100];
+extern struct DXF_block_attrib DXF_input_block_attrib[200][100];
+extern struct DXF_block_circle DXF_input_block_circle[200][100];
+extern struct DXF_block_ellipse DXF_input_block_ellipse[200][100];
+extern struct DXF_block_attdef DXF_input_block_attdef[200][100];
+extern struct DXF_block_attrib DXF_input_block_attrib[200][100];
+extern struct DXF_block_lwpolyline DXF_input_block_lwpolyline[200][100];
+extern struct DXF_block_point DXF_input_block_point[200][100];
+extern struct DXF_block_polyline DXF_input_block_polyline[200][100];
+extern struct DXF_block_seqend DXF_input_block_seqend[200][100];
+extern struct DXF_block_text DXF_input_block_text[200][100];
+extern struct DXF_block_vertex DXF_input_block_vertex[200][500];
 
 extern struct DXF_entities_insert DXF_input_entities_insert[1000];
 
@@ -23,14 +26,14 @@
 
 dxf_block_entitie_insert::dxf_block_entitie_insert(QWidget *parent) : QWidget(parent)
 {
-
+	dxf_insert_block_color="black";
 }
 
 QString dxf_block_entitie_insert::Make_Block_Entitie_Insert()
 {
 	Result_insert="";
 
-	Count_lines=0;
+	//Count_lines=0;
 
 	dxf_block_lines insert_Make_Block_Lines;
 	dxf_block_arc insert_Make_Block_Arc;
@@ -41,6 +44,7 @@
 	dxf_block_attdef insert_Make_Block_Attdef;
 	dxf_block_attribute insert_Make_Block_Attribute;
 	dxf_block_text insert_Make_Block_Text;
+	dxf_block_insert insert_Make_Block_insert;
 
 	/* Block LINES */
 
@@ -52,7 +56,7 @@
 	insert_Make_Block_Lines.Name_insert=Name_insert;
 	insert_Make_Block_Lines.Insert_block_nr=Insert_block_nr;
 
-	insert_Make_Block_Lines.block_color="green";
+	insert_Make_Block_Lines.block_color= dxf_insert_block_color;//"green";
 	insert_Make_Block_Lines.block_filling="none";
 	insert_Make_Block_Lines.block_line_weight="thin";
 
@@ -69,7 +73,7 @@
 	insert_Make_Block_Arc.Name_insert=Name_insert;
 	insert_Make_Block_Arc.Insert_block_nr=Insert_block_nr;
 
-	insert_Make_Block_Arc.block_color="green";
+	insert_Make_Block_Arc.block_color=dxf_insert_block_color;//"green";
 	insert_Make_Block_Arc.block_filling="none";
 	insert_Make_Block_Arc.block_line_weight="thin";
 	insert_Make_Block_Arc.block_antialias="false";
@@ -86,7 +90,7 @@
 	insert_Make_Block_Circle.Name_insert=Name_insert;
 	insert_Make_Block_Circle.Insert_block_nr=Insert_block_nr;
 
-	insert_Make_Block_Circle.block_color="green";
+	insert_Make_Block_Circle.block_color=dxf_insert_block_color;//"green";
 	insert_Make_Block_Circle.block_filling="none";
 	insert_Make_Block_Circle.block_line_weight="thin";
 	insert_Make_Block_Circle.block_antialias="false";
@@ -103,7 +107,7 @@
 	insert_Make_Block_Ellipse.Name_insert=Name_insert;
 	insert_Make_Block_Ellipse.Insert_block_nr=Insert_block_nr;
 
-	insert_Make_Block_Ellipse.block_color="green";
+	insert_Make_Block_Ellipse.block_color=dxf_insert_block_color;//"green";
 	insert_Make_Block_Ellipse.block_filling="none";
 	insert_Make_Block_Ellipse.block_line_weight="thin";
 	insert_Make_Block_Ellipse.block_antialias="false";
@@ -121,7 +125,7 @@
 	insert_Make_Block_Polyline.Name_insert=Name_insert;
 	insert_Make_Block_Polyline.Insert_block_nr=Insert_block_nr;
 
-	insert_Make_Block_Polyline.block_color="cyan";
+	insert_Make_Block_Polyline.block_color=dxf_insert_block_color;//"cyan";
 	insert_Make_Block_Polyline.block_filling="none";
 	insert_Make_Block_Polyline.block_line_weight="thin";
 	insert_Make_Block_Polyline.block_line_style="normal";
@@ -138,7 +142,7 @@
 	insert_Make_Block_Lwpolyline.Name_insert=Name_insert;
 	insert_Make_Block_Lwpolyline.Insert_block_nr=Insert_block_nr;
 
-	insert_Make_Block_Lwpolyline.block_color="orange";
+	insert_Make_Block_Lwpolyline.block_color=dxf_insert_block_color;//"orange";
 	insert_Make_Block_Lwpolyline.block_filling="none";
 	insert_Make_Block_Lwpolyline.block_line_weight="thin";
 	insert_Make_Block_Lwpolyline.block_line_style="normal";
@@ -155,7 +159,7 @@
 	insert_Make_Block_Attdef.Name_insert=Name_insert;
 	insert_Make_Block_Attdef.Insert_block_nr=Insert_block_nr;
 
-	insert_Make_Block_Attdef.block_color="green";
+	insert_Make_Block_Attdef.block_color=dxf_insert_block_color;//"green";
 	insert_Make_Block_Attdef.block_filling="none";
 	insert_Make_Block_Attdef.block_line_weight="thin";
 	insert_Make_Block_Attdef.block_color_attdef="green";
@@ -172,7 +176,7 @@
 	insert_Make_Block_Attribute.Name_insert=Name_insert;
 	insert_Make_Block_Attribute.Insert_block_nr=Insert_block_nr;
 
-	insert_Make_Block_Attribute.block_color="green";
+	insert_Make_Block_Attribute.block_color=dxf_insert_block_color;//"green";
 	insert_Make_Block_Attribute.block_filling="none";
 	insert_Make_Block_Attribute.block_line_weight="thin";
 	insert_Make_Block_Attribute.block_rotate="true";
@@ -190,7 +194,7 @@
 	insert_Make_Block_Text.Name_insert=Name_insert;
 	insert_Make_Block_Text.Insert_block_nr=Insert_block_nr;
 
-	insert_Make_Block_Text.block_color="green";
+	insert_Make_Block_Text.block_color=dxf_insert_block_color;//"green";
 	insert_Make_Block_Text.block_filling="none";
 	insert_Make_Block_Text.block_line_weight="thin";
 
@@ -199,13 +203,43 @@
 
 	/* Block INSERT */
 
+	insert_Make_Block_insert.x_base=x_insert;
+	insert_Make_Block_insert.y_base=y_insert;
+	insert_Make_Block_insert.Name_insert2=Name_insert;
+	insert_Make_Block_insert.Count_entitie_insert=DXF_main_base[0].dxf_block_item_count;
+	insert_Make_Block_insert.dxf_insert_block_color=DXF_main_base[0].dxf_insert_block_color;
+	//=DXF_main_base[0].DXF_entities_insert_count;
 
+	if(DXF_main_base[0].DXF_block_insert_count[Insert_block_nr]==0)
+	{
 
+	}
+	else
+	{
+		//Flag_Block_insert=1;
+		Flag_Entitie_block_insert=0;
+	}
+
+
+	if (Flag_Entitie_block_insert==0)
+	{
+		//insert_Make_Block_Entitie_insert.fla
+		Result_insert.append(insert_Make_Block_insert.Make_Block_Insert());
+		Flag_Entitie_block_insert=1;
+	}
+	else
+	{
+
+
+		//Result_insert.append(insert_Make_Block_insert.Make_Block_Insert());
+
+	}
+
 	/* end of block */
 
-	Count_lines=Count_lines+1;
 
 
 
+
 return Result_insert;
 }

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_entitie_insert.h
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_entitie_insert.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_entitie_insert.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -4,10 +4,24 @@
 #include <QWidget>
 
 #include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
 #include "src/qet_base_types/baseelmt.h"
-#include "dxftoqet_mainwindow.h"
-#include "ui_dxftoqet_mainwindow.h"
 
+#include "src/dxf_block/dxf_block_entitie_insert.h"
+#include "src/dxf_block/dxf_block_arc.h"
+#include "src/dxf_block/dxf_block_circle.h"
+#include "src/dxf_block/dxf_block_ellipse.h"
+#include "src/dxf_block/dxf_block_lines.h"
+#include "src/dxf_block/dxf_block_polyline.h"
+#include "src/dxf_block/dxf_block_lwpolyline.h"
+#include "src/dxf_block/dxf_block_attdef.h"
+#include "src/dxf_block/dxf_block_attribute.h"
+#include "src/dxf_block/dxf_block_text.h"
+#include "src/dxf_block/dxf_block_insert.h"
+
+//#include "dxftoqet_mainwindow.h"
+//#include "ui_dxftoqet_mainwindow.h"
+
 class dxf_block_entitie_insert : public QWidget
 {
 	Q_OBJECT
@@ -25,13 +39,16 @@
 	QString block_color_attribute;
 
 
+	QString dxf_insert_block_color;
+	QString dxf_insert_color;
 
-
 	int Count_lines;
 	int Count_entitie_insert;
 	int Insert_block_nr;
 	int Block_counter;
 
+	int Flag_Entitie_block_insert;
+	int Flag_Block_insert;
 
 	double x_insert;
 	double y_insert;

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_insert.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_insert.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_insert.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,21 +1,24 @@
 #include "dxf_block_insert.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_block_line DXF_input_block_line[100][50];
-extern struct DXF_block_arc DXF_input_block_arc[100][50];
-extern struct DXF_block_attdef DXF_input_block_attdef[100][50];
-extern struct DXF_block_attrib DXF_input_block_attrib[100][50];
-extern struct DXF_block_circle DXF_input_block_circle[100][50];
-extern struct DXF_block_ellipse DXF_input_block_ellipse[100][50];
-extern struct DXF_block_attdef DXF_input_block_attdef[100][50];
-extern struct DXF_block_attrib DXF_input_block_attrib[100][50];
-extern struct DXF_block_lwpolyline DXF_input_block_lwpolyline[100][50];
-extern struct DXF_block_point DXF_input_block_point[100][50];
-extern struct DXF_block_polyline DXF_input_block_polyline[100][50];
-extern struct DXF_block_seqend DXF_input_block_seqend[100][50];
-extern struct DXF_block_text DXF_input_block_text[100][50];
-extern struct DXF_block_vertex DXF_input_block_vertex[100][500];
+extern struct DXF_block_line DXF_input_block_line[200][100];
+extern struct DXF_block_arc DXF_input_block_arc[200][100];
+extern struct DXF_block_attdef DXF_input_block_attdef[200][100];
+extern struct DXF_block_attrib DXF_input_block_attrib[200][100];
+extern struct DXF_block_circle DXF_input_block_circle[200][100];
+extern struct DXF_block_ellipse DXF_input_block_ellipse[200][100];
+extern struct DXF_block_attdef DXF_input_block_attdef[200][100];
+extern struct DXF_block_attrib DXF_input_block_attrib[200][100];
+extern struct DXF_block_lwpolyline DXF_input_block_lwpolyline[200][100];
+extern struct DXF_block_point DXF_input_block_point[200][100];
+extern struct DXF_block_polyline DXF_input_block_polyline[200][100];
+extern struct DXF_block_seqend DXF_input_block_seqend[200][100];
+extern struct DXF_block_text DXF_input_block_text[200][100];
+extern struct DXF_block_vertex DXF_input_block_vertex[200][500];
 
 extern struct DXF_entities_insert DXF_input_entities_insert[1000];
 
@@ -23,16 +26,27 @@
 
 dxf_block_insert::dxf_block_insert(QWidget *parent): QWidget(parent)
 {
-
+	x_insert2=0;
+	y_insert2=0;
+	x_insert_scale2=1;
+	y_insert_scale2=1;
+	x_base=0;
+	y_base=0;
 }
 
 QString dxf_block_insert::Make_Block_Insert()
 {
 
+	dxf_block_entitie_insert insert_Make_Block_Entitie_insert;
+
 	Result_insert2="";
 
 	Count_lines3=0;
 
+	Insert_block_nr2=0;
+
+	//DXF_main_base[0].DXF_block_insert_count[Block_nr]!=0
+
 	while (Count_lines3<=Count_entitie_insert)
 	{
 
@@ -43,24 +57,17 @@
 	  }
 	  else
 	  {
+		  //Insert_block_nr2=Count_lines3;
 
-		  x_insert2=0;
-		  y_insert2=0;
-		  x_insert_scale2=1;
-		  y_insert_scale2=1;
-
-
-		  Insert_block_nr2=Count_lines3;
-
-		  x_insert2=DXF_input_entities_insert[Count_lines3].DXF_entities_insert_code_10;
-		  y_insert2=DXF_input_entities_insert[Count_lines3].DXF_entities_insert_code_20;
+		  x_insert2=x_base+DXF_input_entities_insert[Count_lines3].DXF_entities_insert_code_10;
+		  y_insert2=y_base+(-DXF_input_entities_insert[Count_lines3].DXF_entities_insert_code_20);
 		  x_insert_scale2=DXF_input_entities_insert[Count_lines3].DXF_entities_insert_code_41;
 		  y_insert_scale2=DXF_input_entities_insert[Count_lines3].DXF_entities_insert_code_42;
 
 		  xy_rotation2=DXF_input_entities_insert[Count_lines3].DXF_entities_insert_code_50;
 		  Name_insert2=DXF_input_entities_insert[Count_lines3].DXF_entities_insert_code_2;
 
-		  for (Block_counter2=0;Block_counter2<=Count_entitie_insert;Block_counter2++)
+		  for (Block_counter2=1;Block_counter2<=Count_entitie_insert;Block_counter2++)
 		  {
 			  if(Name_insert2==DXF_input_table_block_record[Block_counter2].dxf_table_block_record_code_2)
 			  {
@@ -71,48 +78,37 @@
 
 		  }
 
+		  if  (Insert_block_nr2==0)
+		  {
+			  Count_lines3=Count_lines3+1;
+		  }
+		  else
+		  {
 
+			  //Insert_block_nr2=Count_lines3;
 
-		  /* Block LINES */
 
-		  //Result_insert2.append(Make_Block_LINES());
+			  insert_Make_Block_Entitie_insert.x_insert=x_insert2;
+			  insert_Make_Block_Entitie_insert.y_insert=y_insert2;
+			  insert_Make_Block_Entitie_insert.x_insert_scale=x_insert_scale2;
+			  insert_Make_Block_Entitie_insert.y_insert_scale=y_insert_scale2;
+			  insert_Make_Block_Entitie_insert.xy_rotation=xy_rotation2;
+			  insert_Make_Block_Entitie_insert.Insert_block_nr=Insert_block_nr2;
+			  insert_Make_Block_Entitie_insert.Name_insert=Name_insert2;
+			  insert_Make_Block_Entitie_insert.dxf_insert_block_color=DXF_main_base[0].dxf_insert_block_color;
 
-		  /* Block ARC */
+			  insert_Make_Block_Entitie_insert.Flag_Block_insert=Flag_Block_insert;
+			  insert_Make_Block_Entitie_insert.Flag_Entitie_block_insert=Flag_Entitie_block_insert;
 
-		  //Result_insert2.append(Make_Block_ARC());
+			  Result_insert2.append(insert_Make_Block_Entitie_insert.Make_Block_Entitie_Insert());
 
-		  /* Block CIRCLE */
+			  Count_lines3=Count_lines3+1;
 
-		  //Result_insert2.append(Make_Block_CIRCLE());
 
-		  /* Block ELLIPSE */
+			}
 
-		  //Result_insert2.append(Make_block_ELLIPSE());
 
-		  /* Block POLYLINE */
 
-		  //Result_insert2.append(Make_Block_POLYLINE());
-
-		  /* Block LWPOLYLINE */
-
-		  //Result_insert2.append(Make_Block_LWPOLYLINE());
-
-		  /* Block ATTDEF */
-
-		  //Result_insert2.append(Make_Block_ATTDEF());
-
-		  /* Block ATTRIB*/
-
-		 // Result_insert2.append(Make_Block_ATTR());
-
-		  /* Block TEXT*/
-
-		  //Result_insert2.append(Make_Block_TEXT());
-
-		  /* end of block */
-
-		  //Count_lines2=Count_lines2+1;
-
 	  }
 
 

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_insert.h
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_insert.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_insert.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,9 +5,10 @@
 #include <QWidget>
 
 #include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
 #include "src/qet_base_types/baseelmt.h"
-#include "dxftoqet_mainwindow.h"
-#include "ui_dxftoqet_mainwindow.h"
+//#include "dxftoqet_mainwindow.h"
+//#include "ui_dxftoqet_mainwindow.h"
 #include "src/dxf_block/dxf_block_entitie_insert.h"
 
 class dxf_block_insert : public QWidget // QMainWindow
@@ -19,14 +20,22 @@
 	QString Result_insert2;
 	QString Name_insert2;
 
+	QString dxf_insert_block_color;
 
 	int Count_lines3;
 	int Count_entitie_insert;
 	int Insert_block_nr2;
 	int Block_counter2;
 	int Count_lines2;
+	int Block_nr;
 
+	int Flag_Entitie_block_insert;
+	int Flag_Block_insert;
 
+
+	double x_base;
+	double y_base;
+
 	double x_insert2;
 	double y_insert2;
 	double x_insert_scale2;

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_lines.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_lines.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_lines.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,7 +1,10 @@
 #include "dxf_block_lines.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_block_line DXF_input_block_line[100][50];
+extern struct DXF_block_line DXF_input_block_line[200][5000];
 
 dxf_block_lines::dxf_block_lines(QWidget *parent) : QWidget(parent)
 {

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_lines.h
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_lines.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_lines.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #include <QWidget>
 #include "src/dxf/dxf_line.h"
 #include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
 #include "src/qet_base_types/baseelmt.h"
 
 class dxf_block_lines : public QWidget // QMainWindow

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_lwpolyline.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_lwpolyline.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_lwpolyline.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,7 +1,10 @@
 #include "dxf_block_lwpolyline.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_block_lwpolyline DXF_input_block_lwpolyline[100][50];
+extern struct DXF_block_lwpolyline DXF_input_block_lwpolyline[200][100];
 
 
 dxf_block_lwpolyline::dxf_block_lwpolyline(QWidget *parent) : QWidget(parent)
@@ -18,6 +21,7 @@
 
 	Count_lines_block2=0;
 	Count_lines2=0;
+	count_vertex=1;
 
 	Result_Block_lwpolyline="";
 

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_lwpolyline.h
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_lwpolyline.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_lwpolyline.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -4,6 +4,7 @@
 //#include <QMainWindow>
 #include "src/dxf/dxf_lwpolyline.h"
 #include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
 #include "src/qet_base_types/baseelmt.h"
 
 class dxf_block_lwpolyline : public QWidget // QMainWindow

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_polyline.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_polyline.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_polyline.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,8 +1,11 @@
 #include "dxf_block_polyline.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_block_polyline DXF_input_block_polyline[100][50];
-extern struct DXF_block_vertex DXF_input_block_vertex[100][500];
+extern struct DXF_block_polyline DXF_input_block_polyline[200][100];
+extern struct DXF_block_vertex DXF_input_block_vertex[200][500];
 
 dxf_block_polyline::dxf_block_polyline(QWidget *parent) : QWidget(parent)
 {
@@ -31,7 +34,7 @@
 		   for(counter_x=1;counter_x<=Polyline_vertex;counter_x++)
 		   {
 
-			   for (int clean=0;clean>=49;clean++)
+			   for (int clean=0;clean>=499;clean++)
 			   {
 					dxb_polyline2.x_vector[clean]=0;
 					dxb_polyline2.y_vector[clean]=0;
@@ -44,10 +47,10 @@
 				dxb_polyline2.y_vector[count_vertex2]=(-y_insert)+(-DXF_input_block_vertex[Insert_block_nr][counter_x].DXF_block_vertex_code_20);
 				count_vertex2=count_vertex2+1;
 			   }
-			   if (count_vertex2>49)
+			   if (count_vertex2>499)
 			   {
 				   counter_x=Polyline_vertex+1;
-				   count_vertex2=49;
+				   count_vertex2=499;
 			   }
 			   if (count_vertex2>Polyline_vertex)
 			   {

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_polyline.h
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_polyline.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_polyline.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #include <QWidget>
 #include "src/dxf/dxf_polyline.h"
 #include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
 #include "src/qet_base_types/baseelmt.h"
 
 class dxf_block_polyline : public QWidget // QMainWindow

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_text.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_text.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_text.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,7 +1,10 @@
 #include "dxf_block_text.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_block_text DXF_input_block_text[100][50];
+extern struct DXF_block_text DXF_input_block_text[200][100];
 
 dxf_block_text::dxf_block_text(QWidget *parent) : QWidget(parent)
 {

Modified: branches/dxftoqet2/src/dxf_block/dxf_block_text.h
===================================================================
--- branches/dxftoqet2/src/dxf_block/dxf_block_text.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_block/dxf_block_text.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #include <QWidget>
 #include "src/dxf/dxf_text.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"
 

Modified: branches/dxftoqet2/src/dxf_control/dxf_layer_control.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_control/dxf_layer_control.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_control/dxf_layer_control.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,5 +1,8 @@
 #include "dxf_layer_control.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_table_layer DXF_input_table_layer[100];
 

Modified: branches/dxftoqet2/src/dxf_control/dxf_layer_control.h
===================================================================
--- branches/dxftoqet2/src/dxf_control/dxf_layer_control.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_control/dxf_layer_control.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -4,6 +4,7 @@
 //#include <QMainWindow>
 #include <QWidget>
 #include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
 
 class DXF_layer_control : public QWidget // QMainWindow
 {

Modified: branches/dxftoqet2/src/dxf_data.h
===================================================================
--- branches/dxftoqet2/src/dxf_data.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_data.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -4,6 +4,7 @@
 //#include <QObject>
 #include <QtCore>
 #include <QWidget>
+
 //#include <QtWidgets>
 
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_arc.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_arc.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_arc.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,5 +1,8 @@
 #include "dxf_entitie_arc.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_arc DXF_input_entities_arc[1000];
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_arc.h
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_arc.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_arc.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #include <QWidget>
 #include "src/dxf/dxf_arc.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"
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_attdef.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_attdef.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_attdef.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,5 +1,8 @@
 #include "dxf_entitie_attdef.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_attdef DXF_input_entities_attdef[1000];
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_attdef.h
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_attdef.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_attdef.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #include <QWidget>
 #include "src/dxf/dxf_attdef.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"
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_attrinute.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_attrinute.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_attrinute.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,5 +1,8 @@
 #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[1000];
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_attrinute.h
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_attrinute.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_attrinute.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #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"
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_circle.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_circle.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_circle.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,5 +1,8 @@
 #include "dxf_entitie_circle.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_circle DXF_input_entities_circle[1000];
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_circle.h
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_circle.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_circle.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #include <QWidget>
 #include "src/dxf/dxf_circle.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"
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_ellipse.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_ellipse.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_ellipse.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,5 +1,8 @@
 #include "dxf_entitie_ellipse.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_ellipse DXF_input_entities_ellipse[1000];
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_ellipse.h
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_ellipse.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_ellipse.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #include <QWidget>
 #include "src/dxf/dxf_ellipse.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"
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_input.h
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_input.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_input.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -3,6 +3,7 @@
 
 #include <QWidget>
 #include "src/dxf/dxf_attdef.h"
+#include "src/dxf_table_size.h"
 
 class dxf_entitie_input : public QWidget
 {

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_insert.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_insert.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_insert.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,21 +1,24 @@
 #include "dxf_entitie_insert.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_block_line DXF_input_block_line[100][50];
-extern struct DXF_block_arc DXF_input_block_arc[100][50];
-extern struct DXF_block_attdef DXF_input_block_attdef[100][50];
-extern struct DXF_block_attrib DXF_input_block_attrib[100][50];
-extern struct DXF_block_circle DXF_input_block_circle[100][50];
-extern struct DXF_block_ellipse DXF_input_block_ellipse[100][50];
-extern struct DXF_block_attdef DXF_input_block_attdef[100][50];
-extern struct DXF_block_attrib DXF_input_block_attrib[100][50];
-extern struct DXF_block_lwpolyline DXF_input_block_lwpolyline[100][50];
-extern struct DXF_block_point DXF_input_block_point[100][50];
-extern struct DXF_block_polyline DXF_input_block_polyline[100][50];
-extern struct DXF_block_seqend DXF_input_block_seqend[100][50];
-extern struct DXF_block_text DXF_input_block_text[100][50];
-extern struct DXF_block_vertex DXF_input_block_vertex[100][500];
+extern struct DXF_block_line DXF_input_block_line[200][100];
+extern struct DXF_block_arc DXF_input_block_arc[200][100];
+extern struct DXF_block_attdef DXF_input_block_attdef[200][100];
+extern struct DXF_block_attrib DXF_input_block_attrib[200][100];
+extern struct DXF_block_circle DXF_input_block_circle[200][100];
+extern struct DXF_block_ellipse DXF_input_block_ellipse[200][100];
+extern struct DXF_block_attdef DXF_input_block_attdef[200][100];
+extern struct DXF_block_attrib DXF_input_block_attrib[200][100];
+extern struct DXF_block_lwpolyline DXF_input_block_lwpolyline[200][100];
+extern struct DXF_block_point DXF_input_block_point[200][100];
+extern struct DXF_block_polyline DXF_input_block_polyline[200][100];
+extern struct DXF_block_seqend DXF_input_block_seqend[200][100];
+extern struct DXF_block_text DXF_input_block_text[200][100];
+extern struct DXF_block_vertex DXF_input_block_vertex[200][500];
 
 extern struct DXF_entities_insert DXF_input_entities_insert[1000];
 
@@ -31,17 +34,10 @@
 {
 	Result_insert="";
 
-	Count_lines=0;
+	Count_lines=1;
 
-	dxf_block_lines insert_Make_Block_Lines;
-	dxf_block_arc insert_Make_Block_Arc;
-	dxf_block_circle insert_Make_Block_Circle;
-	dxf_block_ellipse insert_Make_Block_Ellipse;
-	dxf_block_polyline insert_Make_Block_Polyline;
-	dxf_block_lwpolyline insert_Make_Block_Lwpolyline;
-	dxf_block_attdef insert_Make_Block_Attdef;
-	dxf_block_attribute insert_Make_Block_Attribute;
-	dxf_block_text insert_Make_Block_Text;
+	Insert_block_nr=0;
+
 	dxf_block_entitie_insert insert_Make_Block_Entitie_insert;
 
 	while (Count_lines<=Count_entitie_insert)
@@ -61,7 +57,7 @@
 		  y_insert_scale=1;
 
 
-		  Insert_block_nr=Count_lines;
+		  Insert_block_nr=Count_lines+1;
 
 		  x_insert=DXF_input_entities_insert[Count_lines].DXF_entities_insert_code_10;
 		  y_insert=DXF_input_entities_insert[Count_lines].DXF_entities_insert_code_20;
@@ -71,7 +67,7 @@
 		  xy_rotation=DXF_input_entities_insert[Count_lines].DXF_entities_insert_code_50;
 		  Name_insert=DXF_input_entities_insert[Count_lines].DXF_entities_insert_code_2;
 
-		  for (Block_counter=0;Block_counter<=Count_entitie_insert;Block_counter++)
+		  for (Block_counter=1;Block_counter<=Count_entitie_insert;Block_counter++)
 		  {
 			  if(Name_insert==DXF_input_table_block_record[Block_counter].dxf_table_block_record_code_2)
 			  {
@@ -82,188 +78,34 @@
 
 		  }
 
+			if (Insert_block_nr==0)
+			{
+				Count_lines=Count_lines+1;
+			}
+			else
+			{
 
-/*
-		  // Block LINES
+				insert_Make_Block_Entitie_insert.x_insert=x_insert;
+				insert_Make_Block_Entitie_insert.y_insert=y_insert;
+				insert_Make_Block_Entitie_insert.x_insert_scale=x_insert_scale;
+				insert_Make_Block_Entitie_insert.y_insert_scale=y_insert_scale;
+				insert_Make_Block_Entitie_insert.xy_rotation=xy_rotation;
+				insert_Make_Block_Entitie_insert.Insert_block_nr=Insert_block_nr;
+				insert_Make_Block_Entitie_insert.Name_insert=Name_insert;
 
-		  insert_Make_Block_Lines.x_insert=x_insert;
-		  insert_Make_Block_Lines.y_insert=y_insert;
-		  insert_Make_Block_Lines.x_insert_scale=x_insert_scale;
-		  insert_Make_Block_Lines.y_insert_scale=y_insert_scale;
-		  insert_Make_Block_Lines.xy_rotation=xy_rotation;
-		  insert_Make_Block_Lines.Name_insert=Name_insert;
-		  insert_Make_Block_Lines.Insert_block_nr=Insert_block_nr;
+				insert_Make_Block_Entitie_insert.dxf_insert_block_color=DXF_main_base[0].dxf_block_color;
+				//insert_Make_Block_Entitie_insert.dxf_insert_color=DXF_main_base[0].dxf_block_color;
+				insert_Make_Block_Entitie_insert.Flag_Block_insert=Flag_Block_insert;
+				insert_Make_Block_Entitie_insert.Flag_Entitie_block_insert=Flag_Entitie_block_insert;
 
-		  insert_Make_Block_Lines.block_color="green";
-		  insert_Make_Block_Lines.block_filling="none";
-		  insert_Make_Block_Lines.block_line_weight="thin";
+				Result_insert.append(insert_Make_Block_Entitie_insert.Make_Block_Entitie_Insert());
 
+				Count_lines=Count_lines+1;
+			}
 
-		  Result_insert.append(insert_Make_Block_Lines.Make_Block_Lines());
+		}
 
-		  // Block ARC
-
-		  insert_Make_Block_Arc.x_insert=x_insert;
-		  insert_Make_Block_Arc.y_insert=y_insert;
-		  insert_Make_Block_Arc.x_insert_scale=x_insert_scale;
-		  insert_Make_Block_Arc.y_insert_scale=y_insert_scale;
-		  insert_Make_Block_Arc.xy_rotation=xy_rotation;
-		  insert_Make_Block_Arc.Name_insert=Name_insert;
-		  insert_Make_Block_Arc.Insert_block_nr=Insert_block_nr;
-
-		  insert_Make_Block_Arc.block_color="green";
-		  insert_Make_Block_Arc.block_filling="none";
-		  insert_Make_Block_Arc.block_line_weight="thin";
-		  insert_Make_Block_Arc.block_antialias="false";
-
-		  Result_insert.append(insert_Make_Block_Arc.Make_Block_Arc());
-
-		  // Block CIRCLE
-
-		  insert_Make_Block_Circle.x_insert=x_insert;
-		  insert_Make_Block_Circle.y_insert=y_insert;
-		  insert_Make_Block_Circle.x_insert_scale=x_insert_scale;
-		  insert_Make_Block_Circle.y_insert_scale=y_insert_scale;
-		  insert_Make_Block_Circle.xy_rotation=xy_rotation;
-		  insert_Make_Block_Circle.Name_insert=Name_insert;
-		  insert_Make_Block_Circle.Insert_block_nr=Insert_block_nr;
-
-		  insert_Make_Block_Circle.block_color="green";
-		  insert_Make_Block_Circle.block_filling="none";
-		  insert_Make_Block_Circle.block_line_weight="thin";
-		  insert_Make_Block_Circle.block_antialias="false";
-
-		  Result_insert.append(insert_Make_Block_Circle.Make_Block_Circle());
-
-		  // Block ELLIPSE
-
-		  insert_Make_Block_Ellipse.x_insert=x_insert;
-		  insert_Make_Block_Ellipse.y_insert=y_insert;
-		  insert_Make_Block_Ellipse.x_insert_scale=x_insert_scale;
-		  insert_Make_Block_Ellipse.y_insert_scale=y_insert_scale;
-		  insert_Make_Block_Ellipse.xy_rotation=xy_rotation;
-		  insert_Make_Block_Ellipse.Name_insert=Name_insert;
-		  insert_Make_Block_Ellipse.Insert_block_nr=Insert_block_nr;
-
-		  insert_Make_Block_Ellipse.block_color="green";
-		  insert_Make_Block_Ellipse.block_filling="none";
-		  insert_Make_Block_Ellipse.block_line_weight="thin";
-		  insert_Make_Block_Ellipse.block_antialias="false";
-
-
-		  Result_insert.append(insert_Make_Block_Ellipse.Make_Block_Ellipse());
-
-		  // Block POLYLINE
-
-		  insert_Make_Block_Polyline.x_insert=x_insert;
-		  insert_Make_Block_Polyline.y_insert=y_insert;
-		  insert_Make_Block_Polyline.x_insert_scale=x_insert_scale;
-		  insert_Make_Block_Polyline.y_insert_scale=y_insert_scale;
-		  insert_Make_Block_Polyline.xy_rotation=xy_rotation;
-		  insert_Make_Block_Polyline.Name_insert=Name_insert;
-		  insert_Make_Block_Polyline.Insert_block_nr=Insert_block_nr;
-
-		  insert_Make_Block_Polyline.block_color="cyan";
-		  insert_Make_Block_Polyline.block_filling="none";
-		  insert_Make_Block_Polyline.block_line_weight="thin";
-		  insert_Make_Block_Polyline.block_line_style="normal";
-
-		  Result_insert.append(insert_Make_Block_Polyline.Make_Block_Polyline());
-
-		  // Block LWPOLYLINE
-
-		  insert_Make_Block_Lwpolyline.x_insert=x_insert;
-		  insert_Make_Block_Lwpolyline.y_insert=y_insert;
-		  insert_Make_Block_Lwpolyline.x_insert_scale=x_insert_scale;
-		  insert_Make_Block_Lwpolyline.y_insert_scale=y_insert_scale;
-		  insert_Make_Block_Lwpolyline.xy_rotation=xy_rotation;
-		  insert_Make_Block_Lwpolyline.Name_insert=Name_insert;
-		  insert_Make_Block_Lwpolyline.Insert_block_nr=Insert_block_nr;
-
-		  insert_Make_Block_Lwpolyline.block_color="orange";
-		  insert_Make_Block_Lwpolyline.block_filling="none";
-		  insert_Make_Block_Lwpolyline.block_line_weight="thin";
-		  insert_Make_Block_Lwpolyline.block_line_style="normal";
-
-		  Result_insert.append(insert_Make_Block_Lwpolyline.Make_Block_Lwpolyline());
-
-		  // Block ATTDEF
-
-		  insert_Make_Block_Attdef.x_insert=x_insert;
-		  insert_Make_Block_Attdef.y_insert=y_insert;
-		  insert_Make_Block_Attdef.x_insert_scale=x_insert_scale;
-		  insert_Make_Block_Attdef.y_insert_scale=y_insert_scale;
-		  insert_Make_Block_Attdef.xy_rotation=xy_rotation;
-		  insert_Make_Block_Attdef.Name_insert=Name_insert;
-		  insert_Make_Block_Attdef.Insert_block_nr=Insert_block_nr;
-
-		  insert_Make_Block_Attdef.block_color="green";
-		  insert_Make_Block_Attdef.block_filling="none";
-		  insert_Make_Block_Attdef.block_line_weight="thin";
-		  insert_Make_Block_Attdef.block_color_attdef="green";
-
-		  Result_insert.append(insert_Make_Block_Attdef.Make_Block_Attdef());
-
-		  // Block ATTRIB
-
-		  insert_Make_Block_Attribute.x_insert=x_insert;
-		  insert_Make_Block_Attribute.y_insert=y_insert;
-		  insert_Make_Block_Attribute.x_insert_scale=x_insert_scale;
-		  insert_Make_Block_Attribute.y_insert_scale=y_insert_scale;
-		  insert_Make_Block_Attribute.xy_rotation=xy_rotation;
-		  insert_Make_Block_Attribute.Name_insert=Name_insert;
-		  insert_Make_Block_Attribute.Insert_block_nr=Insert_block_nr;
-
-		  insert_Make_Block_Attribute.block_color="green";
-		  insert_Make_Block_Attribute.block_filling="none";
-		  insert_Make_Block_Attribute.block_line_weight="thin";
-		  insert_Make_Block_Attribute.block_rotate="true";
-		  insert_Make_Block_Attribute.block_color_attrib="green";
-
-		  Result_insert.append(insert_Make_Block_Attribute.Make_Block_Attri());
-
-		  // Block TEXT
-
-		  insert_Make_Block_Text.x_insert=x_insert;
-		  insert_Make_Block_Text.y_insert=y_insert;
-		  insert_Make_Block_Text.x_insert_scale=x_insert_scale;
-		  insert_Make_Block_Text.y_insert_scale=y_insert_scale;
-		  insert_Make_Block_Text.xy_rotation=xy_rotation;
-		  insert_Make_Block_Text.Name_insert=Name_insert;
-		  insert_Make_Block_Text.Insert_block_nr=Insert_block_nr;
-
-		  insert_Make_Block_Text.block_color="green";
-		  insert_Make_Block_Text.block_filling="none";
-		  insert_Make_Block_Text.block_line_weight="thin";
-
-
-		  Result_insert.append(insert_Make_Block_Text.Make_Block_Text());
-
-		  // Block INSERT
-
-
-
-		  // end of block
-
-		  Count_lines=Count_lines+1;
-
-	  }*/
-
-	insert_Make_Block_Entitie_insert.x_insert=x_insert;
-	insert_Make_Block_Entitie_insert.y_insert=y_insert;
-	insert_Make_Block_Entitie_insert.x_insert_scale=x_insert_scale;
-	insert_Make_Block_Entitie_insert.y_insert_scale=y_insert_scale;
-	insert_Make_Block_Entitie_insert.xy_rotation=xy_rotation;
-	insert_Make_Block_Entitie_insert.Insert_block_nr=Insert_block_nr;
-	insert_Make_Block_Entitie_insert.Name_insert=Name_insert;
-
-	Result_insert.append(insert_Make_Block_Entitie_insert.Make_Block_Entitie_Insert());
-
-	Count_lines=Count_lines+1;
-
 	}
-
-	}
 	return Result_insert;
 
 }

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_insert.h
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_insert.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_insert.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -15,6 +15,8 @@
 #include "src/dxf_block/dxf_block_text.h"
 #include "src/dxf_block/dxf_block_entitie_insert.h"
 
+#include "src/dxf_table_size.h"
+
 class dxf_entitie_insert : public QWidget // QMainWindow
 {
 	Q_OBJECT
@@ -29,6 +31,9 @@
 		int Insert_block_nr;
 		int Block_counter;
 
+		int Flag_Entitie_block_insert;
+		int Flag_Block_insert;
+
 		double x_insert;
 		double y_insert;
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_line.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_line.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_line.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,5 +1,8 @@
 #include "dxf_entitie_line.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_line DXF_input_entities_line[100000];
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_line.h
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_line.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_line.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #include <QWidget>
 #include "src/dxf/dxf_line.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"
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_lwpolyline.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_lwpolyline.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_lwpolyline.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,9 +1,11 @@
 #include "dxf_entitie_lwpolyline.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_lwpolyline DXF_input_entities_lwpolyline[1000];
-extern struct DXF_entities_vertex DXF_input_entities_vertex[5000];
+extern struct DXF_entities_vertex DXF_input_entities_vertex[50000];
 
 dxf_entitie_lwpolyline::dxf_entitie_lwpolyline(QWidget *parent) : QWidget(parent)
 {

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_lwpolyline.h
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_lwpolyline.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_lwpolyline.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #include <QWidget>
 #include "src/dxf/dxf_lwpolyline.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"
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_point.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_point.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_point.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,5 +1,8 @@
 #include "dxf_entitie_point.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_point DXF_input_entities_point[1000];
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_point.h
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_point.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_point.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -4,6 +4,7 @@
 #include <QWidget>
 #include "src/dxf/dxf_point.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"
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_polyline.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_polyline.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_polyline.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,8 +1,11 @@
 #include "dxf_entitie_polyline.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_polyline DXF_input_entities_polyline[1000];
-extern struct DXF_entities_vertex DXF_input_entities_vertex[5000];
+extern struct DXF_entities_vertex DXF_input_entities_vertex[50000];
 
 dxf_entitie_polyline::dxf_entitie_polyline(QWidget *parent) : QWidget(parent)
 {
@@ -26,7 +29,7 @@
    while (Count_lines<Count_entitie_polyline)
    {
 
-	  for(counter_x=0;counter_x<Polyline_vertex;counter_x++)
+	  for(counter_x=1;counter_x<Polyline_vertex;counter_x++)
 	  {
 
 		  if (DXF_input_entities_vertex[counter_x].Master_handle_id==DXF_input_entities_polyline[Count_lines].DXF_entities_polyline_code_5)

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_polyline.h
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_polyline.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_polyline.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #include <QWidget>
 #include "src/dxf/dxf_polyline.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"
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_terminal.h
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_terminal.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_terminal.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -3,6 +3,7 @@
 
 #include <QWidget>
 #include "src/dxf/dxf_point.h"
+#include "src/dxf_table_size.h"
 
 class dxf_entitie_terminal : public QWidget
 {

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_text.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_text.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_text.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,5 +1,8 @@
 #include "dxf_entitie_text.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_text DXF_input_entities_text[1000];
 

Modified: branches/dxftoqet2/src/dxf_entitie/dxf_entitie_text.h
===================================================================
--- branches/dxftoqet2/src/dxf_entitie/dxf_entitie_text.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_entitie/dxf_entitie_text.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 #include <QWidget>
 #include "src/dxf/dxf_text.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"
 

Modified: branches/dxftoqet2/src/dxf_load.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_load.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_load.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -4,6 +4,10 @@
 
 //extern int dxf ();
 
+extern struct ALG Max_alg;
+extern struct BLOCK Max_block;
+extern struct ENTITIE Max_entitie;
+
 extern struct DXF_header DXF_input_header[500];
 extern struct DXF_classes DXF_input_classes[1000];
 extern struct DXF_tables DXF_input_tables[20];
@@ -16,11 +20,12 @@
 extern struct DXF_table_ucs DXF_input_table_ucs[100];
 extern struct DXF_table_view DXF_input_table_view[100];
 extern struct DXF_table_vport DXF_input_table_vport[100];
-extern struct DXF_block DXF_input_block[100];
+extern struct DXF_block DXF_input_block[200];
+extern struct DXF_end_block DXF_input_end_block[200];
 
-extern struct DXF_end_block DXF_input_end_block[100];
-extern struct DXF_file_input DXF_input_entities[100000];
-extern struct DXF_file_input DXF_input_thumbnailimage[10000];
+//extern struct DXF_file_input DXF_input_entities[100000];
+//extern struct DXF_file_input DXF_input_thumbnailimage[10000];
+
 extern struct DXF_base DXF_main_base[1];
 
 

Modified: branches/dxftoqet2/src/dxf_load.h
===================================================================
--- branches/dxftoqet2/src/dxf_load.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_load.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -6,6 +6,7 @@
 #include <QWidget>
 //#include <QtWidgets>
 #include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
 #include "dxftoqet_mainwindow.h"
 #include "ui_dxftoqet_mainwindow.h"
 

Modified: branches/dxftoqet2/src/dxf_split.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_split.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_split.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -3,6 +3,10 @@
 //extern int dxf ();
 //extern const int Max_Blocks=500;
 
+extern struct ALG Max_alg;
+extern struct BLOCK Max_block;
+extern struct ENTITIE Max_entitie;
+
 extern struct DXF_header DXF_input_header[500];
 extern struct DXF_classes DXF_input_classes[1000];
 extern struct DXF_tables DXF_input_tables[20];
@@ -15,53 +19,53 @@
 extern struct DXF_table_ucs DXF_input_table_ucs[100];
 extern struct DXF_table_view DXF_input_table_view[100];
 extern struct DXF_table_vport DXF_input_table_vport[100];
-extern struct DXF_block DXF_input_block[100];
+extern struct DXF_block DXF_input_block[200];
 
-extern struct DXF_block_3dface DXF_input_block_3dface[100][50];
-extern struct DXF_block_3dsolid DXF_input_block_3dsolid[100][50];
-extern struct DXF_block_acad_proxy_entity DXF_input_block_proxy_entity[100][50];
-extern struct DXF_block_arc DXF_input_block_arc[100][50];
-extern struct DXF_block_attdef DXF_input_block_attdef[100][50];
-extern struct DXF_block_attrib DXF_input_block_attrib[100][50];
-extern struct DXF_block_body DXF_input_block_body[100][50];
-extern struct DXF_block_circle DXF_input_block_circle[100][50];
-extern struct DXF_block_dimension DXF_input_block_dimension[100][50];
-extern struct DXF_block_ellipse DXF_input_block_ellipse[100][50];
-extern struct DXF_block_hatch DXF_input_block_hatch[100][50];
-extern struct DXF_block_helix DXF_input_block_helix[100][50];
-extern struct DXF_block_image DXF_input_block_image[100][50];
-extern struct DXF_block_insert DXF_input_block_insert[100][50];
-extern struct DXF_block_leader DXF_input_block_leader[100][50];
-extern struct DXF_block_light DXF_input_block_light[100][50];
-extern struct DXF_block_line DXF_input_block_line[100][50];
-extern struct DXF_block_lwpolyline DXF_input_block_lwpolyline[100][50];
-extern struct DXF_block_mesh DXF_input_block_mesh[100][50];
-extern struct DXF_block_mline DXF_input_block_mline[100][50];
-extern struct DXF_block_mleaderstyle DXF_input_block_mleaderstyle[100][50];
-extern struct DXF_block_mleader DXF_input_block_mleader[100][50];
-extern struct DXF_block_mtext DXF_input_block_mtext[100][50];
-extern struct DXF_block_oleframe DXF_input_DXF_block_oleframe[100][50];
-extern struct DXF_block_ole2frame DXF_input_block_ole2frame[100][50];
-extern struct DXF_block_point DXF_input_block_point[100][50];
-extern struct DXF_block_polyline DXF_input_block_polyline[100][50];
-extern struct DXF_block_ray DXF_input_block_ray[100][50];
-extern struct DXF_block_region DXF_input_block_region[100][50];
-extern struct DXF_block_section DXF_input_block_section[100][50];
-extern struct DXF_block_seqend DXF_input_block_seqend[100][50];
-extern struct DXF_block_shape DXF_input_block_shape[100][50];
-extern struct DXF_block_solid DXF_input_block_solid[100][50];
-extern struct DXF_block_spline DXF_input_block_spline[100][50];
-extern struct DXF_block_sun DXF_input_block_sun[100][50];
-extern struct DXF_block_surface DXF_input_block_surface[100][50];
-extern struct DXF_block_table DXF_input_block_table[100][50];
-extern struct DXF_block_text DXF_input_block_text[100][50];
-extern struct DXF_block_tolerance DXF_input_block_tolerance[100][50];
-extern struct DXF_block_trace DXF_input_block_trace[100][50];
-extern struct DXF_block_underlay DXF_input_block_underlay[100][50];
-extern struct DXF_block_vertex DXF_input_block_vertex[100][500];
-extern struct DXF_block_viewport DXF_input_block_viewport[100][50];
-extern struct DXF_block_wipeout DXF_input_block_wipeout[100][50];
-extern struct DXF_block_xline DXF_input_block_xline[100][50];
+extern struct DXF_block_3dface DXF_input_block_3dface[200][100];
+extern struct DXF_block_3dsolid DXF_input_block_3dsolid[200][100];
+extern struct DXF_block_acad_proxy_entity DXF_input_block_proxy_entity[200][100];
+extern struct DXF_block_arc DXF_input_block_arc[200][100];
+extern struct DXF_block_attdef DXF_input_block_attdef[200][100];
+extern struct DXF_block_attrib DXF_input_block_attrib[200][100];
+extern struct DXF_block_body DXF_input_block_body[200][100];
+extern struct DXF_block_circle DXF_input_block_circle[200][100];
+extern struct DXF_block_dimension DXF_input_block_dimension[200][100];
+extern struct DXF_block_ellipse DXF_input_block_ellipse[200][100];
+extern struct DXF_block_hatch DXF_input_block_hatch[200][100];
+extern struct DXF_block_helix DXF_input_block_helix[200][100];
+extern struct DXF_block_image DXF_input_block_image[200][100];
+extern struct DXF_block_insert DXF_input_block_insert[200][100];
+extern struct DXF_block_leader DXF_input_block_leader[200][100];
+extern struct DXF_block_light DXF_input_block_light[200][100];
+extern struct DXF_block_line DXF_input_block_line[200][5000];
+extern struct DXF_block_lwpolyline DXF_input_block_lwpolyline[200][100];
+extern struct DXF_block_mesh DXF_input_block_mesh[200][100];
+extern struct DXF_block_mline DXF_input_block_mline[200][100];
+extern struct DXF_block_mleaderstyle DXF_input_block_mleaderstyle[200][100];
+extern struct DXF_block_mleader DXF_input_block_mleader[200][100];
+extern struct DXF_block_mtext DXF_input_block_mtext[200][100];
+extern struct DXF_block_oleframe DXF_input_DXF_block_oleframe[200][100];
+extern struct DXF_block_ole2frame DXF_input_block_ole2frame[200][100];
+extern struct DXF_block_point DXF_input_block_point[200][100];
+extern struct DXF_block_polyline DXF_input_block_polyline[200][100];
+extern struct DXF_block_ray DXF_input_block_ray[200][100];
+extern struct DXF_block_region DXF_input_block_region[200][100];
+extern struct DXF_block_section DXF_input_block_section[200][100];
+extern struct DXF_block_seqend DXF_input_block_seqend[200][100];
+extern struct DXF_block_shape DXF_input_block_shape[200][100];
+extern struct DXF_block_solid DXF_input_block_solid[200][100];
+extern struct DXF_block_spline DXF_input_block_spline[200][100];
+extern struct DXF_block_sun DXF_input_block_sun[200][100];
+extern struct DXF_block_surface DXF_input_block_surface[200][100];
+extern struct DXF_block_table DXF_input_block_table[200][100];
+extern struct DXF_block_text DXF_input_block_text[200][100];
+extern struct DXF_block_tolerance DXF_input_block_tolerance[200][100];
+extern struct DXF_block_trace DXF_input_block_trace[200][100];
+extern struct DXF_block_underlay DXF_input_block_underlay[200][100];
+extern struct DXF_block_vertex DXF_input_block_vertex[200][500];
+extern struct DXF_block_viewport DXF_input_block_viewport[200][100];
+extern struct DXF_block_wipeout DXF_input_block_wipeout[200][100];
+extern struct DXF_block_xline DXF_input_block_xline[200][100];
 
 extern struct DXF_entities_3dface DXF_input_entities_3dface[1000];
 extern struct DXF_entities_3dsolid DXF_input_entities_3dsolid[1000];
@@ -104,15 +108,15 @@
 extern struct DXF_entities_tolerance DXF_input_entities_tolerance[1000];
 extern struct DXF_entities_trace DXF_input_entities_trace[1000];
 extern struct DXF_entities_underlay DXF_input_entities_underlay[1000];
-extern struct DXF_entities_vertex DXF_input_entities_vertex[5000];
+extern struct DXF_entities_vertex DXF_input_entities_vertex[50000];
 extern struct DXF_entities_viewport DXF_input_entities_viewport[1000];
 extern struct DXF_entities_wipeout DXF_input_entities_wipeout[1000];
 extern struct DXF_entities_xline DXF_input_entities_xline[1000];
 
 
-extern struct DXF_end_block DXF_input_end_block[1000];
-extern struct DXF_file_input DXF_input_entities[100000];
-extern struct DXF_file_input DXF_input_thumbnailimage[10000];
+extern struct DXF_end_block DXF_input_end_block[200];
+//extern struct DXF_file_input DXF_input_entities[100000];
+//extern struct DXF_file_input DXF_input_thumbnailimage[10000];
 extern struct DXF_base DXF_main_base[1];
 
 
@@ -8177,7 +8181,7 @@
 						count_block_100=0;
 						count_block_102=0;
 
-						while (block_st1==0 and block_count1<99) // count the number of blocks
+						while (block_st1==0 and block_count1<Max_alg.DXF_input_block) // count the number of blocks
 						{
 							for_count1=for_count1+2;
 
@@ -8229,7 +8233,7 @@
 
 												}
 
-												while (block_st3==0 and block_count1<99)
+												while (block_st3==0 and block_count1<Max_alg.DXF_input_end_block)
 												{
 													for_count1=for_count1+2;
 													line5=DXF_main_base[0].dxf_input[for_count1].toInt();
@@ -8240,7 +8244,7 @@
 
 														case 0:
 
-															Log_1.append ("<BLOCK section n°: ");
+															Log_1.append ("<END BLOCK section n°: ");
 															Log_1.append (QString::number(block_count1));
 															Log_1.append (">\n");
 
@@ -8431,7 +8435,7 @@
 													block_count5=0;
 
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_3dface-1))
 													{
 
 														for_count1=for_count1+2;
@@ -8471,7 +8475,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_3dsolid-1))
 													{
 
 														for_count1=for_count1+2;
@@ -8512,7 +8516,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_acad_proxy_entity-1))
 													{
 
 														for_count1=for_count1+2;
@@ -8565,7 +8569,7 @@
 													count_block_arc_102=0;
 													count_block_arc_330=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_arc-1))
 													{
 
 														for_count1=for_count1+2;
@@ -9200,7 +9204,7 @@
 													count_block_attdef_24=0;
 													count_block_attdef_100=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_attdef-1))
 													{
 
 														for_count1=for_count1+2;
@@ -9817,7 +9821,7 @@
 													count_block_attrib_24=0;
 													count_block_attrib_100=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_attrib-1))
 													{
 
 														for_count1=for_count1+2;
@@ -10425,7 +10429,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_body-1))
 													{
 
 														for_count1=for_count1+2;
@@ -10478,7 +10482,7 @@
 													count_block_circle_102=0;
 													count_block_circle_330=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_circle-1))
 													{
 
 														for_count1=for_count1+2;
@@ -11099,7 +11103,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_dimension-1))
 													{
 
 														for_count1=for_count1+2;
@@ -11140,7 +11144,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_ellipse-1))
 													{
 
 														for_count1=for_count1+2;
@@ -11777,7 +11781,7 @@
 													count_block_hatch_330=0;
 
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_hatch-1))
 													{
 
 														for_count1=for_count1+2;
@@ -12491,7 +12495,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_helix-1))
 													{
 
 														for_count1=for_count1+2;
@@ -12545,7 +12549,7 @@
 													count_block_image_100=0;
 
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_image-1))
 													{
 
 														for_count1=for_count1+2;
@@ -13050,6 +13054,8 @@
 													count_block_insert_102=0;
 													count_block_insert_330=0;
 
+													count_block_insert_1000=0;
+													count_block_insert_1001=0;
 													count_block_insert_1002=0;
 													count_block_insert_1010=0;
 													count_block_insert_1011=0;
@@ -13067,7 +13073,7 @@
 													count_block_insert_1071=0;
 
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_insert-1))
 													{
 
 														for_count1=for_count1+2;
@@ -13688,7 +13694,7 @@
 
 															case 1000:
 
-																if (count_block_insert_1000>29)
+																if (count_block_insert_1000>29 )
 																{
 																	Log_1.append(found_block_insert());
 																}
@@ -13866,7 +13872,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_leader-1))
 													{
 
 														for_count1=for_count1+2;
@@ -13907,7 +13913,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_light-1))
 													{
 
 														for_count1=for_count1+2;
@@ -13964,7 +13970,7 @@
 													count_block_line_102=0;
 													count_block_line_330=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_line-1))
 													{
 
 														for_count1=for_count1+2;
@@ -14239,7 +14245,7 @@
 													count_block_lwpolyline_102=0;
 													count_block_lwpolyline_330=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_lwpolyline-1))
 													{
 
 														for_count1=for_count1+2;
@@ -14859,7 +14865,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_mesh-1))
 													{
 
 														for_count1=for_count1+2;
@@ -14900,7 +14906,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_mline-1))
 													{
 
 														for_count1=for_count1+2;
@@ -14941,7 +14947,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_mleaderstyle-1))
 													{
 
 														for_count1=for_count1+2;
@@ -14982,7 +14988,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_mleader-1))
 													{
 
 														for_count1=for_count1+2;
@@ -15023,7 +15029,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_mtext-1))
 													{
 
 														for_count1=for_count1+2;
@@ -15064,7 +15070,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_oleframe-1))
 													{
 
 														for_count1=for_count1+2;
@@ -15105,7 +15111,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_ole2frame-1))
 													{
 
 														for_count1=for_count1+2;
@@ -15145,7 +15151,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_point-1))
 													{
 
 														for_count1=for_count1+2;
@@ -15199,7 +15205,7 @@
 													count_block_polyline_330=0;
 
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_polyline-1))
 													{
 
 														for_count1=for_count1+2;
@@ -15821,7 +15827,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_ray-1))
 													{
 
 														for_count1=for_count1+2;
@@ -15862,7 +15868,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_region-1))
 													{
 
 														for_count1=for_count1+2;
@@ -15903,7 +15909,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_section-1))
 													{
 
 														for_count1=for_count1+2;
@@ -15944,7 +15950,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_seqend-1))
 													{
 
 														for_count1=for_count1+2;
@@ -16673,7 +16679,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_shape-1))
 													{
 
 														for_count1=for_count1+2;
@@ -16731,7 +16737,7 @@
 
 
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_solid-1))
 													{
 
 														for_count1=for_count1+2;
@@ -17459,7 +17465,7 @@
 													count_block_spline_330=0;
 
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_spline-1))
 													{
 
 														for_count1=for_count1+2;
@@ -18173,7 +18179,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_sun-1))
 													{
 
 														for_count1=for_count1+2;
@@ -18214,7 +18220,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_surface-1))
 													{
 
 														for_count1=for_count1+2;
@@ -18255,7 +18261,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_table-1))
 													{
 
 														for_count1=for_count1+2;
@@ -18309,7 +18315,7 @@
 													count_block_text_330=0;
 
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_text-1))
 													{
 
 
@@ -18947,7 +18953,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_tolerance-1))
 													{
 
 														for_count1=for_count1+2;
@@ -18988,7 +18994,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_trace-1))
 													{
 
 														for_count1=for_count1+2;
@@ -19029,7 +19035,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_underlay-1))
 													{
 
 														for_count1=for_count1+2;
@@ -19082,7 +19088,7 @@
 													count_block_vertex_10=0;
 													count_block_vertex_330=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_vertex-1))
 													{
 
 														for_count1=for_count1+2;
@@ -19103,7 +19109,13 @@
 																Log_1.append("\n");
 
 																block_vertex_count=block_vertex_count+1;
+																if (block_vertex_count>499)
+																{
+																	Log_1.append("more than 499 vertexes in block defenition");
+																	Log_1.append("\n");
 
+																}
+
 																DXF_input_block_vertex[block_count1][block_vertex_count].Master_block_handle_id=Master_block_handle_id;
 
 
@@ -19700,7 +19712,7 @@
 													count_block_viewport_10=0;
 													count_block_viewport_330=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_viewport-1))
 													{
 
 														for_count1=for_count1+2;
@@ -20729,7 +20741,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_wipeout-1))
 													{
 
 														for_count1=for_count1+2;
@@ -20770,7 +20782,7 @@
 													block_st5=0;
 													block_count5=0;
 
-													while (block_st5==0 and block_count5<49)
+													while (block_st5==0 and block_count5<(Max_block.DXF_block_xline-1))
 													{
 
 														for_count1=for_count1+2;
@@ -21133,7 +21145,7 @@
 
 
 
-						while (entities_st1==0 and entities_count1<99999)
+						while (entities_st1==0 and entities_count1<(Max_alg.DXF_entities-1))
 						{
 							for_count1=for_count1+2;
 

Modified: branches/dxftoqet2/src/dxf_split.h
===================================================================
--- branches/dxftoqet2/src/dxf_split.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/dxf_split.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -5,6 +5,7 @@
 //#include <QMainWindow>
 #include <QWidget>
 #include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
 #include "dxftoqet_mainwindow.h"
 //#include <QtWidgets>
 #include "ui_dxftoqet_mainwindow.h"

Added: branches/dxftoqet2/src/dxf_table_size.cpp
===================================================================
--- branches/dxftoqet2/src/dxf_table_size.cpp	                        (rev 0)
+++ branches/dxftoqet2/src/dxf_table_size.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -0,0 +1,7 @@
+#include "dxf_table_size.h"
+
+dxf_table_size::dxf_table_size()
+{
+
+}
+

Added: branches/dxftoqet2/src/dxf_table_size.h
===================================================================
--- branches/dxftoqet2/src/dxf_table_size.h	                        (rev 0)
+++ branches/dxftoqet2/src/dxf_table_size.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -0,0 +1,135 @@
+#ifndef DXF_TABLE_SIZE_H
+#define DXF_TABLE_SIZE_H
+
+#include <QWidget>
+#include <QtCore>
+
+
+struct ALG
+{
+	int DXF_header;
+	int DXF_classes;
+	int DXF_tables;
+	int DXF_table_appid;
+	int DXF_table_block_record;
+	int DXF_table_dimstyle;
+	int DXF_table_layer;
+	int DXF_table_ltype;
+	int DXF_table_style;
+	int DXF_table_ucs;
+	int DXF_table_view;
+	int DXF_table_vport;
+	int DXF_input_block;
+	int DXF_input_end_block;
+	int DXF_entities;
+};
+
+struct BLOCK
+{
+	int DXF_block_3dface;
+	int DXF_block_3dsolid;
+	int DXF_block_acad_proxy_entity;
+	int DXF_block_arc;
+	int DXF_block_attdef;
+	int DXF_block_attrib;
+	int DXF_block_body;
+	int DXF_block_circle;
+	int DXF_block_dimension;
+	int DXF_block_ellipse;
+	int DXF_block_hatch;
+	int DXF_block_helix;
+	int DXF_block_image;
+	int DXF_block_insert;
+	int DXF_block_leader;
+	int DXF_block_light;
+	int DXF_block_line;
+	int DXF_block_lwpolyline;
+	int DXF_block_mesh;
+	int DXF_block_mline;
+	int DXF_block_mleaderstyle;
+	int DXF_block_mleader;
+	int DXF_block_mtext;
+	int DXF_block_oleframe;
+	int DXF_block_ole2frame;
+	int DXF_block_point;
+	int DXF_block_polyline;
+	int DXF_block_ray;
+	int DXF_block_region;
+	int DXF_block_section;
+	int DXF_block_seqend;
+	int DXF_block_shape;
+	int DXF_block_solid;
+	int DXF_block_spline;
+	int DXF_block_sun;
+	int DXF_block_surface;
+	int DXF_block_table;
+	int DXF_block_text;
+	int DXF_block_tolerance;
+	int DXF_block_trace;
+	int DXF_block_underlay;
+	int DXF_block_vertex;
+	int DXF_block_viewport;
+	int DXF_block_wipeout;
+	int DXF_block_xline;
+};
+
+struct ENTITIE
+{
+	int DXF_entities_3dface;
+	int DXF_entities_3dsolid;
+	int DXF_entities_acad_proxy_entity;
+	int DXF_entities_arc;
+	int DXF_entities_attdef;
+	int DXF_entities_attrib;
+	int DXF_entities_body;
+	int DXF_entities_circle;
+	int DXF_entities_dimension;
+	int DXF_entities_ellipse;
+	int DXF_entities_hatch;
+	int DXF_entities_helix;
+	int DXF_entities_image;
+	int DXF_entities_insert;
+	int DXF_entities_leader;
+	int DXF_entities_light;
+	int DXF_entities_line;
+	int DXF_entities_lwpolyline;
+	int DXF_entities_mesh;
+	int DXF_entities_mline;
+	int DXF_entities_mleaderstyle;
+	int DXF_entities_mleader;
+	int DXF_entities_mtext;
+	int DXF_entities_oleframe;
+	int DXF_entities_ole2frame;
+	int DXF_entities_point;
+	int DXF_entities_polyline;
+	int DXF_entities_ray;
+	int DXF_entities_region;
+	int DXF_entities_section;
+	int DXF_entities_seqend;
+	int DXF_entities_shape;
+	int DXF_entities_solid;
+	int DXF_entities_spline;
+	int DXF_entities_sun;
+	int DXF_entities_surface;
+	int DXF_entities_table;
+	int DXF_entities_text;
+	int DXF_entities_tolerance;
+	int DXF_entities_trace;
+	int DXF_entities_underlay;
+	int DXF_entities_vertex;
+	int DXF_entities_viewport;
+	int DXF_entities_wipeout;
+	int DXF_entities_xline;
+};
+
+class dxf_table_size
+{
+
+	public:
+
+	dxf_table_size ();
+
+
+};
+
+#endif // DXF_TABLE_SIZE_H

Modified: branches/dxftoqet2/src/qet_base_types/baseelmt.cpp
===================================================================
--- branches/dxftoqet2/src/qet_base_types/baseelmt.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/qet_base_types/baseelmt.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -1,5 +1,8 @@
 #include "baseelmt.h"
 
+extern struct ALG Max_alg;
+extern struct BLOCK Max_block;
+extern struct ENTITIE Max_entitie;
 extern struct DXF_base DXF_main_base[1];
 
 BaseELMT::BaseELMT(QWidget *parent) : QWidget(parent)

Modified: branches/dxftoqet2/src/split_csv.cpp
===================================================================
--- branches/dxftoqet2/src/split_csv.cpp	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/split_csv.cpp	2016-03-02 22:40:35 UTC (rev 4368)
@@ -2,7 +2,9 @@
 
 //extern int dxf ();
 
-
+extern struct ALG Max_alg;
+extern struct BLOCK Max_block;
+extern struct ENTITIE Max_entitie;
 extern struct DXF_base DXF_main_base[1];
 
 

Modified: branches/dxftoqet2/src/split_csv.h
===================================================================
--- branches/dxftoqet2/src/split_csv.h	2016-03-02 18:36:44 UTC (rev 4367)
+++ branches/dxftoqet2/src/split_csv.h	2016-03-02 22:40:35 UTC (rev 4368)
@@ -3,6 +3,7 @@
 
 
 #include "src/dxf_data.h"
+#include "src/dxf_table_size.h"
 #include <QObject>
 //#include <QMainWindow>
 #include "dxftoqet_mainwindow.h"


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