Copy sketch (including hatch) as-is into a new sketch using Inventor C# API

Copy sketch (including hatch) as-is into a new sketch using Inventor C# API

manasi_patilESZTV
Contributor Contributor
62 Views
1 Reply
Message 1 of 2

Copy sketch (including hatch) as-is into a new sketch using Inventor C# API

manasi_patilESZTV
Contributor
Contributor

Hi Everyone,

As shown in the attached image, I have a sketch in Inventor that contains  a hatch pattern , Centerlines, Center Mark and geometry.

My requirement:
I want to copy this entire sketch exactly as it is (geometry + hatch+ Centerlines + Center Mark) into a new sketch programmatically using the Inventor C# API.

So far, I found:

  • I can loop through SketchEntities and recreate lines/arcs in the new sketch, but this doesn’t bring the hatch.

  • Hatch regions (SketchHatchRegion) don’t seem to provide a direct method to copy or duplicate into another sketch.

  • There doesn’t appear to be a direct “copy-paste” equivalent in the API.

Question:

  • Is there any way to directly copy a sketch (with hatch intact) into a new sketch using the API?

Any examples or workarounds would be highly appreciated.

Sketch.png

Thanks!

0 Likes
63 Views
1 Reply
Reply (1)
Message 2 of 2

marcin_otręba
Advisor
Advisor

Hi, 

What do you want to accomplish exacly ?

I see that we talk about sketch in drawing enviroment ? could you use sketched symbol functionality instead ?

 

I dont think it is possible to copy it all to new sketch but to iterate trough drawing hatches use SketchHatchRegions:

you can use it to check imputują and regenerate it in new sketch

Inventor 2025 Help | DrawingSketch Object | Autodesk

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

0 Likes