Hi,
I have an AutoCAD that contains some blocks (insert). Is it possible to act on the single elements that compose the block?
Particularly, I need to modify the style of an hatch.
Thank you,
lulu.
hatch style in a block
Moderators: SDS, support, admin
Re: hatch style in a block
Hello.
Entities within the block can be accessed as insert's block entities. For example
will access style of the hatch object if insert placed with i index in converter's entities collection and hatch placed with j index in block's entities collection.
Alexander.
Entities within the block can be accessed as insert's block entities. For example
Code: Select all
CADImage image;
CADInsert insert;
CADHatch hatch;
// .......
(((CADEntity)image.Converter.Entities[i]).EntType == EntityType.Insert)
{
insert = (CADInsert)image.Converter.Entities[i];
if (((CADEntity)insert.Block.Entities[j]).EntType == EntityType.Hatch)
{
hatch = (CADHatch)insert.Block.Entities[j];
hatch.HatchStyle = CADHatchStyle.Solid;
}
}
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: hatch style in a block
Hi Alexander,
thank you for your reply, but I have another problem now. The type of the hatches (inside the blocks) in the AutoCAD file results 'CurvePolygon', and I don't understand why it happens... How can I convert a CADCurvePolygon in a CADHatch?
Thanks,
lulu.
thank you for your reply, but I have another problem now. The type of the hatches (inside the blocks) in the AutoCAD file results 'CurvePolygon', and I don't understand why it happens... How can I convert a CADCurvePolygon in a CADHatch?
Thanks,
lulu.
Re: hatch style in a block
Hello lulu,
CADCurvePolygon object can't be cast to CADHatch object. However CADHatch is the descendant of CADCurvePolygon. You can create new Hatch object, fill its properties by corresponded values from CurvePolygon and specify HatchStyle.
Alexander.
CADCurvePolygon object can't be cast to CADHatch object. However CADHatch is the descendant of CADCurvePolygon. You can create new Hatch object, fill its properties by corresponded values from CurvePolygon and specify HatchStyle.
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support