DXFReaderNETControlAddPolyline Method
|
Adds a new polyline to the current drawing.
Namespace:
DXFReaderNET
Assembly:
DXFReaderNET (in DXFReaderNET.dll) Version: 20.10.54
Syntax public EntityObject AddPolyline(
List<PolylineVertex> Vertexes,
bool Closed = true,
double Width = 0,
short ACIColor = 256,
string LayerName = "",
string LineTypeName = ""
)
Public Function AddPolyline (
Vertexes As List(Of PolylineVertex),
Optional Closed As Boolean = true,
Optional Width As Double = 0,
Optional ACIColor As Short = 256,
Optional LayerName As String = "",
Optional LineTypeName As String = ""
) As EntityObject
public:
EntityObject^ AddPolyline(
List<PolylineVertex^>^ Vertexes,
bool Closed = true,
double Width = 0,
short ACIColor = 256,
String^ LayerName = L"",
String^ LineTypeName = L""
)
member AddPolyline :
Vertexes : List<PolylineVertex> *
?Closed : bool *
?Width : float *
?ACIColor : int16 *
?LayerName : string *
?LineTypeName : string
(* Defaults:
let _Closed = defaultArg Closed true
let _Width = defaultArg Width 0
let _ACIColor = defaultArg ACIColor 256
let _LayerName = defaultArg LayerName ""
let _LineTypeName = defaultArg LineTypeName ""
*)
-> EntityObject
METHOD AddPolyline(
Vertexes AS List<PolylineVertex>,
Closed AS LOGIC := TRUE,
Width AS REAL8 := 0,
ACIColor AS SHORT := 256,
LayerName AS STRING := "",
LineTypeName AS STRING := ""
) AS EntityObject
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:
EntityObjectThe 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