การส่งออกเฉพาะชั้นบางส่วนพร้อมการปรับขนาด
Contents
[
Hide
]การส่งออกเฉพาะชั้นบางส่วนพร้อมการปรับขนาด (CADNET-559)
ปัญหา: วิธีการส่งออกเฉพาะชั้นบางส่วนพร้อมการปรับขนาด (CADNET-559).
เคล็ดลับ: เพื่อทำเช่นนี้ ให้เลือกชั้นที่จำเป็น เพิ่มไปยังอาร์เรย์ CadBaseEntity จากนั้นกำหนดให้กับเอนทิตีการวาดและเรียกใช้ UpdateSize.
ตัวอย่าง:
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
List<CadBaseEntity> validEntities = new List<CadBaseEntity>(); | |
foreach (CadBaseEntity entity in cadImage.Entities) | |
{ | |
if (entity.LayerName == "Layer1" || entity.LayerName == "Layer2") | |
{ | |
validEntities.Add(entity); | |
} | |
} | |
cadImage.Entities = validEntities.ToArray(); | |
cadImage.UpdateSize(); |