דלג על כמה ישויות בזמן ייצוא

איך לדלג על כמה ישויות בזמן ייצוא

בעיה: איך לדלג על כמה ישויות בזמן ייצוא.

טיפים: כדי לעשות זאת, אתה יכול לבחור רק את הישויות שאתה צריך על ידי הוספתן לרשימה חדשה ולאחר מכן להקצותן לשרטוט.

דוגמה:

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();