Přeskočení některých entit při exportu
Contents
[
Hide
]Jak přeskočit některé entity při exportu
Problém: Jak přeskočit některé entity při exportu.
Tipy: Abyste toho dosáhli, můžete vybrat pouze entity, které potřebujete, přidáním je do nového seznamu a poté je přiřadit k výkresu.
Příklad:
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
using CadImage cadImage = (CadImage)Image.Load(fileName); | |
CadBaseEntity[] entities = cadImage.Entities; | |
List<CadBaseEntity> filteredEntities = new List<CadBaseEntity>(); | |
foreach (CadBaseEntity baseEntity in entities) | |
{ | |
if (baseEntity.TypeName == CadEntityTypeName.TEXT) | |
{ | |
filteredEntities.Add(baseEntity); | |
} | |
} | |
cadImage.Entities = filteredEntities.ToArray(); |