Thay đổi độ rộng của polyline
Contents
[
Hide
]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ụ:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |