Drawings SDK Developer Guide > Working with .dwg Files > Working with Entities > Working with Specific Entitites > Working with Hatches > Example of Working with Hatches
Example of Working with Hatches

The sample project for working with hatches is located in the Drawing\Examples\DevGuide\OdHatchEx subdirectory of the ODA installation folder (for example, C:\Program Files\Open Design Alliance).

The sample project demonstrates creating a hatch and modifying and displaying its properties. The application creates a .dwg file, and then prints the following information about the created hatch objects:

  • Number of loops
  • Hatch object type
  • Hatch style
  • Hatch area
  • Hatch origin point
  • Hatch normal
  • Hatch elevation
  • Pattern type or gradient type
  • Pattern name or gradient name
  • Pattern angle or gradient angle
  • Pattern scale or gradient shift
  • PatternDouble flag

The application generates a .dwg file that contains six hatch objects which show specific types of hatches:

  1. First hatch shows the simple solid pattern.
  2. Second hatch shows the simple user predefined pattern.
  3. Third hatch shows a hatch with a circular hole.
  4. Fourth hatch shows an associative predefined hatch.
  5. Fifth hatch shows an associative custom defined hatch.
  6. Sixth hatch shows setting of a gradient hatch.

See Also

Overview of Hatches

Working with Loops of Hatches

Working with General Properties of Hatches

Working with Pattern Properties of Hatches

Working with Gradient Properties of Hatches

Working with User-Defined Patterns of Hatches

Copyright © 2002 – 2021. Open Design Alliance. All rights reserved.