Click or drag to resize

DXFReaderNETControlAddEllipse Method

Adds a new ellipse or elliptic arc to the current drawing.

Namespace:  DXFReaderNET
Assembly:  DXFReaderNET (in DXFReaderNET.dll) Version: 20.10.54
Syntax
public EntityObject AddEllipse(
	Vector3 Center,
	double MajorAxis,
	double MinorAxis,
	double Rotation = 0,
	double StartAngle = 0,
	double EndAngle = 6,28318530717959,
	short ACIColor = 256,
	string LayerName = "",
	string LineTypeName = ""
)

Parameters

Center
Type: DXFReaderNETVector3
The center of the ellipse.
MajorAxis
Type: SystemDouble
The major axis of the ellipse in drawing's units.
MinorAxis
Type: SystemDouble
The minor axis of the ellipse in drawing's units.
Rotation (Optional)
Type: SystemDouble
The ellipse rotation in degrees (Default value = 0).
StartAngle (Optional)
Type: SystemDouble
The start angle in radians of the elliptic arc.
EndAngle (Optional)
Type: SystemDouble
The end angle in radians of the elliptic arc.
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 linetype name. If omitted, or linetype doesn't exist, the CurrentLineTypeName will be used.

Return Value

Type: EntityObject
The new added Ellipse.
Remarks
The entity is added to the active layout. To add a full ellipse StartAngle = 0 and EndAngle = 2π.
Examples
Adds a new ellipse entity to the current drawing with center in (100, 100), major axis = 100, minor axis =50, rotation 34° with ACI color = 1 (red).
[C#]

Vector3 Center = new Vector3(100, 100, 0);
double MajorAxis = 100;
double MinorAxis = 50;
double Rotation = 34;
dxfReaderNETControl1.AddEllipse(Center, MajorAxis, MinorAxis, Rotation, 0, MathHelper.TwoPI, 1);
[Visual Basic]
Dim Center As New Vector3(100, 100, 0)
Dim MajorAxis As Double = 100
Dim MinorAxis As Double = 50
Dim Rotation As Double = 34
DxfReaderNETControl1.AddEllipse(Center, MajorAxis, MinorAxis, Rotation, 0, MathHelper.TwoPI, 1)
See Also