生成的DXF文件在AutoCAD中打开,但崩溃了BricsCAD

时间:2017-12-27 12:55:39

标签: delphi autocad dxf

我正在使用Delphi中的DXF(AC1021版本)导出器,我遇到了一些问题。我正在密切关注ezdxf的最小文件结构,我能够在delphi中成功生成它。

现在我遇到的问题是,生成的文件在AutoCAD中正常工作,但是当我尝试从块中单击实体时,它就会使BricsCAD崩溃。

下面我发给你生成的文件。也许有人知道一个分析工具可能知道我的dxf导出器有什么问题。谢谢所有的提示!

    999
TFPDxfWriteBridge by wingdesigner
0
SECTION
2
HEADER
9
$ACADVER
1
AC1021
9
$HANDSEED
5
20000
0
ENDSEC
0
SECTION
2
CLASSES
0
ENDSEC
0
SECTION
2
TABLES
0
TABLE
2
VPORT
5
A
330
0
100
AcDbSymbolTable
70
1
0
VPORT
5
B
330
A
100
AcDbSymbolTableRecord
100
AcDbViewportTableRecord
2
*ACTIVE
70
0
10
0
20
0
11
1
21
1
12
209
22
86
13
0
23
0
14
10
24
10
15
1
25
1
16
0
26
0
36
1
17
0
27
0
37
0
40
319
41
2
42
50
43
0
44
0
50
0
51
0
71
0
72
100
73
1
74
3
75
0
76
0
77
0
78
0
281
0
65
1
110
0
120
0
130
0
111
1
121
0
131
0
112
0
122
1
132
0
79
0
146
0
348
10020
60
7
61
5
292
1
282
1
141
0
142
0
63
250
421
3358443
0
ENDTAB
0
TABLE
2
LTYPE
5
C
330
0
100
AcDbSymbolTable
70
4
0
LTYPE
5
D
330
C
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
2
ByBlock
70
0
3

72
65
73
0
40
0.000
0
LTYPE
5
E
330
C
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
2
ByLayer
70
0
3

72
65
73
0
40
0.000
0
LTYPE
5
F
330
C
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
2
CONTINUOUS
70
0
3
Solid line
72
65
73
0
40
0.000
0
ENDTAB
0
TABLE
2
LAYER
5
10
330
0
100
AcDbSymbolTable
70
1
0
LAYER
5
11
330
10
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
0
70
0
62
7
6
CONTINUOUS
370
-3
390
F
0
ENDTAB
0
TABLE
2
STYLE
5
12
330
0
100
AcDbSymbolTable
70
3
0
STYLE
5
13
330
12
100
AcDbSymbolTableRecord
100
AcDbTextStyleTableRecord
2
Standard
70
0
40
0.00
41
1.00
50
0.00
71
0
42
1.00
3
txt
4

0
ENDTAB
0
TABLE
2
VIEW
5
15
330
0
100
AcDbSymbolTable
70
0
0
ENDTAB
0
TABLE
2
UCS
5
17
330
0
100
AcDbSymbolTable
70
0
0
ENDTAB
0
TABLE
2
APPID
5
18
330
0
100
AcDbSymbolTable
70
1
0
APPID
5
19
330
18
100
AcDbSymbolTableRecord
100
AcDbRegAppTableRecord
2
ACAD
70
0
0
ENDTAB
0
TABLE
2
DIMSTYLE
5
1A
330
0
100
AcDbSymbolTable
70
1
100
AcDbDimStyleTable
71
1
0
DIMSTYLE
105
1B
330
1A
100
AcDbSymbolTableRecord
100
AcDbDimStyleTableRecord
2
Standard
70
0
40
1
41
0.18
42
0.0625
43
0.38
44
0.18
45
0
46
0.00
47
0.0
48
0.0
140
0.18
141
0.09
142
0.0
143
25.39999
144
1.0
145
0.0
146
1.0
147
0.09
148
0
71
0
72
0
73
0
74
1
75
0
76
0
77
0
78
0
79
0
170
0
171
2
172
0
173
0
174
0
175
0
176
0
177
0
178
0
179
0
271
4
272
4
273
2
274
2
275
0
276
0
277
2
278
46
279
0
280
0
281
0
282
0
283
1
284
0
285
0
286
0
288
0
289
3
340
Standard
341

