엔티티 제거 방법
Contents
[
Hide
]엔티티 제거 방법
문제: 엔티티를 제거하는 방법 (CADNET-3).
팁: 엔티티를 제거하려면 필요한 엔티티를 선택하고 도면에서 RemoveEntityAt 메서드를 사용하십시오.
예시:
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
for (int i = 0; i < cadImage.Entities.Length; i++) | |
{ | |
CadBaseEntity baseEntity = cadImage.Entities[i]; | |
if (baseEntity.GetType() == typeof(CadArc)) | |
{ | |
CadArc arc = (CadArc)baseEntity; | |
if (arc.CenterPoint.X > 1e10) | |
{ | |
cadImage.RemoveEntityAt(i); | |
// OR cadImage.RemoveEntity(baseEntity); | |
i--; | |
} | |
} | |
} | |
cadImage.UpdateSize(); |