Thay đổi độ rộng của polyline

Cách thay đổi độ rộng của polyline

Vấn đề: Làm thế nào để thay đổi độ rộng của polyline (CADNET-459-460).

Mẹo: Để thay đổi độ rộng trong CadBaseEntity (nếu loại là CadEntityTypeName.LWPOLYLINE) sử dụng (entity as CadLwPolyline).ConstantWidth = 2 hoặc đối với các thực thể thông thường LineWeight.

Ví dụ:

foreach (CadBaseEntity entity in cadImage.Entities)
{
if (entity.TypeName == CadEntityTypeName.LWPOLYLINE)
{
(entity as CadLwPolyline).ConstantWidth = 2;
}
}
This can be used for common entities
foreach (var entity in cadImage.Entities)
{
entity.LineWeight = 24;
}