更改折线宽度
Contents
[
Hide
]如何更改折线的宽度
问题: 如何更改折线的宽度 (CADNET-459-460)。
提示: 要在 CadBaseEntity 中更改宽度(如果类型为 CadEntityTypeName.LWPOLYLINE),使用 (entity as CadLwPolyline).ConstantWidth = 2 或者对于常规实体 LineWeight。
示例:
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
foreach (CadBaseEntity entity in cadImage.Entities) | |
{ | |
if (entity.TypeName == CadEntityTypeName.LWPOLYLINE) | |
{ | |
(entity as CadLwPolyline).ConstantWidth = 2; | |
} | |
} | |
This can be used for common entities | |
foreach (var entity in cadImage.Entities) | |
{ | |
entity.LineWeight = 24; | |
} |