AddHatchPatterns

Adds hatch pattens to the document by importing hatch pattern definitions from a pattern file. For more information on hatch pattern files, see the Rhino help file for the Hatch command.

Syntax

rhinoscriptsyntax.AddHatchPatterns (filename, replace=False)

rhinoscript.hatch.AddHatchPatterns (filename, replace=False)

Parameters

filename

Required.  String.  The name of the hatch pattern file to import.

replace

Optional.  Boolean.  If hatch pattern names already in the document match hatch pattern names in the pattern definition file, then the existing hatch patterns will be redefined.  If omitted, existing hatch patterns will not be redefined (False).

Returns

List

The names of the newly added hatch patterns if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

filename = rs.OpenFileName("Import", "Pattern Files (*.pat)|*.pat||")

if filename:

    patterns = rs.AddHatchPatterns(filename)

    if patterns:

        for pattern in patterns: print pattern

Also See

HatchPatternCount

HatchPatternNames