371
-2
372
-2
0
ENDTAB
0
TABLE
2
BLOCK_RECORD
5
1C
330
0
100
AcDbSymbolTable
70
2
0
BLOCK_RECORD
5
1D
330
1C
100
AcDbSymbolTableRecord
100
AcDbBlockTableRecord
2
*Model_Space
70
0
280
1
281
0
0
BLOCK_RECORD
5
21
330
1C
100
AcDbSymbolTableRecord
100
AcDbBlockTableRecord
2
*Paper_Space
70
0
280
1
281
0
0
BLOCK_RECORD
5
25
330
1C
100
AcDbSymbolTableRecord
100
AcDbBlockTableRecord
2
TEST_BLOCK
70
0
280
1
281
0
0
ENDTAB
0
ENDSEC
0
SECTION
2
BLOCKS
0
BLOCK
5
1E
330
1D
100
AcDbEntity
8
0
100
AcDbBlockBegin
2
*Model_Space
70
0
10
0.00
20
0.00
30
0.0
3
*Model_Space
1

0
ENDBLK
5
20
330
1D
100
AcDbEntity
8
0
100
AcDbBlockEnd
0
BLOCK
5
22
330
21
100
AcDbEntity
8
0
100
AcDbBlockBegin
2
*Paper_Space
70
0
10
0.00
20
0.00
30
0.0
3
*Paper_Space
1

0
ENDBLK
5
24
330
21
100
AcDbEntity
8
0
100
AcDbBlockEnd
0
BLOCK
5
26
330
25
100
AcDbEntity
8
0
100
AcDbBlockBegin
2
TEST_BLOCK
70
0
10
0.00
20
0.00
30
0.0
3
TEST_BLOCK
1

0
LINE
5
27
330
25
100
AcDbEntity
8
0
100
AcDbLine
10
1688.00
20
1430.00
30
0.00
11
1185.00
21
1097.00
31
0.00
0
POINT
5
28
330
25
100
AcDbEntity
8
0
100
AcDbPoint
10
1715.00
20
1205.00
30
0.00
0
CIRCLE
5
29
330
25
100
AcDbEntity
8
0
100
AcDbCircle
10
847.31
20
1694.50
30
0.00
40
272.44
0
ARC
5
2A
330
25
100
AcDbEntity
8
0
100
AcDbCircle
10
595.07
20
875.17
30
0.00
40
384.38
100
AcDbArc
50
232.00
51
224.00
0
LWPOLYLINE
5
2B
330
25
100
AcDbEntity
8
0
100
AcDbPolyline
90
10
70
0
10
1783.00
20
113.00
10
1927.00
20
545.00
10
766.00
20
955.00
10
1583.00
20
1624.00
10
1057.00
20
959.00
10
1136.00
20
785.00
10
1851.00
20
1672.00
10
142.00
20
674.00
10
174.00
20
1296.00
10
40.00
20
736.00
0
SPLINE
5
2C
330
25
100
AcDbEntity
8
0
100
AcDbSpline
210
0.0
220
0.0
230
1.0
70
8
71
3
72
14
73
10
74
0
42
0.0000000001
43
0.0000000001
40
0.00000
40
0.00000
40
0.00000
40
0.00000
40
1.00000
40
2.00000
40
3.00000
40
4.00000
40
5.00000
40
5.00000
40
5.00000
40
5.00000
40
5.00000
40
5.00000
10
1783.00
20
113.00
30
0.0
10
1927.00
20
545.00
30
0.0
10
766.00
20
955.00
30
0.0
10
1583.00
20
1624.00
30
0.0
10
1057.00
20
959.00
30
0.0
10
1136.00
20
785.00
30
0.0
10
1851.00
20
1672.00
30
0.0
10
142.00
20
674.00
30
0.0
10
174.00
20
1296.00
30
0.0
10
40.00
20
736.00
30
0.0
0
ENDBLK
5
2D
330
25
100
AcDbEntity
8
0
100
AcDbBlockEnd
0
ENDSEC
0
SECTION
2
ENTITIES
0
INSERT
5
2E
330
25
100
AcDbEntity
8
0
100
AcDbBlockReference
2
TEST_BLOCK
10
0.00
20
0.00
30
0.0
0
ENDSEC
0
SECTION
2
OBJECTS
0
DICTIONARY
5
2F
330
0
100
AcDbDictionary
281
1
3
ACAD_GROUP
350
D
0
DICTIONARY
5
30
330
2F
100
AcDbDictionary
281
1
0
ENDSEC
0
EOF

