เปลี่ยนความกว้างของเส้นโค้ง
Contents
[
Hide
]วิธีเปลี่ยนความกว้างของเส้นโค้ง
ปัญหา: วิธีเปลี่ยนความกว้างของเส้นโค้ง (CADNET-459-460).
เคล็ดลับ: เพื่อเปลี่ยนความกว้างใน CadBaseEntity (ถ้าเป็นประเภท CadEntityTypeName.LWPOLYLINE) ใช้ (entity as CadLwPolyline).ConstantWidth = 2 หรือสำหรับเอนทิตีปกติ LineWeight.
ตัวอย่าง:
This file contains 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; | |
} |