Exportação de apenas algumas camadas com redimensionamento
Contents
[
Hide
]Exportação de apenas algumas camadas com redimensionamento (CADNET-559)
Problema: Como exportar apenas algumas camadas com redimensionamento (CADNET-559).
Dicas: Para fazer isso, selecione as camadas necessárias, adicione-as ao array CadBaseEntity, em seguida, atribua-as às entidades de desenho e execute UpdateSize.
Exemplo:
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(); |