修改

随着它的推出,BricsCAD有一个很好的恢复工具。根据该工具Hard POinter/ID Handle of PlotStyleName Object (390)是错误的。

  • 名称:AcDbLayerTableRecord(17);值:PlotStyleName Id(F);验证:无效;替换为:设置为Null。

这大大缩小了可能性,但并没有完全解决问题,因为我不确定PlotStyleName object在我的案例中是什么。

2 个答案:

答案 0 :(得分:1)

我发现BricsCAD可以使用内部_RECOVER函数来分析输入文件,并警告用户可能出现的错误。

事实证明,未正确定义层(390)的自指针。将390设置为0而不是F,并不是解决问题的最干净,最正确的方法,但它可以完成工作。

答案 1 :(得分:0)

我不了解BricsCAD,但它可能是BricsCAD不支持的一些AutoCAD友好的dxf代码。

尝试使用此dxf文件,查看它是否在BricsCAD中生成相同的错误 它只包含一个块(Zoom-Extends找到它)。

如果有效,我们可以找出导致文件崩溃的原因。

  0
SECTION
  2
HEADER
  9
$ACADVER
  1
AC1009
  9
$INSBASE
 10
0.0
 20
0.0
 30
0.0
  9
$REGENMODE
 70
     1
  9
$FILLMODE
 70
     1
  9
$QTEXTMODE
 70
     0
  9
$MIRRTEXT
 70
     0
  9
$DRAGMODE
 70
     2
  9
$LTSCALE
 40
1.0
  9
$OSMODE
 70
  2215
  9
$ATTMODE
 70
     1
  9
$TEXTSIZE
 40
0.15
  9
$TRACEWID
 40
1.0
  9
$TEXTSTYLE
  7
STANDARD
  9
$CLAYER
  8
DEFPOINTS
  9
$CELTYPE
  6
BYLAYER
  9
$CECOLOR
 62
   256
  9
$DIMSCALE
 40
1.0
  9
$DIMASZ
 40
0.1
  9
$DIMEXO
 40
0.25
  9
$DIMDLI
 40
0.25
  9
$DIMRND
 40
0.0
  9
$DIMDLE
 40
0.0
  9
$DIMEXE
 40
0.1
  9
$DIMTP
 40
0.0
  9
$DIMTM
 40
0.0
  9
$DIMTXT
 40
0.15
  9
$DIMCEN
 40
0.1
  9
$DIMTSZ
 40
0.0
  9
$DIMTOL
 70
     0
  9
$DIMLIM
 70
     0
  9
$DIMTIH
 70
     0
  9
$DIMTOH
 70
     1
  9
$DIMSE1
 70
     0
  9
$DIMSE2
 70
     0
  9
$DIMTAD
 70
     1
  9
$DIMZIN
 70
     8
  9
$DIMBLK
  1

  9
$DIMASO
 70
     1
  9
$DIMSHO
 70
     1
  9
$DIMPOST
  1

  9
$DIMAPOST
  1

  9
$DIMALT
 70
     0
  9
$DIMALTD
 70
     3
  9
$DIMALTF
 40
0.03937007874016
  9
$DIMLFAC
 40
1.0
  9
$DIMTOFL
 70
     1
  9
$DIMTVP
 40
0.0
  9
$DIMTIX
 70
     0
  9
$DIMSOXD
 70
     0
  9
$DIMSAH
 70
     0
  9
$DIMBLK1
  1

  9
$DIMBLK2
  1

  9
$DIMSTYLE
  2
ISO-25
  9
$DIMCLRD
 70
     2
  9
$DIMCLRE
 70
     0
  9
$DIMCLRT
 70
     7
  9
$DIMTFAC
 40
1.0
  9
$DIMGAP
 40
0.15
  9
$LUNITS
 70
     2
  9
$LUPREC
 70
     3
  9
