rhinoscriptsyntax.AddHatchPatterns (filename, replace=False)
rhinoscript.hatch.AddHatchPatterns (filename, replace=False)
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). |
List |
The names of the newly added hatch patterns if successful. |
None |
If not successful, or on error. |
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