ポリラインの幅を変更する
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; | |
} |