$SKETCHINC
 40
1.0
  9
$FILLETRAD
 40
0.0
  9
$AUNITS
 70
     1
  9
$AUPREC
 70
     3
  9
$MENU
  1
.
  9
$ELEVATION
 40
0.0
  9
$PELEVATION
 40
0.0
  9
$THICKNESS
 40
0.0
  9
$LIMCHECK
 70
     0
  9
$BLIPMODE
 70
     0
  9
$CHAMFERA
 40
0.0
  9
$CHAMFERB
 40
0.0
  9
$SKPOLY
 70
     0
  9
$TDCREATE
 40
2455559.7215111339
  9
$TDUPDATE
 40
2455601.6499361689
  9
$TDINDWG
 40
0.0182150694
  9
$TDUSRTIMER
 40
0.0182009375
  9
$USRTIMER
 70
     1
  9
$ANGBASE
 50
0.0
  9
$ANGDIR
 70
     0
  9
$PDMODE
 70
     0
  9
$PDSIZE
 40
0.0
  9
$PLINEWID
 40
0.0
  9
$COORDS
 70
     1
  9
$SPLFRAME
 70
     0
  9
$SPLINETYPE
 70
     6
  9
$SPLINESEGS
 70
     8
  9
$ATTDIA
 70
     0
  9
$ATTREQ
 70
     1
  9
$HANDLING
 70
     1
  9
$HANDSEED
5
100006
  9
$SURFTAB1
 70
     6
  9
$SURFTAB2
 70
     6
  9
$SURFTYPE
 70
     6
  9
$SURFU
 70
     6
  9
$SURFV
 70
     6
  9
$UCSNAME
  2

  9
$UCSORG
 10
0.0
 20
0.0
 30
0.0
  9
$UCSXDIR
 10
1.0
 20
0.0
 30
0.0
  9
$UCSYDIR
 10
0.0
 20
1.0
 30
0.0
  9
$PUCSNAME
  2

  9
$PUCSORG
 10
0.0
 20
0.0
 30
0.0
  9
$PUCSXDIR
 10
1.0
 20
0.0
 30
0.0
  9
$PUCSYDIR
 10
0.0
 20
1.0
 30
0.0
  9
$USERI1
 70
     0
  9
$USERI2
 70
     0
  9
$USERI3
 70
     0
  9
$USERI4
 70
     0
  9
$USERI5
 70
     0
  9
$USERR1
 40
0.0
  9
$USERR2
 40
0.0
  9
$USERR3
 40
0.0
  9
$USERR4
 40
0.0
  9
$USERR5
 40
0.0
  9
$WORLDVIEW
 70
     1
  9
$SHADEDGE
 70
     3
  9
$SHADEDIF
 70
    70
  9
$TILEMODE
 70
     1
  9
$MAXACTVP
 70
    64
  9
$PLIMCHECK
 70
     0
  9
$PEXTMIN
 10
1.0000000000000000E+020
 20
1.0000000000000000E+020
 30
1.0000000000000000E+020
  9
$PEXTMAX
 10
-1.0000000000000000E+020
 20
-1.0000000000000000E+020
 30
-1.0000000000000000E+020
  9
$PLIMMIN
 10
0.0
 20
0.0
  9
$PLIMMAX
 10
420.0
 20
297.0
  9
$UNITMODE
 70
     0
  9
$VISRETAIN
 70
     1
  9
$PLINEGEN
 70
     0
  9
$PSLTSCALE
 70
     1
  0
ENDSEC
  0
SECTION
  2
TABLES
  0
TABLE
  2
VPORT
 70
     1
  0
ENDTAB
  0
TABLE
  2
LTYPE
 70
     3
  0
LTYPE
  2
CONTINUOUS
 70
     0
  3
Solidline
 72
    65
 73
     0
 40
0.0
  0
LTYPE
  2
ACAD_ISO04W100
 70
     0
  3
ISOlong-dashdot____.____.____.____._
 72
    65
 73
     4
 40
2.0
 49
1.399999999999999
 49
-0.3
 49
0.0
 49
-0.3
  0
LTYPE
  2
ACAD_ISO02W100
 70
     0
  3
ISOdash__________________________
 72
    65
 73
     2
 40
