Export of only some layers with rescaling
Contents
[
Hide
]Export of only some layers with rescaling (CADNET-559)
Issue: How to export of only some layers with rescaling (CADNET-559).
Tips: To do this, select the necessary layers, add them to the CadBaseEntity array, then assign them to drawing entities and execute UpdateSize.
Example:
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(); |