เปลี่ยนความกว้างของเส้นโค้ง

วิธีเปลี่ยนความกว้างของเส้นโค้ง

ปัญหา: วิธีเปลี่ยนความกว้างของเส้นโค้ง (CADNET-459-460).

เคล็ดลับ: เพื่อเปลี่ยนความกว้างใน CadBaseEntity (ถ้าเป็นประเภท CadEntityTypeName.LWPOLYLINE) ใช้ (entity as CadLwPolyline).ConstantWidth = 2 หรือสำหรับเอนทิตีปกติ LineWeight.

ตัวอย่าง:

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;
}