15.0
 49
12.0
 49
-3.0
  0
ENDTAB
  0
TABLE
  2
LAYER
 70
    16
  0
LAYER
  2
0
 70
     0
 62
     7
  6
CONTINUOUS
  0
LAYER
  2
DEFPOINTS
 70
     0
 62
     7
  6
CONTINUOUS
  0
LAYER
  2
PIPE
 70
     0
 62
     6
  6
CONTINUOUS
  0
LAYER
  2
GRID
 70
     0
 62
     8
  6
CONTINUOUS
  0
LAYER
  2
GROUND
 70
     0
 62
     3
  6
CONTINUOUS
  0
LAYER
  2
POINTID
 70
     0
 62
     1
  6
CONTINUOUS
  0
LAYER
  2
ELEVATION
 70
     0
 62
     1
  6
CONTINUOUS
  0
LAYER
  2
POINTS
 70
     0
 62
     6
  6
CONTINUOUS
  0
LAYER
  2
X-Y-CORDS
 70
     0
 62
     6
  6
CONTINUOUS
  0
LAYER
  2
NOTES
 70
     0
 62
     4
  6
CONTINUOUS
  0
LAYER
  2
LATERAL
 70
     0
 62
     4
  6
CONTINUOUS
  0
LAYER
  2
LATERALG
 70
     0
 62
     3
  6
CONTINUOUS
  0
LAYER
  2
3DPOLY
 70
     0
 62
     5
  6
CONTINUOUS
  0
LAYER
  2
HATCH
 70
     0
 62
     9
  6
CONTINUOUS
  0
LAYER
  2
TEXT
 70
     0
 62
     7
  6
CONTINUOUS
  0
LAYER
  2
DIMENSIONS
 70
     0
 62
     5
  6
CONTINUOUS
  0
LAYER
  2
TABLES
 70
     0
 62
     7
  6
CONTINUOUS
  0
LAYER
  2
MANHOLE
 70
     0
 62
     1
  6
CONTINUOUS
  0
LAYER
  2
HIDDEN
 70
     0
 62
     7
  6
ACAD_ISO02W100
  0
LAYER
  2
GV
 70
     0
 62
     5
  6
CONTINUOUS
  0
LAYER
  2
FH
 70
     0
 62
     1
  6
CONTINUOUS
  0
LAYER
  2
SL
 70
     0
 62
     5
  6
CONTINUOUS
  0
LAYER
  2
PI
 70
     0
 62
     6
  6
CONTINUOUS
  0
LAYER
  2
TR
 70
     0
 62
     1
  6
CONTINUOUS
  0
LAYER
  2
HC
 70
     0
 62
     5
  6
CONTINUOUS
  0
LAYER
  2
MH
 70
     0
 62
     1
  6
CONTINUOUS
  0
LAYER
  2
Y
 70
     0
 62
     7
  6
CONTINUOUS
  0
ENDTAB
  0
TABLE
  2
STYLE
 70
     4
  0
STYLE
  2
STANDARD
 70
     0
 40
0.15
 41
1.0
 50
0.0
 71
     0
 42
0.15
  3
txt.shx
  4

  0
STYLE
  2
ANNOTATIVE
 70
     0
 40
0.0
 41
1.0
 50
0.0
 71
     0
 42
0.2
  3
txt
  4

  0
STYLE
  2
LOCAL
 70
     0
 40
0.15
 41
1.0
 50
0.0
 71
     0
 42
0.15
  3
x-arab.shx
  4

  0
STYLE
  2

 70
     1
 40
0.0
 41
1.0
 50
0.0
 71
     0
 42
2.5
  3
ltypeshp.shx
  4

  0
ENDTAB
  0
TABLE
  2
VIEW
 70
     0
  0
ENDTAB
  0
TABLE
  2
UCS
 70
     0
  0
ENDTAB
  0
TABLE
  2
APPID
 70
    12
  0
APPID
  2
ACAD
 70
     0
  0
APPID
  2
ACADANNOTATIVE
 70
     0
  0
APPID
  2
ACAECLAYERSTANDARD
 70
     0
  0
APPID
  2
ACCMTRANSPARENCY
 70
     0
  0
APPID
  2
