SimpleImport

  Demos >

SimpleImport

Previous pageReturn to chapter overviewNext page

SimpleImport is the most important demo application for import purposes. It demonstrates access to the properties of entities, opening a CAD file and saving a TXT file.

simpleimport

Besides, we would like to draw your attention to the Editor demo application that allows saving entities as XML file.

 

The txt file for Entities.dxf looks as follows:

 

ClassName=TsgDXFLine; Entity name=LINE layer = Layer2 style = psSolid color = FF00 (clLime)

LineWeight=-1;  LineTypeScale=1;  ZThick=0;

Begin point:

X=0 Y=50 Z=0

End point:

X=50 Y=50 Z=0

 

ClassName=TsgDXFText; Entity name=TEXT This is a block layer = Layer2 style = psSolid color = FF00 (clLime)

Start point:

X=0

Y=53

Z=0 Angle=0

Font: Name=Arial.ttf;  Height=16;  Color=$2FFFFFFF;

Style:

Thickness=-1

Generation=0

VAlign=0

HAlign=0

Text: This is a block

 

ClassName=TsgDXFLine; Entity name=LINE layer = 0 style = psSolid color = FF (clRed)

LineWeight=-1;  LineTypeScale=1;  ZThick=0;

Begin point:

X=10 Y=10 Z=0

End point:

X=20 Y=30 Z=0

 

ClassName=TsgDXFCircle; Entity name=CIRCLE layer = 0 style = psSolid color=black/white

Center point:  X=10 Y=10 Z=0

 

ClassName=TsgDXFText; Entity name=TEXT Enghlish Русский Franz\U+00F6sisch Fran\U+00E7ais layer = 0 style = psSolid color=black/white

Start point:

X=0

Y=-20

Z=0 Angle=0

Font: Name=Arial.ttf;  Height=16;  Color=$2FFFFFFF;

Style:

Thickness=-1

Generation=0

VAlign=0

HAlign=0

Text: Enghlish Русский Franz\U+00F6sisch Fran\U+00E7ais

 

ClassName=TsgDXFLWPolyline; Entity name=LWPOLYLINE layer = 0 style = psSolid color=black/white

 

ClassName=TsgDXFText; Entity name=TEXT MText is a text layer = 0 style = psSolid color=black/white

Start point:

X=-4.49703281309982

Y=-44.7824603352546

Z=0 Angle=0

Font: Name=simplex;  Height=16;  Color=$2FFFFFFF;

Style:

Thickness=-1

Generation=0

VAlign=3

HAlign=0

Text: MText is a text

 

ClassName=TsgDXFText; Entity name=TEXT which can be in layer = 0 style = psSolid color=black/white

Start point:

X=-4.49703281309982

Y=-48.9032452327343

Z=0 Angle=0

Font: Name=simplex;  Height=16;  Color=$2FFFFFFF;

Style:

Thickness=-1

Generation=0

VAlign=3

HAlign=0

Text: which can be in

 

ClassName=TsgDXFText; Entity name=TEXT some lines layer = 0 style = psSolid color=black/white

Start point:

X=-4.49703281309982

Y=-53.0240301302139

Z=0 Angle=0

Font: Name=Arial;  Height=13;  Color=$2FFFFFFF;

Style:

Thickness=-1

Generation=0

VAlign=3

HAlign=0

Text: some lines

 

ClassName=TsgDXFAttrib; Entity name=ATTRIB Attribute1 = Value1 layer = 0 style = psSolid color=black/white

Start point:

X=63.7163629569553

Y=-45.8264242109336

Z=0 Angle=0

Font: Name=Gost.shx;  Height=17;  Color=$2FFFFFFF;

Style:

Thickness=-1

Generation=0

VAlign=0

HAlign=0

Text: Value1

Tag: Attribute1

 

ClassName=TsgDXFAttrib; Entity name=ATTRIB Attdef = Value2 layer = 0 style = psSolid color=black/white

Start point:

X=62.4146959690973

Y=-51.6839256562949

Z=0 Angle=0

Font: Name=Gost.shx;  Height=17;  Color=$2FFFFFFF;

Style:

Thickness=-1

Generation=0

VAlign=0

HAlign=0

Text: Value2

Tag: Attdef

 

Go to CAD VCL Enterprise