All of the hatch pattern definitions contained in a rhino document.

Properties

ComponentType

#Since v6.0
public override ModelComponentType ComponentType { get; }

Count

Returns the count of all items, including deleted ones.
public virtual int Count { get; }
inherited fromCommonComponentTable<T>

CurrentHatchPatternIndex

#ExampleSince v5.0
At all times, there is a "current" hatch pattern. Unless otherwise specified, new objects are assigned to the current hatch pattern. The current hatch pattern is never locked, hidden, or deleted.
public int CurrentHatchPatternIndex { get; set; }

Document

Document that owns this table.
public RhinoDoc Document { get; }
inherited fromRhinoDocCommonTable<T>

Indexers

this[]

#
Conceptually, the hatch pattern table is an array of hatch patterns. The operator[] can be used to get individual hatch patterns. A hatch pattern is either active or deleted and this state is reported by HatchPattern.IsDeleted.
public HatchPattern this[
index
zero based array index.
] { get; }
Remarks: Detaching a worksession reference model, or purging a linked instance definition, removes its hatch patterns but leaves the table slots they occupied empty; the slots cannot be closed up, because table indices are persistent references that objects store. Count spans the empty slots and they accumulate for the life of the document. An index that lands on one returns the default hatch pattern rather than throwing, and nothing about it says it is a stand-in except its index, which is -1 and never the index you asked for - so test index == HatchPatterns[index].Index before treating an entry as real. Enumerating the table with foreach goes through the document manifest rather than the raw table array, so it does not visit empty slots at all. See RH-97389.
If index is out of range, the current hatch pattern is returned.

Methods

Add

#Since v5.0
Adds a new hatch pattern with specified definition to the table.
public int Add(
pattern
definition of new hatch pattern. The information in pattern is copied. If pattern.Name is empty the a unique name of the form "HatchPattern 01" will be automatically created.
)
>=0 index of new hatch pattern -1 not added because a hatch pattern with that name already exists or some other problem occurred.

Clear

Marks all items as deleted.
public void Clear()
inherited fromCommonComponentTable<T>

Delete

#Since v6.0
Deletes a hatch pattern from the table.
public bool Delete(
item,
The hatch pattern to delete.
quiet
If true, no warning message box appears if hatch pattern cannot be deleted.
)
true if successful, false otherwise.

Delete

#Since v6.0
Deletes a hatch pattern from the table.
public override bool Delete(
item
The hatch pattern to delete.
)
true if successful, false otherwise.

Delete

#Since v7.0
Deletes a hatch pattern from the table.
public bool Delete(
hatchPatternIndex,
The index of the hatch pattern to delete.
quiet
If true, no warning message box appears if hatch pattern cannot be deleted.
)
true if successful, false otherwise.

Delete

#Since v7.0
Deletes a hatch pattern from the table.
public bool Delete(
hatchPatternIndex
The index of the hatch pattern to delete.
)
true if successful, false otherwise.

Delete

#Since v9.0
Delete multiple hatch patterns.
public int Delete(
hatchPatternIndices,
An enumeration of hatch pattern indices.
quiet
If true, no warning message box appears if a hatch pattern is in use.
)
The number of hatch patterns that were deleted.

Find

#ExampleSince v5.0 Obsolete v6.0
Finds the hatch pattern with a given name. Search ignores case.
public int Find(
name,
The name of the hatch pattern to be found.
ignoreDeleted
true means don't search deleted hatch patterns.
)
obsoleteignoreDeleted is now ignored. Items are removed permanently now. Use FindName.
Index of the hatch pattern with the given name. -1 if no hatch pattern found.

FindId

Uses the guid to find a model component. Deleted objects cannot be found by id. The guid is the value that is stored in the .Id property. In a single document, no two active objects have the same guid. If an object is replaced with a new object, then the guid persists. For example, if the _Move command moves an object, then the moved object inherits its guid from the starting object. If the Copy command copies an object, then the copy gets a new guid. This guid persists through file saving/opening operations. This function will not find grip objects.
public virtual T FindId(
id
ID of model component to search for.
)
inherited fromCommonComponentTable<T>
Reference to the rhino object with the objectId or null if no such object could be found.
FindId

FindIndex

#Since v6.0
Retrieves a HatchPattern object based on Index. This search type of search is discouraged. We are moving towards using only IDs for all tables.
public HatchPattern FindIndex(
index
The index to search for.
)
A HatchPattern object, or null if none was found.

FindName

#ExampleSince v6.0
Finds the hatch pattern with a given name. Search ignores case.
public HatchPattern FindName(
name
The name of the hatch pattern to be found.
)
Hatch pattern with the given name. Null if no hatch pattern found.

FindNameHash

#Since v6.0
Finds a HatchPattern given its name hash.
public HatchPattern FindNameHash(
nameHash
The name hash of the HatchPattern to be searched.
)
An Linetype, or null on error.

GetEnumerator

Returns the enumerator that yields all items.
public virtual IEnumerator<T> GetEnumerator()
inherited fromCommonComponentTable<T>

GetUnusedHatchPatternName

#Since v9.0
Gets unused hatchpattern name used as default when creating new hatchpatterns.
public string GetUnusedHatchPatternName()
The unused hatchpattern name.

Modify

#Since v8.0
Modify hatch pattern settings.
public bool Modify(
hatchPattern,
Definition of new hatch pattern. The information in the hatch pattern is copied.
hatchPatternIndex,
Zero based index of the hatch pattern to modify.
quiet
If true, information message boxes pop up when illegal changes are attempted.
)
True if successful, or false if hatchPatternIndex is out of range.

PurgeUnused

#Since v9.0
Purges any unused hatch patterns.
public int PurgeUnused()
The number of unused hatch patterns that were purged.

Rename

#Since v7.0
Renames a hatch pattern in the table.
public bool Rename(
item,
The hatch pattern to rename
hatchPatternName
The new hatch pattern name.
)
true if successful, false otherwise.

Rename

#Since v7.0
Renames a hatch pattern in the table.
public bool Rename(
hatchPatternIndex,
The index of the hatch pattern to rename.
hatchPatternName
The new hatch pattern name.
)
true if successful, false otherwise.
Explicit

ICollection<HatchPattern>.Add

#Since v5.0