ACAD_EXEMPT_FROM_CAD_STANDARDS
 70
     0
  0
APPID
  2
ACAD_DSTYLE_DIMJAG
 70
     0
  0
APPID
  2
ACAD_DSTYLE_DIMBREAK
 70
     0
  0
APPID
  2
ACAD_DSTYLE_DIMTALN
 70
     0
  0
APPID
  2
ACADANNOPO
 70
     0
  0
APPID
  2
ACAD_DSTYLE_DIMJOGGED_JOGA
 70
     0
  0
APPID
  2
ACAD_DSTYLE_DIMTEXT_FILL
 70
     0
  0
APPID
  2
ACAD_MLEADERVER
 70
     0
  0
ENDTAB
  0
TABLE
  2
DIMSTYLE
 70
     3
  0
DIMSTYLE
  2
STANDARD
 70
     0
  3

  4

  5

  6

  7

 40
1.0
 41
0.18
 42
0.0625
 43
0.38
 44
0.18
 45
0.0
 46
0.0
 47
0.0
 48
0.0
140
0.18
141
0.09
142
0.0
143
25.399999999999999
144
1.0
145
0.0
146
1.0
147
0.09
 71
     0
 72
     0
 73
     1
 74
     1
 75
     0
 76
     0
 77
     0
 78
     0
170
     0
171
     2
172
     0
173
     0
174
     0
175
     0
176
     0
177
     0
178
     0
  0
DIMSTYLE
  2
ANNOTATIVE
 70
     0
  3

  4

  5

  6

  7

 40
1.0
 41
0.18
 42
0.0625
 43
0.38
 44
0.18
 45
0.0
 46
0.0
 47
0.0
 48
0.0
140
0.18
141
0.09
142
0.0
143
25.399999999999999
144
1.0
145
0.0
146
1.0
147
0.09
 71
     0
 72
     0
 73
     1
 74
     1
 75
     0
 76
     0
 77
     0
 78
     0
170
     0
171
     2
172
     0
173
     0
174
     0
175
     0
176
     0
177
     0
178
     0
  0
DIMSTYLE
  2
ISO-25
 70
     0
  3

  4

  5

  6

  7

 40
1.0
 41
0.1
 42
0.25
 43
0.25
 44
0.1
 45
0.0
 46
0.0
 47
0.0
 48
0.0
140
0.15
141
0.1
142
0.0
143
0.03937007874016
144
1.0
145
0.0
146
1.0
147
0.15
 71
     0
 72
     0
 73
     0
 74
     1
 75
     0
 76
     0
 77
     1
 78
     8
170
     0
171
     3
172
     1
173
     0
174
     0
175
     0
176
     2
177
     0
178
     7
  0
ENDTAB
  0
ENDSEC
  0
SECTION
  2
BLOCKS
0
BLOCK
8
POINTS
2
Block0
70
0
10
0
20
0
30
0
3
Block0
1

0
SOLID
5
100004
8
POINTS
10
678218.2191
20
2717042.676
30
0
11
678220.4691
21
2717042.676
31
0
12
678218.2191
22
2717040.426
32
0
13
678220.4691
23
2717040.426
33
0
39
1
210
0
220
0
230
1
0
TEXT
5
100005
8
POINTS
10
678221.5941
20
2717043.801
30
0
11
678221.5941
21
2717043.801
31
0
72
0
73
1
40
2.25
1
point
50
0
7
STANDARD
0
ENDBLK
5
100002
8
POINTS
  0
BLOCK
  8
0
  2
$MODEL_SPACE
 70
     0
 10
0.0
 20
0.0
 30
0.0
  3
$MODEL_SPACE
  1

  0
ENDBLK
  5
10
  8
0
  0
BLOCK
 67
     1
  8
0
  2
$PAPER_SPACE
 70
     0
 10
0.0
 20
0.0
 30
0.0
  3
$PAPER_SPACE
  1

  0
ENDBLK
  5
11
 67
     1
  8
0
  0
ENDSEC
  0
SECTION
  2
ENTITIES
0
POINT
5
100003
8
POINTS
10
678219.3441
20
2717041.551
30
0
0
INSERT
5
100001
8
POINTS
2
Block0
10
0
20
0
30
0
  0
ENDSEC
  0
EOF