Create Hatch in Outer Block and exclude inner block
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I have a requirement where i want to craete hatch only for the outer block and need exclude the inner block. I have tried the following steps but none worked so far.
1. Hatchstyle enum as shown in example of below link
https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-01A47A4F-9FC5-4DB6-8C3E-B72D75688965
hatch.HatchStyle = HatchStyle.Outer;
(or)
hatch.HatchStyle = HatchStyle.Normal;
2. Create Hatch for Outer block and remove hatch in inner block (instead of blocks also tried for polyline)
3. Tried to achieve with below code
Hatch hatch = new Hatch();
hatch.SetDatabaseDefaults();
hatch.SetHatchPattern(HatchPatternType.PreDefined, "ANGLE");
hatch.PatternScale = 1;
hatch.AppendLoop(HatchLoopTypes.Outermost, new ObjectIdCollection { polyline.ObjectId });
ObjectId hatchId = modelSpace.AppendEntity(hatch);
tr.AddNewlyCreatedDBObject(hatch, true);
Your ideas and response on this matter is highly appreciated. Thanks in advance.