Click or drag to resize

DXFReaderNETControlAddPolyline Method

Adds a new polyline to the current drawing.

Namespace:  DXFReaderNET
Assembly:  DXFReaderNET (in DXFReaderNET.dll) Version: 20.10.52
Syntax
public EntityObject AddPolyline(
	List<PolylineVertex> Vertexes,
	bool Closed = true,
	double Width = 0,
	short ACIColor = 256,
	string LayerName = "",
	string LineTypeName = ""
)

Parameters

Vertexes
Type: System.Collections.GenericListPolylineVertex
An list of vertexes
Closed (Optional)
Type: SystemBoolean
True for closed light weight polyline (Default value = true).
Width (Optional)
Type: SystemDouble
The width of light weight polyline in drawing's units.
ACIColor (Optional)
Type: SystemInt16
A number for 0 to 256 corresponding to the AutoCAD Color Index (0 = ByBlock; 256 = ByLayer. Default value = 256).
LayerName (Optional)
Type: SystemString
The layer name. If omitted, or layername doesn't exist, the CurrentLayer will be used.
LineTypeName (Optional)
Type: SystemString
The layer name. If omitted, or layername doesn't exist, , or layername doesn't exist, the CurrentLineTypeName will be used.

Return Value

Type: EntityObject
The new added Polyline.
Remarks
The entity is added to the active layout.
Examples
Adds a new square to a drawing.
[C#]

List<PolylineVertex> polyvertexes = new List<PolylineVertex>();
polyvertexes.Add(new PolylineVertex(0,0));
polyvertexes.Add(new PolylineVertex(0,10));
polyvertexes.Add(new PolylineVertex(10,10));
polyvertexes.Add(new PolylineVertex(10,0));

dxfReaderNETControl1.AddPolyline(polyvertexes,true);
See Also